Why it matters

CRDTs enable a new class of collaborative apps. Understanding shapes distributed system design possibilities.

Advertisement

The architecture

Two flavors: state-based (CvRDT) send whole state; operation-based (CmRDT) send operations.

Merge must be idempotent, commutative, associative.

CRDT semanticsReplica A updateslocallyReplica B updateslocallyMergealways convergesCommon CRDTs: counters (G-Counter, PN-Counter), sets (G-Set, OR-Set), maps, sequences (RGA)
CRDT convergence.
Advertisement

How it works end to end

Common CRDTs: G-Counter (grow-only), PN-Counter (increment + decrement), G-Set (grow-only set), OR-Set (observed-remove set).

Sequence CRDTs: RGA, YATA for text editing. Basis of collaborative editors.

Trade-offs: metadata growth, tombstones, complex merge logic.