CRDTs

Enabling Collaboration in Decentralized Systems

Zach Glindro

git icon
git
github icon
github

              
$

Strong consistency

docs icon
docs
docs icon
docs

No offline access

Loss of data ownership

Service dependency

Eventual consistency

Replica A
  • Milk
Replica B
  • Milk
Replica C
  • Milk
C R D T
C onflict-free
R eplicated
D ata
T ypes
C onflict-free
R eplicated
D ata
T ypes

Strong eventual consistency

Operation-based CRDTs

Alice
  • Buy milk
Bob
  • Buy milk
Alice
  • Buy milk 8:00 AM
Bob
  • Buy milk Don't forget almond milk
Alice
  • Buy milk 8:00 AM; Don't forget almond milk
Bob
  • Buy milk 8:00 AM; Don't forget almond milk

State-based CRDTs

Alice
  • Buy milk
Bob
  • Buy milk
Alice
  • Buy milk
  • Get bread
Bob
  • Buy milk
  • Wash car
Alice
  • Buy milk
  • Get bread
  • Wash‎ car
Bob
  • Buy milk
  • Get bread
  • Wash car

Examples

Apple Notes icon
apple notes
Apple Notes demo GIF
... and possibly apple reminders and photos?
Zed editor icon
zed
zed demo
cereals-inventory.vercel.app

Cereals Inventory web app

cereals-inventory.vercel.app/dashboard

Cereals Inventory web app

C R D T
C onflict-free
R eplicated
D ata
T ypes
  • Local-first software
  • Strong eventual consistency
  • Performance and storage
  • Maturity

Thank you!