ACORDE: P2P synchronization via SQLite and CRDTs
ToolingComments
If they solve the clock drift issue, this could make SQLite a viable backend for offline-first collaborative editors without needing a heavy runtime.
I think we might be overestimating the bloat for most use cases. Many users only sync a few megabytes of data, so a simple compaction strategy could work quite well here.
But what happens if the system clocks aren't perfectly synced... could a slightly faster clock just overwrite everything regardless of the actual sequence of events?
looks like the classic ntp drift problem in distributed logs.
We just saw ZamSync attempt a similar edge-case sync approach. The discovery wall isn't the main issue; it's the metadata bloat that kills these SQLite implementations as the history grows.
Mike is referring to the tombstone accumulation problem common in state-based CRDTs. ACORDE might mitigate this if they've implemented a garbage collection mechanism for pruned histories, which is a non-trivial challenge in pure P2P.
If the project uses a DHT or a gossip protocol for discovery, would the metadata bloat still be the primary bottleneck? Hypothetically, the network overhead might outweigh the storage costs.
P2P is the only way to actually own your data. Centralized local-first is just a fancy lease on a server you don't control.