Live data from Hacker News

Show HN: InstantDB – A Modern Firebase

github.com

61–70 of 308 posts

Re: Show HN: InstantDB – A Modern Firebase

#61

I really want an ActiveRecord-like experience. In ActiveRecord, I can do this: ```rb post = Post.find_by(author: "John Smith") post.author.email = "john@example.com" post.save ``` In React/Vue/Solid, I want to express things like this: ```jsx function BlogPostDetailComponent(...) { // `subscribe` or `useSnapshot` or whatever would be the hook that gives me a reactive post object const post = subscribe(Posts.find(prop…

Absolutely. Instant has similar design goals to Rails and ActiveRecord Here are some parallels your example: A. ActiveRecord: ``` post = Post.find_by(author: "John Smith") post.author.email = "john@example.com" post.save ``` B. Instant: ``` db.transact( tx.users[lookup('author', 'John Smith')].update({ email: 'john@example.com' }), ); ``` > In React/Vue/Solid, I want to say express things like this: Here's what the R…

Maybe a dumb question, but why do I have to wrap in `db.transact` and `tx.*`? Why can't I just have a proxy object that handles that stuff under the hood?

Naively, it seems more verbose than necessary.

Also, I like that in Rails, there are ways to mutate just in memory, and then ways to push the change to DB. I can just assign, and then changes are only pushed when I call `save()`. Or if I want to do it all-in-one, I can use something like `.update(..)`.

In the browser context, having this separation feels most useful for input elements. For example, I might have a page where the user can update their username. I want to simply pass in a value for the input element (controlled input)

ex.

```jsx

```

But I only want to push the changes to the db (save) when the user clicks the save button at the bottom of the page.

If any changes go straight to the db, then I have two choices:

1. Use an uncontrolled input element. This is inconvenient if I want to use something like Zod for form validation

2. Create a temporary state for the WIP changes, because in this case I don't want partial, unvalidated/unconfirmed changes written to either my local or remote db.

Re: Show HN: InstantDB – A Modern Firebase

#62
Is the datalog engine exposed? Is there any way to cache parsed queries?

Other datalog engines support recursive queries, which makes my life so much easier. Can I do that now with this? Or is it on the roadmap?

I have fairly large and overlapping rules/queries. Is there any way to store parsed queries and combine them?

Also, why the same name as the (Lutris) Enhydra java database? Your domain is currently listed as a "failed company" from 1997-2000 (actual usage of the Java InstantDB was much longer)

   https://dbdb.io/db/instantdb
Given that it's implemented clojure and some other datalog engines are in clojure, can you say anything about antecedents?

Some other Clojure datalog implementations, most in open source

- Datomic is the long-standing market leader

- XTDB (MPL): https://github.com/xtdb/xtdb

- Datascript (EPL): https://github.com/tonsky/datascript

- Datalevin ((forking datascript, EPL): https://github.com/juji-io/datalevin

- datahike (forking datascript, EPL): https://github.com/replikativ/datahike

- Naga (EPL): https://github.com/quoll/naga

Re: Show HN: InstantDB – A Modern Firebase

#63
post #7

[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!

If we only had doSQL() for everything.

Re: Show HN: InstantDB – A Modern Firebase

#65

For those looking for alternatives to the offline first model, I settled on PowerSync. Runner up was WatermelonDB (don't let the name fool you.) ElectricSQL is still too immature, they announced a rewrite this month. CouchDB / PocketDB aren't really up to date anymore. Unfortunately this area is still immature, and there aren't really great options but PowerSync was the least bad. I'll probably pair it with Supabase…

Co-founder of PowerSync here. Would love to hear what you would like to see improved in PowerSync :) Thanks!

Re: Show HN: InstantDB – A Modern Firebase

#67
Congrats on the launch! I think Firebase was started in 2011, and it's incredible that 13 years later the problem is still unsolved in an open way. We took a shot at this at RethinkDB but fell short. If I were doing this again today, Instant is how I would build it. Rooting for you!

Re: Show HN: InstantDB – A Modern Firebase

#68
post #7

[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!

Was pretty neat to see your investment/involvement!

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

Post reply on HN