B2 · The Elixir BCS Core — manuscript Part II
The law, landed on OTP.
Part I argued; Part II builds. This is the manuscript's reference implementation of a system — the noun the law's first clause is about — on the platform where that clause is the language's native shape rather than a discipline imposed on it.
On the BEAM, a system is an OTP application: the supervision tree is the boundary, the owning process is the encapsulation, and restart semantics are part of the design rather than an accident of it. Each module below teaches one written chapter, its committed rung quoted verbatim on the page.
The six modules
content/bcs2.1.md – bcs2.5.mdA System Is an OTP Application
Boundary, supervision tree, ownership, restart semantics as architecture. The export list is the
boundary; existence is the supervisor's and data deliberately not. The rung reads PASS 5/5.
Property Stores on ETS
Three stores under one tree — AST, PRT, ORD — the
branded id the only key, chronology read off the keyspace without a column. The rung reads
PASS 5/5.
The CHAMP Property Database
Structural sharing as the snapshot mechanism, the contract hash as the trie's placement function,
the crossover against the flat table stated both ways. The rung reads PASS 7/7.
Archetypes and Composition
Property inheritance as data under the ARC namespace; the composite instrument without a
class diamond; composition at read time by a pure fold. The rung reads PASS 5/5.
Relations Are Systems
The edges store: tuple-keyed relations, both ends gated, dual private indexes; Codd's normalization
performed in a gate. The rung reads PASS 5/5.
Gates and Acceleration at the Boundary
Every ingress gated by namespace, the deferred persistence adapter, the native codec and the measured line where it pays. The manuscript plans this chapter; its rung is on file.
A module card becomes a link when its pages ship. The dives per module are fixed in the chapter spec; the reading order is the arc above. B2.6 waits for its manuscript chapter.
The floor under the floor
committed outputs, quoted verbatimPart II is manuscript-ready, and every written chapter is backed by a rung — an executable check script and a frozen transcript, committed beside the prose. The course inherits the ethic: a number that is not in a committed output does not appear on a page. The five rung records on file, each ending in its tally:
bcs_rung_2_1_check.out a system is an OTP application PASS 5/5 bcs_rung_2_2_check.out property stores on ETS PASS 5/5 bcs_rung_2_3_check.out the CHAMP property database PASS 7/7 bcs_rung_2_4_check.out archetypes and composition PASS 5/5 bcs_rung_2_5_check.out relations are systems PASS 5/5
Up next
built as the manuscript shipsThe Bus
Part III — EchoMQ, Valkey-native: the emq:{q}: keyspace, jobs as entities, the state
machine in Lua, backed by Valkey through the custom connector.
Cache, Go, Node, Fly, Trading
Parts IV–VIII — the near-cache, the Go and Node runtimes, production on Fly, and the trading capstone. The manuscript plans these chapters; the course builds them as the book ships.
Ideas Behind
Part I — the conceptual floor Part II stands on: the law, the contract, the storage economics, the ECS arc, the time inside the name, and the encode trial.
The doors
the sibling coursesEchoMQ — the protocol, in depth
The bus B3 narrates, taught rung by rung: the keyspace, the Lua inventory, conformance on Valkey.
/redis-patternsRedis Patterns Applied
The substrate patterns under the bus and the stores: sorted sets, atomic Lua moves, locks, streams.
/elixirFunctional Programming in Elixir
The Portal engine, and the umbrella where echo_data — the production identity library — lives.
References
sources · relatedSources
- Erlang/OTP — the supervisor behaviourrestart strategies, the one_for_one blast radius, start order and reverse shutdown
- Erlang/OTP — the ets moduleordered_set term order, match specifications, table protection levels
- Steindorfer & Vinju — Optimizing Hash-Array Mapped Tries (OOPSLA 2015)the two-bitmap CHAMP node B2.3 integrates
- Venners — Design Principles from Design Patterns (Gamma interview)composition over inheritance, the principle B2.4 gives a data-only form
- Codd — A Relational Model of Data (1970)relations as first-class, the normalization B2.5 performs in a gate
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- B1 — Ideas Behindthe conceptual floor Part II builds on
- EchoMQ — the coursethe far side of the B3 door
- Functional Programming in Elixirthe umbrella where echo_data lives