Structures · Sequences

SharedSequence

Reorder one route without making concurrent index edits fight.

Set the Eagle Creek problem first

Alice and Bob revise the ranger's ordered inspection route before either receives the other edit.

Each person carries a route card. When a person makes a change, they copy it onto a insertion slip with the identity, path, sequence, or acceptance evidence that the rule needs. The demo shows both the local record and the note that travels.

An ordinary local edit names a position or value. That name can become stale while another client works. Watershed's sequence_kernel uses this structure's rule to produce one shared result.

A SharedSequence applies this rule to the shared record.

Run the conflict

Alice and Bob act before either receives the other operation. Carol stays connected as the third replica and confirms the converged view.

Three Eagle Creek clients

SharedSequence authored race

Alice and Bob revise the ranger's ordered inspection route before either receives the other edit.

Watershed ruleClients refer to stable item identities when they insert or move items at changing indexes.

Alice

Route card Bridge · Weir · North gate

Insertion slip Insert Falls before Weir Falls identity A:1 · anchor Weir

Bob

Route card Bridge · Weir · North gate

Insertion slip Insert Marsh before Weir Marsh identity B:1 · anchor Weir

Carol

Route card Bridge · Weir · North gate

Insertion slip Observe the route No slip in this race

Shared view
  • Bridge
  • Weir
  • North gate

Enable JavaScript to run the race. The expected result remains in the lesson.

Ready: Bridge · Weir · North gate

Read the result

Both waypoints survive at one logical gap, in deterministic identity order.

The demo models the authored race from Watershed's public structure examples. The lesson keeps the conflict rule visible before exposing its metadata or protocol.