Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Offline first #1968

Closed
no-1ne opened this issue Jan 21, 2025 · 0 comments
Closed

[Feature Request] Offline first #1968

no-1ne opened this issue Jan 21, 2025 · 0 comments

Comments

@no-1ne
Copy link

no-1ne commented Jan 21, 2025

Is your feature request related to a problem? Please describe.
With the rise in interest for offline first development, zenstack is well positioned to do it

Describe the solution you'd like
Use localdb as source of truth..if network disconnects, collect all the transactions that happened when offline, commit them after network connection is backup again

Describe alternatives you've considered
zero, electric sql

Additional context
already there is a FR for zero sync #1933
Zero is nice but needs a heavy backend to get it to work and it's not easily hostable need docker etc... https://zero.rocicorp.dev/docs/deployment

the current zenstack approach is minimal which even can be hosted on CF workers

All we need is a cache of transactions commited when offline and commit them back when online..most of it can be done from client side...https://www.instantdb.com/ which did well recently on HN takes this approach

here is a quote from their essays https://www.instantdb.com/essays/db_browser

This gets extremely hard to do. In essence, anyone who implements this becomes a database engineer full-stop. But, if we had a database in the browser, and it acted like a "node" in a distributed database, wouldn’t this just happen automatically for us?

Turns out, fact-based systems in fact make this much, much easier. Many think we need to resort to operational transforms to do stuff like this, but as figma showed, as long as we’re okay with having a single leader, and are fine with last-write-wins kind of semantics, we can drastically simplify this and just facts are enough.

https://github.com/instantdb/instant/blob/main/client/packages/core/src/store.js

@no-1ne no-1ne closed this as completed Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant