CRDTs: Pros and Cons (Lattices and Lettuces?)
a year ago
- #programming
- #CRDTs
- #distributed-systems
- CRDTs (Convergent Replicated Data Types) aim to enable coordination-free distributed programming.
- CRDTs are based on semilattices, which use a join operator that is associative, commutative, and idempotent.
- The concept of using semilattices for replicated data types dates back to Baquero and Moura in 1997.
- Modern algebra is increasingly used for correctness in distributed systems, with CRDTs being an early example.
- CRDTs have issues: drifting from mathematical correctness, being unsafe to read, and lacking programmability.
- A correct CRDT implementation should not allow reads, making it theoretically useless but practically used unsafely.
- Composing CRDTs into useful programs requires languages or frameworks like LVars, Bloom^L, Lasp, or Hydro for Rust.
- The author respects CRDTs' core ideas but highlights their practical pitfalls and educational value.
- Upcoming posts will explore lessons learned about CRDTs to better inform developers' decisions.