B6.1 · dive 1 of 3
One umbrella, four systems.
Four libraries — echo_wire, echo_data, echo_mq, echo_store — compose into one dependency-ordered tree that boots only after the identity contract proves itself.
The idea
echo · apps/*/mix.exs, echo_data/application.exThe course has built four libraries, and they compose into one tree. echo_wire is the wire — RESP framing, the single-owner socket connector, the script registry behind the version fence. echo_data is the id, the property stores, and the CHAMP forest. echo_mq is the bus, built on the wire and the data layer. echo_store is the cache and the floor, built on all three plus CubDB and exqlite. The dependencies point one way — wire ← data ← mq ← store — a closed set with no cycle, so the umbrella has a boot order and a deployment has choices.
Boot runs in dependency order, and the first thing that happens is a proof. echo_data seeds the Snowflake node into persistent_term and runs the contract self-check, comparing the native and pure code paths against the committed vectors; if they disagree, the application refuses to start. Nothing downstream mints an id, frames a key, or fills a cache until the name the whole system trades in has been proven trustworthy.
Each library is a system in the sense Part I gave the word: a boundary that owns its state and trades only in identities and messages about them. The umbrella is not a monolith with four modules; it is four systems that happen to deploy together, and the same code runs whether they share a node or sit on four. Putting it together is choosing which boundaries share a machine, not erasing the boundaries.
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 behaviourthe dependency-ordered tree the umbrella boots
- Erlang/OTP — the gen_server behavioureach library as a system: a process with a boundary and a mailbox
- King — Announcing Snowflake (2010)the node singleton seeded and proven at boot, keying every tier
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus