B2.6.1 · dive 1 of 3 · module B2.6
The gate admits one namespace.
Bcs.gate(id, ns) admits an id of exactly one namespace and refuses the rest — :namespace for the wrong kind, :invalid for the unparseable — adding no second parser beyond BrandedId.parse/1.
The idea
echo_data · bcs.exEvery BCS system sits behind one function. EchoData.Bcs.gate(id, ns) parses an id once and admits it only if its namespace is the one the system declared: a match returns {:ok, snowflake}, another namespace returns {:error, :namespace}, and an unparseable id returns {:error, :invalid}. Two failure modes, named, and nothing admitted by accident.
The gate adds no second parser. Classification beyond the namespace collapses to :invalid, exactly as EchoData.BrandedId.parse/1 reports it, so there is one authority on what an id is and the gate defers to it. The property store, the edges store, the timeline — each crosses this gate before it touches a tier, which is why a malformed write is refused at the door rather than stored and discovered wrong on a read.
Codemojex puts the gate in front of every command. A move names a player and a room, and the room’s gate admits only its own kind on each end before the board is touched; an id from another namespace is turned away with :namespace, never written and never trusted. The boundary the whole course has described is, in the end, this one call.
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 gen_server behaviourthe process boundary the gate stands at
- The Go Blog — Share Memory By Communicatinga boundary that admits a message, never a reference
- Helland — Life Beyond Distributed Transactions (CIDR 2007)a contract entities agree on across nodes and builds
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus