Structure family

Registers

The beacon list is settled, but the ranger still needs one answer: is the Eagle Creek trail open? Alice, Bob, and Carol discover that one shared field still needs a rule for concurrent reports.

CRDT

LWWRegister

One deterministic winner selected by timestamp and author.

lww_register_kernel

Alice reports Trail open while Bob reports Trail closed. A last-writer-wins register keeps one value. The greater timestamp determines the value; equal timestamps use the writer ID as a stable tie-breaker.

Carol receives the reports in either order and still chooses the same value. The cost is hidden disagreement: the losing report is discarded.

Best for

  • Small settings where one deterministic answer is required
  • Values whose clock policy is trusted
Updates
Timestamped string writes
Merge rule
Greatest timestamp, then writer ID
Metadata
Value, timestamp, and author
Open the LWWRegister lesson

CRDT

MvRegister

Keep concurrent answers until someone observes and resolves them.

mv_register_kernel

The ranger cannot safely discard either trail report. The multi-value register keeps Alice's and Bob's concurrent answers as siblings. Carol sees the disagreement instead of a silent winner.

After Carol inspects the bridge, her next write can replace the alternatives she observed. An unseen report would still survive.

Best for

  • Reviews where a person must resolve concurrent answers
  • Values where losing a valid report would be harmful
Updates
Causally tagged writes
Merge rule
Keep concurrent siblings
Metadata
Alternatives plus causal context
Open the MvRegister lesson

DDS

RegisterCollection

Retain sequenced versions and choose a read policy later.

register_collection_kernel

Alice and Bob submit reports before either sees the other. The ranger's sequencer stores both versions. An atomic read keeps the first uncontested write; a latest read returns the greatest sequence number.

The collection does not merge by timestamp or preserve causal siblings. It retains sequenced versions so the caller can choose between two server-ordered read policies.

Best for

  • Named cells that need atomic or latest reads
  • Sequenced collaboration where retained versions matter
Updates
Non-optimistic sequenced writes
Read rules
Atomic or latest sequence number
Metadata
Retained values and sequence numbers
Open the RegisterCollection lesson

Choose what disagreement means

NeedChooseTrade-off
One clock-selected winnerLWWRegisterDiscard the losing write
Preserve concurrent answersMvRegisterRequire later resolution
Choose a server-ordered readRegisterCollectionRequire a sequencer