jonnify·bcs /bcs/together/the-write-path

B6.2 · dive 2 of 3

One write, all the way down.

A write begins at a system’s store and fans out through a transactional outbox — record, enqueue on a lane, mark — rides an atomic Flow, and ends durable and announced.

A store write through the outbox, a lane, a flow, to the floor. Select a part.
a system’s storeput(id, value, version) EchoStore.Journal — the transactional outboxrecord intentenqueue on busmark enqueuedreplay covers every crash window; the bus dedups a re-enqueue Lanes.enqueue · a Flow lands parent+children atomicallythe floor persists · coherence invalidates the cache
readout · Select a part. A write begins at a system’s store, records intent in a transactional outbox, enqueues on a lane via an atomic Flow, and ends durable on the floor.
§1

The idea

echo_store · journal.ex · echo_mq · flows.ex, lanes.ex

A write begins inside one system, at its store: a put of a value under a branded id and a mint-time version. If that were the whole story, persistence would be a single call. But a real write fans out — it must settle work on the bus and survive a crash between the two — and that is what the rest of the path is for.

The seam is a transactional outbox. EchoStore.Journal records the writer’s intent, enqueues the job on a lane, and marks it enqueued; every crash window between those three steps is covered by replay, and the bus deduplicates a job that replay re-enqueues. The bus itself stays on Valkey, fast and volatile, while only the low-volume intent lands in the journal — so durability is a small, mostly idle dependency, not a tax on every step.

Multi-step work travels as a flow, and a flow is atomic. EchoMQ.Flows lands a parent and its children on one slot in one operation, so either the whole flow is enqueued or none of it is; the parent is held back until its last child completes. Settlement rides a lane, never an ungrouped enqueue, so a draining consumer always finds it. When the work is done the floor has the bytes and coherence has invalidated the cache by the same version — one write, made durable and announced, all the way down.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related