Cap’n Web: session recovery

What a disconnect destroys

A Cap’n Web session over a WebSocket, with a button that kills it. The event stream resumes without a gap only because the client keeps a cursor of its own.

Session offline
Cursor --

Event stream

    Session log

      What to try

      1. Connect, and watch the event ids climb. Authentication and subscription happen in a single round trip, by pipelining.
      2. Sever the connection, wait a few seconds, then reconnect. The replay fills in exactly what you missed, because the client sent the id of the last event it actually processed.
      3. Untick Resume from cursor and do it again. Same disconnect, but now the feed shows a gap marker: the events happened and nobody asked for them.
      4. Call a stub from the old session after severing. It rejects. No stub survives its session, and nothing is silently re-established.