🔄 CRDT Interactive Demo

Conflict-free Replicated Data Types with Strong Eventual Consistency

G-Counter (Grow-only Counter)

Demonstrates a distributed counter that can only increment. Perfect for page views, downloads, etc.

Replica 1 US Datacenter

0

Replica 2 EU Datacenter

0
How it works: Each replica maintains its own counter. When merging, we take the max value from each replica. This guarantees convergence because max is associative, commutative, and idempotent.

OR-Set (Observed-Remove Set)

Collaborative shopping list with add-wins semantics. Concurrent adds always win over removes.

Alice Phone

Bob Tablet

Add-wins semantics: Each add creates a unique (value, UUID) pair. Concurrent adds from different replicas have different UUIDs, so they don't conflict. Even if Alice removes "eggs" before seeing Bob's add, Bob's "eggs" survives because it has a UUID Alice hasn't observed.

Convergence Guarantee

Demonstrates that merge order doesn't matter (commutative property).