Indexing the archive…
Your Universe of Digital Possibilities
Three phones, one shopping list, no signal. Each edits its own copy and syncs when it can, by a join that never cares about order: the larger tally, the union of the tags, every letter kept by its id. Cut the links, duplicate the syncs, slow a clock — after every heal the phones agree, and not one edit is lost. No leader, no vote.
If the merge of two replicas’ states is commutative, associative and idempotent, then the order of syncs, their grouping and their repeats cannot matter: any two replicas that have received the same updates hold the same state. That is strong eventual consistency, and it needs no leader, no vote and no round of agreement.
Each replica counts only its own increments (P) and decrements (N). Merging takes the larger tally for every replica, so a sync heard twice adds nothing and two offline phones’ +1s both survive.
Every add carries a fresh tag; a remove tombstones only the tags its replica has seen. So an add the remover never saw survives a concurrent remove — the item stays, and no one’s edit is undone by an edit that did not know about it.
Keep the version with the newest timestamp (ties broken by replica) and drop the other whole. It is a join too — a maximum under a total order — so the replicas converge. They converge on one writer’s state, and every concurrent edit that was not in it is gone; a phone whose clock runs slow loses nearly every time.
One counter per process instead of one in all. Each process ticks its own entry and takes the component-wise maximum of every stamp it receives; then a happened before b exactly when every entry of V(a) is at most V(b)’s — causality, captured both ways.
The Term keeps one log by electing a leader and counting majorities; The Merge keeps every edit by needing no agreement at all — only a merge that does not care about order. The Clock’s vector timestamps reappear as version vectors (what each copy has seen), Lamport’s clock orders the letters, and The Snapshot next door records a state nobody saw; here, every phone holds one, and they all end up the same. The bill is paid in metadata, not in messages waiting for a quorum.