Structure family

Maps

The ranger turns the Eagle Creek reports into a field record with named keys. Alice, Bob, and Carol now need rules for conflicting values, removed entries, and folders that can disappear and return.

DDS

SharedMap

Server order selects one value per key.

map_kernel

Alice writes gate-status = Trail open. Bob writes Trail closed before he sees her update. The ranger's sequencer places Bob's operation last, so every map keeps Bob's value.

Best for

  • Shared JSON settings under one sequenced service
  • Keys where server-order last-write-wins is acceptable
Values
JSON and supported handles
Conflict rule
Greatest sequence number per key
Removal
Delete or clear
Open the SharedMap lesson

CRDT

LWWMap

Per-key timestamps select values and tombstones.

lww_map_kernel

The same key can produce a different selected value when its timestamp differs from server order. Each key retains the winning value or tombstone with its clock and writer evidence.

Best for

  • Offline string settings with deterministic winners
  • Maps where clocks, not the relay, define “last”
Values
Strings
Conflict rule
Timestamp, tombstone, then writer ID
Removal
Retained timestamped tombstone
Open the LWWMap lesson

CRDT

OR-map

Concurrent work can survive removal of a key.

or_map_kernel

Alice removes the Eagle Creek stockpile after observing 5 crates. Bob concurrently records 3 more. Alice cannot remove Bob's unseen identity, so the stockpile remains with all 8 crates.

Best for

  • Keyed ledgers and nested CRDT values
  • Maps where concurrent update must beat removal
Values
Tallies, registers, or string sets
Conflict rule
Observed-remove, add-wins
Removal
Tombstone observed key identities
Open the OR-map lesson

DDS

SharedDirectory

A nested map with stable folder identities.

directory_kernel

Alice and Bob both create an Eagle Creek folder. The directory merges the concurrent creates into one path. Stable folder identity also prevents stale edits from attaching to a later replacement.

Best for

  • Collaborative project and document trees
  • Nested state where path names can be reused
Values
Nested folders and map entries
Conflict rule
Sequenced values plus stable folder identity
Removal
Delete a specific folder instance
Open the SharedDirectory lesson

Choose the key conflict rule

NeedChooseMain cost
Server-ordered JSONSharedMapSequencer dependency
Timestamp-selected stringsLWWMapClock and tombstones
Concurrent update survives deleteOR-mapCausal identities
Nested paths retain identitySharedDirectoryFolder-instance metadata