Expand description
The authority: one process that owns the document, sequences every commit by arrival, and broadcasts the result.
The concurrency story is one sentence: one task writes. It owns the
folded document, the log, and the fanout, and every socket reaches it
through a single channel. That is what makes rev assignment total
without a lock, and what lets Welcome be served from the same task
that appends, so no commit can fall between the snapshot of the log and
the start of a subscription.
Modules§
- store
- The durable log: one append-only table, written by the single-writer task and nobody else.
- writer
- The single-writer task: the only thing that folds, mints revs, and appends. Everything else — connections, sockets, framing — talks to it through one channel, so rev assignment and persistence cannot race without any locking to get wrong.
Functions§
- connection 🔒
- One connection: a pump forwarding the writer’s messages to the socket, and this loop forwarding the socket’s submissions to the writer.
- serve
- Errors
- start
- Open the log, fold it, and start the writer task.
- upgrade 🔒
Type Aliases§
- Writers 🔒