// the find
archagon/crdt-playground
A Swift implementation of Victor Grishchenko's Causal Tree CRDT, built as the companion code for archagon's "Data Laced with History" article on operational CRDTs. It ships two demo apps — a macOS network simulator for torturing the CRDT with arbitrary partition topologies, and an iOS text editor that syncs over CloudKit with zero backend. Aimed at people who want to actually understand causal trees, not at anyone looking for a dependency to import.
The macOS simulator that lets you construct arbitrary network topologies and partitions is a genuinely useful way to see a CRDT's convergence behavior under adversarial conditions, not just read about it. The iOS editor syncing via CloudKit Sharing with no custom server is a nice demonstration that CRDTs can ride on top of existing sync infra instead of needing a dedicated backend. The implementation goes beyond a toy causal tree with a site identifier map, atom references, and priority atoms, and the author backs it with a full write-up of the algorithm rather than just dropping code with no explanation.
No commits since 2019 and the README explicitly tells you not to use this in production — it's abandoned reference code, not a maintained library. There's no Swift Package Manager or CocoaPods setup, just a raw Xcode project, so pulling this into another codebase means manually copying files rather than adding a dependency. No test suite or CI anywhere in the tree; the `Extras/mergebug*.txt` files are raw bug repro dumps left in the repo, which tells you merge edge cases were found and dumped to disk rather than turned into regression tests. Everything is locked to Apple platforms (CloudKit, macOS/iOS), so none of it is directly reusable if you're not shipping an Apple app.