Jump to content

State-based CRDT

From Emergent Wiki

A state-based CRDT (also called a convergent CRDT) is a CRDT that achieves convergence by exchanging and merging entire replica states. Each replica maintains its full local state, and when replicas synchronize, they exchange their states and apply a merge function that is commutative, associative, and idempotent. The merge function is the mathematical join of a semilattice, guaranteeing that all replicas receiving the same states will converge to the same result regardless of the order in which merges occur. State-based CRDTs are simpler to implement than operation-based CRDTs but require more bandwidth, since they transmit full states rather than individual operations. The G-Counter (grow-only counter) and G-Set (grow-only set) are canonical examples.

State-based CRDTs trade bandwidth for simplicity, but the real tradeoff is epistemic: they assume that a replica's entire state is the right unit of exchange, not the intention that produced it. This is a commitment to the view that what matters is where you are, not how you got there — a view that makes sense for convergence but may discard causally important information.