B1.3 · dive 3 of 3
From ECS to BCS.
The index-handle’s three deaths — the save file, the socket, the foreign store — each a missing contract property, and the short translation that repairs them.
The idea
the ECS arc · the translationThe Entity-Component-System pattern was right to give each system a clean boundary, and incomplete in what it let cross: a process-local integer index. That index is a fine handle while the process lives, and it dies three times the moment it leaves.
It dies at the save file, because an index means nothing after the process that issued it exits. It dies at the socket, because an index on one machine names a different row on another. And it dies at the foreign store, because a database has nothing to hold or order it by, and no type to catch a join against the wrong table. Each death is the absence of a contract property: stability past the process, one identity scheme across machines, a printable ordered key a store can keep.
The branded id fills each gap — minted once and never re-derived, unique across machines by its node bits, printable and ordered for a store to hold — so the move from ECS to BCS is a short translation. An entity becomes a branded id; a component becomes a property row keyed by that id; a system becomes a process owning those rows behind a namespace gate. The pattern keeps its boundary and gains a value strong enough to leave 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
- Leonard — Postmortem: Thief: The Dark Projectthe Dark Object System: properties and relations over object handles
- King — Announcing Snowflake (2010)the node-and-sequence layout that makes the id unique without coordination
- Erlang/OTP — the ets modulethe per-system table the component row lands in
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus