jonnify·persistence /echo-persistence/platform/the-door-to-bcs

Module 15 · Chapter IV — The platform · the finale

The door to BCS.

Thirteen modules built a durable floor: a versioned log, an L1 read cache, newer-wins coherence, replication, a bus — all keyed by one 14-byte branded id. That floor was never the point; it was the threshold. Step through it and the same primitives stop being plumbing for a queue and become the substrate for a way of building systems — the Branded Component System: entities are identities, components are data, and a system is a process that lets only identities cross its boundary. This module walks the door, and shows Codemoji standing on the other side.

One substrate, three storeys. The durable floor of EP1–13 — commit log, EchoStore.Table, newer-wins coherence, all keyed by branded id — is the foundation. BCS builds on it: entities = ids, components = data, systems = processes. The codemojex apps ride BCS. Tap a storey.
codemojex apps Broadcast · BTP / BCA / BDV / RGP · rounds, ladders, payments BCS · Branded Component System entities = branded ids · components = data · systems = processes (the law) the door the durable substrate · EP1–13 Graft commit log · EchoStore.Table (L1 ETS) · Coherence (newer-wins) — everything keyed by one 14-byte branded id {ns}{base62} — builds on rides
readout · the whole course built the bottom storey. This module is the door in the middle: the substrate’s durable, coherent, id-keyed state is exactly what a component system needs — and the apps sit on top. Tap a storey to see what it contributes.
§1

From plumbing to substrate

table.ex · coherence.ex

Look back at what the durable floor actually produced, and notice that none of it is queue-specific. A versioned commit log (Chapter III) gives every value a durable, replicated history. An L1 read cache, EchoStore.Table on ETS, gives lock-free reads of the current head. Coherence, EchoStore.Coherence, keeps that cache correct with a newer-wins rule whose version is the 14-byte branded id — because a branded id sorts lexicographically in mint order, “newer” is just “greater id,” and the cache update is “a message about a name.” Set those three side by side and they describe a general capability: durable, replicated, coherent state, addressed by identity, read without locks. That is not the description of a job queue; it is the description of a place to keep any system’s state. The queue was simply the first thing the platform built on it — the load-bearing proof that the floor holds. Everything past this point treats the floor as a given and asks a different question: if state is this cheap to keep and this safe to share, what is the right shape for the systems that keep it? The answer the platform commits to is BCS.

§2

The three ideas of BCS

mesh.8.1 · echo_data/bcs

The Branded Component System is the successor to the Entity-Component-System pattern, re-centred on the branded id, and it is exactly three ideas. Entities are identities: a thing is a 14-byte branded id, {ns}{base62}, and nothing more — no embedded record, just a name that sorts by birth. Components are data: an entity’s state is plain property bundles, never behaviour modules, so an archetype is itself just data (an ARC entity whose value is a bundle, optionally extending one parent via :extends, composed at read time as a right-most-wins fold). Systems are processes: a system owns its private state, gated on a namespace, and the only values that cross its boundary are identities and messages about identities — the law (mesh.8.1). That law is why a relation like “portfolio holds asset” is a row keyed by the pair of names in an owning EdgeStore, never an id list embedded in either endpoint; and why an audience is referenced by an RGP id, never copied inline. Read against Chapter 13, the fit is exact: the substrate already stores state by branded id and already speaks in “messages about a name” for coherence, so BCS is not a new runtime on top of the floor — it is the discipline the floor was shaped for. The three dives walk these in turn, and then stand Codemoji on them.

§3

The three dives

module 15
§4

Where to go from here

fin · the course is complete
§5

References & sources