Client A
0 pendingWent well
add-wins notes · signed vote tally
← watershed · Build guide / Step 03
Add notes from both tabs at the same instant and confirm both appear.
Surface sluice · or_map_set_json · or_map_entries
Open the board in two tabs. In each one, type a different note into Went well and click Add in both at the same moment.
Both notes show up, in both tabs, in the same order. Nothing is lost.
Notes are keyed by note id in an OR-map, so two adds write two different keys — there’s nothing for them to collide over.
Store the board as a plain map keyed by column instead, and you’d get one note back, not two: a map with one key per column has one slot per column, so the second note overwrites the first — that’s what “last write wins” means. Keying by note id means there’s no shared slot to overwrite.
Two watershed documents connect to the in-memory sluice. Click the add button to send one note from each
board at the same time.
Magenta marks an edit that is waiting for the server. Once the server accepts it, the note turns black on both boards. Both notes remain.
add-wins notes · signed vote tally
add-wins notes · signed vote tally
Converged all replicas identical · nothing pending
Reset restores the starting board.
The live race couldn’t start: it runs two real watershed
documents against the in-memory sluice as compiled JavaScript,
and this browser didn’t load it. The rest of the page works fine without
it.