Structure family
Maps
Registers kept one line each. Maps keep a page of named lines: the gate status, the bridge status, and the stockpile count. SharedMap lets the ranger station number every change, as RegisterMap did. LWWMap and OR-map drop the ranger: one compares the time beside each line, the other keeps new work that a removal did not see. SharedDirectory brings the ranger back to keep folders apart when names repeat. JsonOt rewrites concurrent edits so they fit one JSON document.
map_kernelAlice writes "Trail open" on the gate-status line. Bob writes "Trail closed" on his copy before he sees her note. The ranger numbers Bob's change last, so all three hikers use his answer on that line. Their bridge-status line is unchanged.
Best for
- Shared JSON settings numbered by the ranger station
- Named lines where the ranger can number every change
- Values
- JSON values and links to other shared data
- When answers differ
- Use the last numbered change for each line
- Removal
- Cross out one line or clear the notebook
lww_map_kernelEach hiker writes the time beside a changed line. They use the latest time for that line, even if an older note arrives later. They keep the time and writer's name with the answer or crossed-out line.
Best for
- Offline text settings that need one predictable winner
- Maps where clocks, not delivery order, define "last"
- Values
- Text
- When answers differ
- Later time; if tied, crossed-out line, then writer
- Removal
- Keep the crossed-out line and its time
or_map_kernelAlice crosses out the Eagle Creek stockpile line after she sees 5 crates. Bob records 3 more before he sees her change. When they compare notebooks, they keep the line and count all 8 crates because Bob added a new note.
Best for
- Named tallies and lists that combine new notes
- Records where new work must survive a crossed-out line
- Values
- Tallies, answers, or lists of names
- When answers differ
- Keep new notes the other hiker has not seen
- Removal
- Cross out only the notes already seen
directory_kernelAlice and Bob both make an Eagle Creek folder. The ranger treats them as one shared folder. If someone later removes it and makes another with the same name, old notes stay with the old folder.
Best for
- Shared project and document folders
- Folder trees where names can be reused
- Values
- Folders and named entries
- When answers differ
- Use the ranger's order and track each folder separately
- Removal
- Delete one specific folder
json_ot_kernel
Alice and Bob both insert a name at the front of one crew list while Carol changes a nested gauge reading. Each hiker's client transforms incoming and pending operations so all three changes fit the shared document.
Best for
- Collaborative JSON documents with nested paths
- Editors that show local changes before sequencing confirms them
- Values
- JSON objects, arrays, and scalar values
- When edits overlap
- Transform each operation against concurrent work
- Ordering
- The ranger station confirms the order of operations
Choose what happens when answers differ
| Need | Choose | Cost |
|---|---|---|
| The ranger station numbers JSON changes | SharedMap | The ranger station must stay available |
| Use clock times to select text values | LWWMap | Remember clocks and removals |
| New work survives removal | OR-map | Remember which work each person saw |
| Folders can reuse names | SharedDirectory | Track each folder separately |
| Concurrent edits change several JSON paths | JsonOt | Transform pending and incoming operations |