B1.4 · From ECS to BCS — manuscript chapter 1.4
Translation, not re-education.
ECS is the lingua franca of an entire industry, and its key is a refined artifact: the index-handle with a generation counter. This module is what happens when that artifact meets a save file, a socket, and a foreign store — each death traced to a missing property of the identity contract. BCS keeps everything ECS got right and completes the one thing it left local — the migration is a promotion of the id, not a rejection of the pattern.
The chapter is content/bcs1.4.md. ECS discovered two of the three BCS clauses on its own, inside one process; distribution is where the undiscovered third presents its bill.
Translate, do not re-educate
content/bcs1.4.md · WhyEngineers arrive at distributed systems fluent in ECS — and the trading platform this series builds is the distributed case in full: positions, orders, and risk envelopes spread across processes, machines, and stores, with identities expected to outlive all three. A chapter that translates is worth more than a chapter that re-educates.
Part I closes by paying the preface’s oldest debt. The historical arc ended in 1998 with the entity reduced to a join key and the key itself nobody’s job; the quarter-century since built the pattern into doctrine and the key into a refined artifact. The argument here is sympathetic by design — the first dive states the handle at its strongest before the second names its deaths.
The diagnosis, in one figure
content/bcs1.4.md · quoting bcs_rung_1_1_check.outA handle is placement and liveness wearing identity’s clothes. The contract separates what the handle fused — and two of its answers are already on stage in the committed rung transcript:
G4 ordered ok -- page_desc(2000) == byte-sort desc over 2000 minted ids; store holds no clock G5 placed ok -- placement(USR0KHTOWnGLuC) -> 234878118
Placement is derived, never embedded — hash32 computes the slot from the name,
234878118 for the reference id, at 0.9586 nanoseconds in pure Go.
Liveness-by-detection becomes uniqueness-by-prevention — the minting law never reuses a name, and the
substrate paged two thousand mints in exact byte-sort order with no allocator and no free list. And the
kind rides in the value and the type, so the silent join dies at the gate: the measured row reads
200 / 400 / 400 / 404, wrong kind refused before any handler. What remains in the name is
exactly what a name should carry — kind and instant — at 65 bytes per key on the measured table.
The dives
three lessons, fixed by the chapter specThe Handle at Its Best
Weissflog’s 2018 discipline — the sole owner, private arrays, generation-counted handles — and West’s 2007 confession. Two clauses, discovered inside one process.
B1.4.2The Three Deaths
The save file, the socket, the foreign store — each scope violation named and traced to the missing contract property.
B1.4.3The Translation Table
Entity → identity and the rest of the convention of record; the litmus question; hybrids legitimate strictly behind the boundary.
Keep classic ECS where it is the right tool — one process, a frame loop, identities that may die with the run. The litmus is a single question: must this id outlive the process? The first yes — the first save, the first socket, the first row — is the migration moment, and it arrives on day one for anything trading-shaped.
References
sources · relatedSources
- West — Evolve Your Hierarchythe founding component article; the five-percent confession
- Weissflog — Handles are the better pointersthe modern discipline; the per-slot generation counter
- Wikipedia — Entity component systemthe pattern as doctrine; the vocabulary the table translates
Related
- B1 — Ideas Behindthe chapter landing; the Part I arc
- BCS — the course homethe law, the id anatomy, the chapter map
- EchoMQ — the coursethe bus the world becomes — Part III’s subject, taught in depth
- Functional Programming in Elixirthe umbrella where echo_data lives