jonnify·bcs /bcs/codemojex/branded-systems/ids-are-the-keys

B7.1.1 · dive 1 of 3 · module B7.1

Branded ids are the keys.

Every Codemojex entity is a branded id minted by EchoData.BrandedId; the id is the primary key in Postgres and the address in every other layer, anchored by placement(USR0KHTOWnGLuC) = 234878118.

A branded id: minted, the key in Postgres, the address everywhere else. Select a part.
USR0KHTOWnGLuC3 letters and 11 base62 of a snowflake the primary key in Postgresone column, every table the address everywhere elsecache · bus · webplacement 234878118
readout · Select a part. A branded id is 3 letters and 11 base62 of a snowflake; it is the primary key in Postgres and the address in cache, bus, and web, anchored by placement 234878118.
§1

The idea

codemojex · the branded model

Every entity in Codemojex is a branded id, minted by the same EchoData.BrandedId the course has used throughout: three uppercase letters of namespace and eleven base62 characters of a snowflake, fourteen characters of text. The player is a USR and a PLR, the room a ROM, the game a GAM, a guess a GES, a payment an OTX — each kind named once, at its boundary.

That id is the primary key in Postgres: one column on every table, no separate surrogate and no join key invented for the database’s sake. It is also the address in every other layer — the cache key, the lane name, the leaderboard member, the value a channel sends — so a row, a cached entry, and a queued job all name the same thing the same way. The contract that makes this safe is the one proven at boot, placement(USR0KHTOWnGLuC) = 234878118, the same on every node.

The reference implementation leans on this in the direction the rest of the game depends on: because an id carries its kind, a system can gate what it accepts before it touches a tier, and two systems on two machines agree on what an id means without sharing a table. The branded id is the smallest unit of the architecture, and it is the key.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related