LWWSet
LWW-Set, short for Last-Writer-Wins Set, is a conflict-free replicated data type (CRDT) that implements a set with add and remove operations using last-writer-wins semantics. It enables replicas in a distributed system to converge to the same state without requiring centralized coordination, even in the presence of concurrent updates.
The standard LWW-Set is implemented with two timestamped stores per element: an adds map and a removes
Operations and merging are defined as follows. add(element, ts) updates the adds map with add_ts = max(add_ts,
Variations exist, most notably add-wins (the standard form) and remove-wins, which differ in how ties are resolved
LWW-Set is simple to implement and merge, but it relies on timestamp synchronization and can grow unbounded