Conflict-free replicated data types (CRDTs) let copies of shared data accept updates independently. Once every copy receives the same updates, they agree.
A grow-only counter, or G-Counter, is a simple example. Each node stores a vector with one position per node: [A, B].
Each node increments only its own position, and adding the entries gives the total. Nodes share their vectors; when one arrives, the receiver keeps the larger number in each position. Since those counts only grow, a G-Counter cannot decrement or remove an increment. Those operations need a different CRDT design, such as a PN-Counter.
With the view toggle focused, use arrow keys to rotate or zoom, and Home to return to the side view. Drag the diagram to orbit and scroll to zoom.
0 of 2 saved messages delivered
A and B have each incremented once.
How the merge operation works
A and B each increment once, producing [1, 0] and [0, 1]. The merge keeps the larger number in each position, so their combined state is [1, 1].
Why delivery order does not matter
Each merge keeps the larger count in every position.
Duplicates do not change the result: merging [1, 1] with [1, 0] still gives [1, 1].