Comment by jamest

2 years ago

[Firebase founder] The thing I'm excited about w/Instant is the quad-fecta of offline + real-time + relational queries + open source. The amount of requests we had for relational queries was off-the-charts (and is a hard engineering problem), and, while the Firebase clients are OSS, I failed to open source a reference backend (a longer story).

Good luck, Joe, Stopa and team!

I always assumed that an architectural decision had prevented relational queries in Firebase.

It was jarring to find out that indexes are required for every combination of filters your app applies, but then you quickly realize that Firebase solves a particular problem and you're attempted to shoehorn into a problem-space better solved by something like Supabase.

It's not too dissimilar to DynamoDB vs RDB.

  • > I always assumed that an architectural decision had prevented relational queries in Firebase.

    Seems the biggest problem is that Firebase doesn't have relations. How can you query that which does not exist?

    I'm guessing what they really want is SQL? Once upon a time when I was stuck on a Firebase project I built a SQL (subset) engine for Firebase to gain that myself, so I expect that is it.

Thanks for creating Firebase!

It's really the definition of an managed database/datastore.

Do you see InstantDB as a drop in replacement ?

To be honest I don't want to have to worry about my backend. I want a place to effectively drop JSON docs and retract them later.

This is more than enough for a hobbyist project, though I imagine at scale things get might not work as well.

  • For what it's worth, we designed Instant with this in mind. Schema is optional, and you can save JSON data into a column if you like.

    If you wanted to store documents, you could write:

    ```

    useQuery({docs: {}}) // get documents

    transact(tx.docs[docId].update({someKey: someValue}); // update keys in a doc

    transact(tx.docs[docId].delete()) // delete the doc

    ```

    • Thanks for the response.

      2 questions.

      How hard is it to swap our firebase for instant? I've had an amazing time with firebase, but I sorta want to switch to using a completely local solution.

      I have a small lyric video generator, and while I don't care about my own songs potentially leaking, I would never want to take responsibility for something else's data. I basically use firebase for the lyrics afterwards I transcribe them .

      Second, do you offer your own auth or just integrate with other solutions.

      3 replies →

This is an aside but “trifecta but with four” actually has an awesome name: “Superfecta”!

You probably heard this a million times but I still remember trying that simple firebase demo of draw in one box; see the results in another and being amazed. That was one of my pushes out of boring enterprise software death by configuration and into software creation based on modern OSS products.

Was pretty neat to see your investment/involvement!

Made me feel quite old that Firebase is no longer "modern" though...