https://github.com/archagon/crdt-playground
https://github.com/archagon/crdt-playground
causal-trees cloudkit collaborative-editing crdt cvrdt distributed-systems eventual-consistency icloud-sync peer-to-peer sync
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/archagon/crdt-playground
- Owner: archagon
- Created: 2017-09-11T22:54:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-20T14:02:45.000Z (about 6 years ago)
- Last Synced: 2025-03-03T23:49:48.442Z (7 months ago)
- Topics: causal-trees, cloudkit, collaborative-editing, crdt, cvrdt, distributed-systems, eventual-consistency, icloud-sync, peer-to-peer, sync
- Language: Swift
- Homepage: http://archagon.net/blog/2018/03/24/data-laced-with-history/
- Size: 13.4 MB
- Stars: 298
- Watchers: 9
- Forks: 20
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
*This repository is a companion to the article "[Data Laced with History: Causal Trees & Operational CRDTs][article]", where I examine the fascinating new class of "operational" CRDTs in detail. Not a framework; for educational use only. Please don't use this in production unless you know what you're doing!*
A generic implementation of Victor Grishchenko's [Causal Tree][trees] CRDT, written in Swift. State-based (CvRDT) implementation. Features many tweaks, including a site identifier map, atom references, and priority atoms. Uses Lamport timestamps instead of "awareness".
Two pieces of companion software are included. The first is a macOS app that simulates device sync over a hypothetical network with any arbitrary topology and any number of partitions. The app is designed for testing the resiliency of a CRDT under difficult network conditions and includes editing support for text and vector graphics. The second is a very basic, CT-based text editor for iOS that works equally well online and offline, syncs documents over CloudKit, and supports real-time collaboration over CloudKit Sharing. No extra servers required! (Such is the glory of CRDTs.)
Performance is good: everything should be *O*(*n*log*n*) or faster.
[article]: http://archagon.net/blog/2018/03/24/data-laced-with-history/
[trees]: http://www.ds.ewi.tudelft.nl/~victor/articles/ctre.pdf