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.

An unfolded field folio has separate pockets for a gate report, a stockpile record, and nested trail folders.
DDS Complexity Intermediate

SharedMap

Use one shared order to select a value for each name.

map_kernel

Alice 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
Open the SharedMap lesson
CRDT Complexity Intermediate

LWWMap

Compare the times beside each line to select a value.

lww_map_kernel

Each 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
Open the LWWMap lesson
CRDT Complexity Advanced

OR-map

New work survives a removal that did not see it.

or_map_kernel

Alice 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
Open the OR-map lesson
DDS Complexity Advanced

SharedDirectory

Track each folder separately when a name is reused.

directory_kernel

Alice 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
Open the SharedDirectory lesson
OT Complexity Expert

JsonOt

Keep concurrent changes to nested JSON paths and array positions.

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
Open the JsonOt lesson

Choose what happens when answers differ

NeedChooseCost
The ranger station numbers JSON changesSharedMapThe ranger station must stay available
Use clock times to select text valuesLWWMapRemember clocks and removals
New work survives removalOR-mapRemember which work each person saw
Folders can reuse namesSharedDirectoryTrack each folder separately
Concurrent edits change several JSON pathsJsonOtTransform pending and incoming operations