B2 · module 6 of 6 · Gates and Acceleration at the Boundary
Gates and Acceleration at the Boundary.
EchoData.Bcs.gate(id, ns) admits an id of one namespace and refuses the rest, adding no second parser; behind it, EchoData.Native accelerates the codec and hash with a Rust core and a pure-Elixir fallback, proven equal at boot.
Three dives: the gate that admits one kind, the native codec with its pure fallback, and the one contract proven at the boundary — the hot path of a live game.
The three dives
each a leaf, the teachingThe gate admits one namespace
Every 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…
A native codec with a pure fallback
The codec and the hash are the hot path — every id crossing a boundary is parsed, and many are hashed to place a key — so…
B2.6.3One contract, proven at the boundary
Two implementations of the same contract are only safe if they agree, so the boot proves it. The self-check mints, encodes, decodes, and hashes a…
The module, in one law
echo_data · bcs.ex, native.ex, branded_id.exB2.6 closes the core with the boundary itself. EchoData.Bcs.gate(id, ns) admits an id of exactly one namespace and refuses everything else — :namespace for the wrong kind, :invalid for the unparseable — adding no second parser beyond BrandedId.parse/1. Behind that boundary, EchoData.Native accelerates the hot codec and hash with a Rust core and a C shim, falling back to pure Elixir when the build is absent, and the boot self-check asserts both paths produce the committed vector before a node serves. Three dives: the gate that admits one kind, the native codec with its pure fallback, and the one contract proven at the boundary. Grounded in EchoData.Bcs, EchoData.Native, and EchoData.BrandedId, and pointed at the gated, accelerated hot path of a live Codemojex game.
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
- King — Announcing Snowflake (2010)the id the codec encodes and hashes, the same on every path
- The Go Blog — Share Memory By Communicatinga boundary that admits a message, never a reference
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus