B2.4.1 · dive 1 of 3 · module B2.4
Archetypes are data.
An archetype is an entity in the ARC namespace whose value is a property bundle; an entity carries an archetype id plus overrides. Inheritance is a stored :extends pointer, not a class.
The idea
echo_data · bcs/archetypes.exAn archetype is not a class; it is an entity. It lives in the ARC namespace and its value is a property bundle — a plain map — that optionally names one parent through an :extends key. There are no behaviour modules and no hierarchy of code; inheritance is a stored pointer from one bundle to another, data all the way down.
An entity that uses an archetype carries two things: the archetype’s id and an overrides map of its own. The archetype supplies the shared defaults, the overrides carry what is particular to this one entity, and neither is baked into a type — both are values a store holds and a fetch returns. Reuse is a reference, not a subclass.
Codemojex models its kinds this way. A tile type is an ARC bundle; a power-up tile is a bundle that extends it; a placed tile is an entity carrying that archetype’s id plus the overrides for this square. Adding a kind is writing a bundle, not deploying code, so the set of types is data the game can grow at runtime.
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
- Helland — Life Beyond Distributed Transactions (CIDR 2007)entities as named data a system composes, not a hierarchy of code
- King — Announcing Snowflake (2010)the ARC id that names an archetype as an entity
- Erlang/OTP — the ets modulethe store a fetch reads archetype bundles from
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus