B2.1.1 · dive 1 of 6 · module B2.1
The boundary is the export list.
A system’s public functions are its whole surface; the table is :private. Only a branded id and a message about it cross — never a reference to the state.
The idea
echo_data · bcs/property_store.exIn BCS a system is a module, and the module’s exported functions are the whole of its surface. EchoData.Bcs.PropertyStore exports put/3, get/2, window/3, page_desc/2, and placement/1 — and that list is the system. Everything else is private: the ETS table the store owns is opened :private, so no other process can read or write it, not even by accident.
The boundary decides what may cross, and only two things may. A branded id crosses — the 14-byte name that is the table’s only key — and a message about that id crosses: put this value, get that one, give me the window between these two. A reference to the state never crosses, because there is no reference to hand out; the state lives behind the export list, reachable only by asking the owner.
This is the Part I law made concrete in a single Elixir module. Codemojex draws the same line around a room: the room exports join, guess, leave — commands naming a player and a round — and never exposes its board. A caller plays the game by sending messages about ids, and the system that owns the board is the only thing that touches it.
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 behavioura system as a process: one mailbox, one private state, a message-only surface
- Erlang/OTP — the ets modulethe :private :ordered_set table a property store owns behind its boundary
- The Go Blog — Share Memory By Communicatingno shared state across a boundary: pass a message, never a reference
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus