B2.1.3 · dive 3 of 6 · module B2.1
The supervisor owns existence, not data.
The supervisor owns lifecycle; the system owns its private state. A restart yields a fresh, empty process that rehydrates from the store and the floor, by id.
The idea
echo_data · bcs/supervisor.ex, property_store.exA supervisor owns one thing and deliberately not another. It owns existence — when a child starts, when it restarts, when it shuts down — the lifecycle of the process. It does not own the child’s data: the private ETS table belongs to the GenServer, not to the supervisor, and the supervisor neither reads it nor restores it. Existence and state are split on purpose.
The split is what makes restart safe. When a store crashes and the supervisor brings back a fresh process, that process starts with an empty table — the supervisor did not, and must not, carry the old state forward, because the old state is exactly what may have been corrupt. Durable state is recovered from below, not from the supervisor: the system rehydrates from the store and the floor, which are the things designed to survive a process.
Codemojex makes the recovery visible. A restarted room is a brand-new process with an empty board, and its durable state — the round, the scores, the wallet — is rehydrated from EchoStore and the persistence floor of B5, keyed by the room’s branded id. The supervisor guarantees the room exists again; the store and the floor guarantee it remembers. Existence is the supervisor’s; memory is the system’s.
The doors
the sibling coursesEchoMQ — the protocol, in depth
The bus B3 narrates, taught rung by rung: the keyspace, the Lua inventory, and the 3.0 Stream Tier — XADD, XREADGROUP, XACK — with conformance on Valkey.
Redis Patterns Applied
The substrate patterns under the bus: sorted sets, atomic Lua moves, locks, and streams — the judgement layer.
/echo-persistenceEcho Persistence — the durable floor
Beneath the volatile tiers: the Graft page engine built twice, the commit-LSN loop, and the stream archive on Tigris. Where Part I says state lives somewhere, this says where it lives durably.
References
sources · relatedSources
- Erlang/OTP — the supervisor behaviourone_for_one over named stores: the tree that owns a system's existence
- Erlang/OTP — the ets modulethe :private :ordered_set table a property store owns behind its boundary
- Helland — Life Beyond Distributed Transactions (CIDR 2007)durable entities a restarted system rehydrates by name
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus