Structures · Coordination
TaskManager
Queue volunteers for one role and promote the next connected client.
Set the Eagle Creek problem first
The ranger needs one dispatcher and a known replacement if that hiker disconnects.
Each person carries a duty roster. When a person makes a change, they copy it onto a volunteer 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 task_manager_kernel
uses this structure's rule to produce one shared result.
A TaskManager 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
TaskManager authored race
The ranger needs one dispatcher and a known replacement if that hiker disconnects.
Watershed ruleA FIFO volunteer queue assigns one client and preserves failover order.
Alice
Duty roster dispatcher: unassigned
Volunteer slip Volunteer volunteer Alice · FIFO position pending
Bob
Duty roster dispatcher: unassigned
Volunteer slip Volunteer volunteer Bob · FIFO position pending
Carol
Duty roster dispatcher: unassigned
Volunteer slip Volunteer volunteer Carol · FIFO position pending
- dispatcher: unassigned
Enable JavaScript to run the race. The expected result remains in the lesson.
Ready: dispatcher: unassigned
Read the result
Alice is assigned. Bob is first in the failover queue.
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.