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.
| Replica | Operation | Outcome |
|---|---|---|
| Alice | Remove observed 5-crate row | Observed identity retired |
| Bob | Add 3 crates concurrently | Unseen update retained |
| All | Merge | Eagle Creek ยท 8 |
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
Mechanism evidenceNo race delivered yet.
- 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.