Gset
GSet, short for Grow-only Set, is a simple conflict-free replicated data type (CRDT) that models a set of elements in distributed systems where only additions are allowed. The state of a GSet is a set of elements, and the sole mutating operation is add(x), which updates the state to S ∪ {x}. A membership query simply checks whether an element is contained in the current state.
In a distributed environment, two replicas with states S1 and S2 can be reconciled by merging them,
Because deletions are not supported, a GSet is inherently monotonic: elements, once added, cannot be removed.
Implementation and usage notes: a GSet can be implemented as a normal set data structure on each