B7 · module 1 of 6 · The Game as Branded Systems
The game as branded systems.
Every Codemojex entity is a branded id that is the primary key in Postgres and the address in every other layer; the game stands on four layers, with money and the secret on the floor and a privacy line a player never crosses.
Three dives: the branded id as the key, the four layers and who owns what, and the privacy boundary across the classic and the blind mode.
The three dives
each a leaf, the teachingBranded ids are the keys
Every entity in Codemojex is a branded id, minted by the same EchoData.BrandedId the course has used throughout: three uppercase letters…
The four layers
Codemojex stands on four layers, and each keeps the job the course gave it. The floor is Postgres: the record of truth for money, for a game’s…
B7.1.3The privacy boundary
A Codemojex player sees three things about a game: their own attempt history with scores, their best score, and the leaderboard ranked by best score.…
The module, in one law
codemojex · the branded model and the four layersB7.1 sets the model the rest of the chapter builds on. Every entity in Codemojex is a branded id minted by EchoData.BrandedId — USR, PLR, ROM, RMP, GAM, GES, EMS, RSC, TXN, BNK, and the commerce, growth, and analytics kinds — and that id is the primary key in Postgres and the address in every other layer, anchored by the one contract proven at boot, placement(USR0KHTOWnGLuC) = 234878118. The game stands on four layers: a Postgres record of truth for money, the secret, and state; an EchoStore cache of what is immutable for a game; an EchoMQ tier for the real-time work; and a Phoenix surface behind privacy-safe views. The boundary a player never crosses — the secret and other players’ guesses, and in a Golden Room even their own score until reveal — is enforced where state lives. Three dives: the branded id as the key, the four layers and who owns what, and the privacy boundary across both modes.
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
- King — Announcing Snowflake (2010)the snowflake the branded id encodes, the same on every node
- Helland — Life Beyond Distributed Transactions (CIDR 2007)entities keyed by id, and a record of truth a game can audit
- Kreps — The Log (LinkedIn Engineering)the queues and streams the real-time tier is built from
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus