Structures · Transforms

JsonOt

Transform concurrent edits to different paths in one JSON document.

Set the Eagle Creek problem first

Alice adds the report title while Bob adds its revision number.

Each person carries a json worksheet. When a person makes a change, they copy it onto a patch 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 json_ot_kernel uses this structure's rule to produce one shared result.

A JsonOt 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

JsonOt authored race

Alice adds the report title while Bob adds its revision number.

Watershed ruleEach operation transforms through concurrent operations before application.

Alice

JSON worksheet {}

Patch slip Set title path /title · value "field notes"

Bob

JSON worksheet {}

Patch slip Set revision path /revision · value 1

Carol

JSON worksheet {}

Patch slip Observe the document No slip in this race

Shared view
  • {}

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

Ready: {}

Read the result

Both disjoint path edits survive transformation.

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.