Structures

OR-map

The ranger's map now stores an Eagle Creek stockpile tally. Alice removes the row she observed while Bob records a delivery that she has not seen.

Removal targets an observed key identity

An OR-map applies observed-remove semantics to keys. Alice can remove the stockpile identity she saw. Bob's concurrent tally update includes unseen identity evidence, so the key remains.

ReplicaOperationOutcome
AliceRemove observed 5-crate rowObserved identity retired
BobAdd 3 crates concurrentlyUnseen update retained
AllMergeEagle Creek ยท 8
The retained tally includes all logged crates even though the row was concurrently struck.

Three field maps

Protect a concurrent stockpile update

Start with 5 crates. Alice removes the observed row while Bob logs 3 more. Merge the identities and tally state.

Conflict rule Observed removal loses to an unseen concurrent update.

Alice

Baseline received

Eagle Creek
5

Map-edit slip Remove Eagle Creek remove the observed key identity

Bob

Baseline received

Eagle Creek
5

Map-edit slip Eagle Creek tally: +3 nested counter update

Carol

Baseline received

Eagle Creek
5

Map-edit slip No slip in this race Carol observes delivery

Trail exchange Identity metadata retained after merge 0 operations shared

Mechanism evidenceNo race delivered yet.

  1. No operations shared yet.

Enable JavaScript to run the demo. The race and expected result remain in the lesson.

Eagle Creek starts with 5 supply crates. Race removal against a concurrent delivery.

The nested value still needs a rule

Watershed OR-maps can hold tallies, last-writer registers, multi-value registers, or string sets. One channel uses one fixed mode. The map protects key identity; the nested CRDT decides how values combine.

Sources and implementation

The demo uses the tally mode of Watershed's OR-map kernel.