Structures

RegisterCollection

The ranger now keeps named status cells at the station. Alice and Bob submit before either sees the other. The station records both versions and lets each read choose a policy.

The station keeps both sequenced versions

A RegisterCollection stores named registers. Writes stay hidden until the sequencer accepts them. The collection retains competing versions so an atomic read and a latest read can return different answers.

SequenceReportRead effect
SN 1 · AliceTrail openAtomic winner
SN 2 · BobTrail closedLatest version
Both policies read the same retained history but answer different questions.

One trail-status field

Read the first winner or the latest version

Alice and Bob submit from the same reference point. The ranger sequences both, retains both, and exposes two read policies.

Conflict rule Atomic keeps the first uncontested write; latest keeps the greatest sequence number.

Alice

No status received

No status

Field note trail-status: Trail open sequence number assigned at ranger station

Bob

No status received

No status

Field note trail-status: Trail closed sequence number assigned at ranger station

Carol

No status received

No status

Field note No note in this race Carol observes delivery

Ranger sequencer Assigns sequence numbers 0 writes shared

Decision evidence No sequenced versions yet.

  1. No writes shared yet.

Enable JavaScript to run the demo. The race and expected result remain in the lesson.

Race two unconfirmed reports, then compare the atomic and latest reads.

The reader must name the policy

An atomic read returns Alice's first uncontested write. A latest read returns Bob's later sequence number. Neither answer is a merge of the reports, and neither exposes causal siblings like an MvRegister.

This is a sequenced distributed data structure, not a CRDT. If the sequencer is unavailable, new writes cannot receive the ordering evidence that both read policies require.

Sources and implementation

This lesson calls Watershed's RegisterCollection kernel for sequenced writes, remote application, atomic and latest reads, and version inspection.