Keystrokes

One paragraph, everyone typing into it at once — inside the same word if you like. Open two or three windows and type in the same place: every keystroke travels the ephemeral channel as a small operation, each window renders the same set of operations in the same order, and the letters interleave the same way on every screen.

Nothing here is a CRDT. The paragraph stays one node; a keystroke is an insertion or a deletion at a position of the last snapshot the graph confirmed, ordered by its stamp. A pause writes the paragraph as a snapshot with db.put; the snapshot becomes the new base for every window, and if two snapshots cross, the engine keeps both. This is the mechanism an application adds where it needs keystroke-level interleaving — and only there.

On the right, the two layers as they happen: the channel keystroke by keystroke, the graph snapshot by snapshot, and a hash of the text every window shows — the proof that they agree.

The channel, keystroke by keystroke

    No keystroke yet.

    The graph, snapshot by snapshot

      No snapshot yet.

      What every window shows

        0 peers