Build better apps using CRDTs
summary
Claim: CRDTs make apps feel snappy, resilient and offline-first by turning fields into mergeable objects with metadata rather than overwrites. Implementation detail: use a last-writer-wins map with Lamport timestamps and client IDs so merges simply compare timestamps and pick the newer value, making operations commutative and idempotent. Tooling: example uses ygs and Hocus Pocus to sync shared types. Trade-offs: text CRDTs carry extra metadata (roughly 2–3x footprint in some cases), migrations and permission enforcement are harder, but hundreds of concurrent users are feasible.
AI-written summary · about
chapters (8)
- 0:00Introduction to CRDTs
- 1:05Why CRDTs matter
- 4:39What are CRDTs
- 11:07Conflict resolution with CRDTs
- 17:53Yjs for JavaScript CRDTs
- 20:00Live demo: To-do app CRDTs
- 32:06CRDTs trade-offs
- 37:05Q&A
related talks
29mCRDT: Conflict-free Data Types for Collaborative Editing and Offline-First
32mCRDT and other new ideas for client-server communication
36mCRDTs Illustrated
13mHow to make a real-time collaborative text editor in 5 easy steps!
33mConvergent/Divergent
34mOffline-First Mobile App Design
40mDistributed, Eventually Consistent Computations
45mJump to Hyperspace: Light Speed, User Agency & Moving Past the Cloud
