Skip to content

[Feature Request] Offline first #1968

Closed
@no-1ne

Description

@no-1ne

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions