News for hackers. Stuff that matters.
Re:Show HN: InstantDB – A Modern Firebase by jamest on Thursday August 22, 2024 @02:00PM (#41322809)
[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!

Re:Show HN: InstantDB – A Modern Firebase by ashconnor on Thursday August 22, 2024 @03:35PM (#41323700)
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.

Re:Show HN: InstantDB – A Modern Firebase by randomdata on Friday August 23, 2024 @10:00AM (#41329089)
> 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.

Re:Show HN: InstantDB – A Modern Firebase by unsupp0rted on Friday August 23, 2024 @12:37PM (#41330463)
Building a logistics app, I wish I could query in Firebase for items that don’t have a “shipped” field.

But I can’t.

Re:Show HN: InstantDB – A Modern Firebase by randomdata on Friday August 23, 2024 @01:09PM (#41330791)
Technically you can: Scan all of the documents. A "relational query language" would have to do the same thing.
Re:Show HN: InstantDB – A Modern Firebase by unsupp0rted on Saturday August 24, 2024 @10:08AM (#41338418)
That wouldn’t be querying though, right?

Grabbing all the docs in the db into my controller and filtering down that array is what Firebase makes me do instead of writing queries.

Re:Show HN: InstantDB – A Modern Firebase by randomdata on Saturday August 24, 2024 @11:47AM (#41339065)
> That wouldn’t be querying though, right?

Why not? You're asking a question, of sorts, and getting an answer from the result. That's the literal definition of querying.

> Grabbing all the docs in the db into my controller and filtering down that array is what Firebase makes me do instead of writing queries.

A query language is just an abstraction. One you can have in your code. At some point you still need to "grab all the docs into a controller and filter them down", though. You could push that step into the Firebase service, but it would still have to do the same thing you're doing. There is no magic.

Better would be to provide something indexable so that you don't have to go through all the docs, but you can't index that which does not exist.

Re:Show HN: InstantDB – A Modern Firebase by 999900000999 on Thursday August 22, 2024 @04:05PM (#41323932)
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.

Re:Show HN: InstantDB – A Modern Firebase by warden_2003 on Thursday August 22, 2024 @04:47PM (#41324259)
If you only need simple dropping and collecting back, maybe you should consider about AWS S3 or Supabase storage.
Re:Show HN: InstantDB – A Modern Firebase by 999900000999 on Thursday August 22, 2024 @05:25PM (#41324519)
Ohh, I still need a database, I just need the JSON doc format.
Re:Show HN: InstantDB – A Modern Firebase by ElFitz on Friday August 23, 2024 @12:37AM (#41326200)
Or a key-value store, if the size is limited and speed is essential.
Re:Show HN: InstantDB – A Modern Firebase by stopachka on Thursday August 22, 2024 @07:00PM (#41325012)
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

```

Re:Show HN: InstantDB – A Modern Firebase by 999900000999 on Friday August 23, 2024 @05:45PM (#41333391)
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.

Re:Show HN: InstantDB – A Modern Firebase by stopachka on Friday August 23, 2024 @07:54PM (#41334214)
Glad I could be helpful.

> 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.

It should be relatively straightforward to switch. If you have any questions, you could always reach to us on Discord [1]

The only caveat though: Instant is like Firebase; it is not a completely local solution. If you are worried about exposing some data over the internet, I would store the same kind of stuff you were thinking about with Firebase.

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

We offer our own auth. You have magic code emails and Google Sign in out of the box. We also expose auth functions in admin SDK, in case you want to create a custom solution. [2]

[1] https://discord.com/invite/VU53p7uQcE [2] https://www.instantdb.com/docs/auth

Re:Show HN: InstantDB – A Modern Firebase by 999900000999 on Friday August 23, 2024 @09:54PM (#41334892)
I'm actually imagining telling end users to host the server locally via Docker. I have some other functionality, like the actual lyric transcription, I need docker for.

Thank you for your help. I'll definitely look into this for my next project

Re:Show HN: InstantDB – A Modern Firebase by thinkloop on Wednesday August 28, 2024 @01:04PM (#41381640)
> Instant is like Firebase; it is not a completely local solution. If you are worried about exposing some data over the internet, I would store the same kind of stuff you were thinking about with Firebase.

What does this mean exactly? If you host your own it is still not local?

Re:Show HN: InstantDB – A Modern Firebase by nezaj on Thursday August 22, 2024 @02:27PM (#41323095)
Thank you James!
Re:Show HN: InstantDB – A Modern Firebase by bobbywilson0 on Thursday August 22, 2024 @04:28PM (#41324115)
If we only had doSQL() for everything.
Re:Show HN: InstantDB – A Modern Firebase by 650REDHAIR on Thursday August 22, 2024 @04:32PM (#41324160)
Was pretty neat to see your investment/involvement!

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

Re:Show HN: InstantDB – A Modern Firebase by Ozzie_osman on Thursday August 22, 2024 @05:20PM (#41324488)
Awesome to see this launch and to see James Tamplin backing this project.
Re:Show HN: InstantDB – A Modern Firebase by buggy6257 on Thursday August 22, 2024 @07:12PM (#41325077)
This is an aside but “trifecta but with four” actually has an awesome name: “Superfecta”!
Re:Show HN: InstantDB – A Modern Firebase by djeastm on Thursday August 22, 2024 @07:56PM (#41325239)
Tetrafecta would be cooler
Re:Show HN: InstantDB – A Modern Firebase by aitchnyu on Friday August 23, 2024 @03:25AM (#41326843)
Cursory googling says tetra is Greek and perfect is Latin, so its a bastard word like erogenous or television.
Re:Show HN: InstantDB – A Modern Firebase by tzot on Friday August 23, 2024 @04:28AM (#41327193)
Side point: television is a bastard word, but erogenous is not Greek eros + Latin genus; it's all greek (ἐρωτογενής — it would be erotogenous in English since the root of the word eros is erot- , but the extra syllable was dropped; another example of differentiated transliteration is φωτογενής which became photogenic instead of photogenous).
Re:Show HN: InstantDB – A Modern Firebase by yard2010 on Friday August 23, 2024 @05:35AM (#41327526)
I have just written an essay about the word water in the sibling post comments.

One thing I discovered in the process is that the word water comes to english all the way from Proto Indo European. The word hydro, however, comes from ancient greek, which comes from the same PIE word for water.

Re:Show HN: InstantDB – A Modern Firebase by ignoramous on Friday August 23, 2024 @01:01PM (#41330691)
> bastard word like ... television.

From where I am, it is simply telly, because why not bastardise it some more while we are at it.

Re:Show HN: InstantDB – A Modern Firebase by SOLAR_FIELDS on Thursday August 22, 2024 @09:45PM (#41325635)
I would probably avoid naming Firebase alternatives with a prefix like “Super” at this time.
Re:Show HN: InstantDB – A Modern Firebase by hyperbrainer on Friday August 23, 2024 @12:55AM (#41326287)
I am dumb. Why? Was there some failed/controversial thing?
Re:Show HN: InstantDB – A Modern Firebase by alabhyajindal on Friday August 23, 2024 @01:02AM (#41326313)
Probably because of Supabase, I think.
Re:Show HN: InstantDB – A Modern Firebase by yard2010 on Friday August 23, 2024 @05:27AM (#41327480)
"Supafecta"
Re:Show HN: InstantDB – A Modern Firebase by wccrawford on Friday August 23, 2024 @07:04AM (#41327926)
https://en.wikipedia.org/wiki/Superfecta

Sounds like someone made up the name to just sound better than trifecta. It's marketing speak.

Also, as the link says, it has been used to mean more than four. And other languages use their own equivalent of "quadfecta" instead.

Plus, I knew exactly what "quadfecta" meant, but would have no idea about "superfecta".

Re:Show HN: InstantDB – A Modern Firebase by robertlagrant on Friday August 23, 2024 @07:56AM (#41328180)
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.