Three replicas of one document, joined by a network you can break. Each editor below is a full copy of a Fugue text CRDT. Cut a link, type on both sides, heal it: they converge, and concurrent typing comes out in one piece instead of interleaved.

Network

Click a link to cut or heal it. Dots are messages in flight.

The interleaving test

Ada goes offline. She and Ben both add an item to the end of the same list, one keystroke at a time, at the same moment. Then the network heals. A CRDT that interleaves merges the two items letter by letter; Fugue keeps each one whole. The same keystrokes also go to a deliberately naive CRDT, side by side.

Message log

newest first

    Fugue tree

    Read left to right and you get the document. Solid lines are right children, dashed ones left children; a box is a run typed in one go; faded letters are deleted.