It's astonishing to me how difficult it (still) is to design a syncable local-first data model.
I keep thinking I've found a decent way, then realizing its flaws, then despondently noticing that the flaws were already discussed in Ink & Switch's article: inkandswitch.com/local-first.ht
Conversation
We are solving this at
1
2
Thanks! I looked at homebaseio.github.io/homebase-react to see how to integrate with a backend.
This example tries to serialize changes as they occur and depends on FB's built-in persistence to handle offline scenarios. Non-FB backends would need to roll their own persistence/flush, right?
1
Correct, until we finish integrating with . But we can add a recipe for persistence/flush with the datascript backend, so looking into that now.
1
Ah, I see! For my application's relatively modest querying needs, I'd prefer to avoid the bundle size and complexity of Datascript; I'm using LevelDB right now—the native C++ implementation for my ReactNative targets and a tiny IDB shim for web.
1
Ah I see! Yes, if bundle size matters for you we can ping when we have the GraalVM binary done. Is the complexity issue related to bundle size, code interpretability or something else?
1
My main complexity concerns are performance and conceptual size. That is: I'd like as thin a JS layer as possible for my DB! And: datalog is way more conceptually complex than I need.

