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
Arguably things are even worse than discussed in that article. Take Firebase, for instance: it implements offline caching, but that's very different from sync. You have to design a whole replication strategy on top to get something like "a synced file format."
1
20
CouchDB seems like the closest solution, if you can design a conflict-free model. But I spent the last week getting into the details of actually operating a multi-user service, and I am now quite thoroughly spooked!
8
30
maybe stupid question, but your users would probably be fine running their own instances? why not just optimize for the happy path where it's local-first and people can set up a remote sync host before dealing with multi-tenancy (which is sort of a pain with couch imo)
1
Some people want to, but that's definitely not the common case. With the mnemonic medium I'm trying to sign people up for a service while they're in the middle of reading someone else's article! They're not gonna, like, set up a server in that moment…
1
1
i guess i've struggled with this, it's the part where my sketches have always died and i'm done with it, to the point where i'm fine having pouch per client/browser w/ a "backup/pull to/from couch on localhost" button rather than even cast the yak a stray gaze
2
Replying to
This particular yak is extremely hairy! There's now a per-user-DB configuration flag in CouchDB (as of v3), but that makes any kind of cross-user querying behavior intractable (unless you set up continuous all-to-one syncing to some private DB… yikes)

