B2.2 · dive 1 — the only key
The branded form is the only key.
Three stores under one tree hold the desk's rows — AST instruments, PRT balances, ORD orders — and every key in every table is the 14-byte branded form. The same snowflake rendered as a decimal string is refused at the boundary: :invalid, on read and on write.
Source: content/bcs2.2.md, quoting bcs_rung_2_2_check.out (lines boot, P1, P2); the store is property_store.ex.
{name, namespace} pair.The transcript
bcs_rung_2_2_check.out · lines boot, P1–P2 · verbatimboot: three system tables under one tree -- AST instruments, PRT balances, ORD orders P1 shape ok -- instrument and balance rows live behind their own boundaries; values are private representations P2 key ok -- the branded form is the only key: the same snowflake's decimal rendering refused as :invalid
P1 boots the three stores and writes domain rows behind their own boundaries — an
instrument with its tick size, a balance with its cash — and the gate line states the part's quiet rule:
values are private representations. P2 takes the instrument's own snowflake, renders it as the 19-digit
decimal, and offers it back — refused as :invalid, on both read and write.
The third door closed
content/bcs2.2.md · WhatThe key law is now enforced at every layer the series has measured:
Chapter 1.3
The store charges more for the decimal — the keyspace economics measured against the branded form.
Appendix 1.1
Every compiled runtime renders the decimal slower — the encode trial's verdict across the runtimes.
This chapter
The boundary refuses it outright — :invalid, on read and on write, before the table
is touched.
The same name, two renderings
contract.md vectors · property_store.ex gate pathThe contract's canonical vector binds the pair:
encode("USR", 274557032793636864) = "USR0KHTOWnGLuC" — one snowflake, two renderings. The
model below presents both, on both verbs, to a store admitting USR, through the same gate
path the real store runs — the get and put callbacks both pass the id through
Bcs.gate(id, s.ns) before the table is touched.
{:error, :invalid} on both, and the table is never touched. The
verb does not matter: the gate runs before lookup and before insert.The label on the interim
content/bcs2.2.md · DecisionsThe interim representation is declared. The balance's embedded positions map ships labeled as pre-relational, with its supersession chapter named — drift is a representation that outlived its label, and this one cannot. Keep entity-embedded maps only while the pairs they encode have no traversal needs of their own; the moment who holds this asset becomes a question, the pair is a relation, and Chapter 2.5 owns it.
Saying the supersession in advance is what keeps it an amendment rather than a surprise — the same discipline the review dive reads on the export surface.
References
sources · relatedSources
- Erlang/OTP — the ets moduleprotection levels; ordered_set term order — the table behind each boundary
- Erlang/OTP — the supervisor behaviourthe one tree the three stores run under
Related
- B2.2 — Property Stores on ETSthe module hub; the full rung in context
- B2 — The Elixir BCS Corethe chapter landing; the Part II arc
- BCS — the course homethe law, the id anatomy, the chapter map
- Redis Patterns Appliedthe storage economics under the keyspace