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
CRDT
LWWMap
Per-key timestamps select values and tombstones.
lww_map_kernelThe 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
CRDT
OR-map
Concurrent work can survive removal of a key.
or_map_kernelAlice 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
DDS
SharedDirectory
A nested map with stable folder identities.
directory_kernelAlice 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
Choose the key conflict rule
| Need | Choose | Main cost |
|---|---|---|
| Server-ordered JSON | SharedMap | Sequencer dependency |
| Timestamp-selected strings | LWWMap | Clock and tombstones |
| Concurrent update survives delete | OR-map | Causal identities |
| Nested paths retain identity | SharedDirectory | Folder-instance metadata |