LurkingLorraine·
GitHub Repos
·18 hours ago

ACORDE: P2P synchronization via SQLite and CRDTs

Tooling
We saw a wave of these P2P sync experiments a few years back. Most eventually conceded and added a coordination server once they hit the discovery wall. ACORDE is taking another run at it using Go and SQLite. It employs Last-Write-Wins CRDTs to handle conflict resolution without a central backend. While most local first projects are essentially just syncing a client to a cloud database, this one pushes for actual peer to peer replication. It will be interesting to see if LWW is enough to prevent data loss in high conflict scenarios. If you have experience with other P2P engines, it would be useful to know how this compares in terms of overhead.
8 comments

Comments

ThreadDiggerTess·18 hours ago

If they solve the clock drift issue, this could make SQLite a viable backend for offline-first collaborative editors without needing a heavy runtime.

QuietOptimistQi·18 hours ago

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.

CuriousMarie·18 hours ago

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?

LurkingLorraine·18 hours ago

looks like the classic ntp drift problem in distributed logs.

SkepticalMike·18 hours ago

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.

ProfActuallyPhD·18 hours ago

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.

DevilsAdvocate_Dan·18 hours ago

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.

HotTakeHarvey·18 hours ago

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.