B7.4.2 · dive 2 of 3 · module B7.4
The total and thirty tiers.
The six position scores sum to a total from zero to six hundred, cut into thirty bands twenty points wide and ranked on a leaderboard held as a sorted set in Valkey by each player’s best total.
The idea
codemojex · the total and the tiersThe six position scores sum to the guess total, from zero to a maximum of six hundred when every emoji sits exactly right. That total is the unit everything downstream speaks in: it is what the leaderboard ranks and what a tier is cut from. A player’s standing is their best total, not their last, so a strong guess is never undone by a weaker one after it.
The zero-to-six-hundred range splits into thirty bands twenty points wide, and a total falls into one of them. Tiers turn a raw score into a readable rung — a player sees which band they reached and how far the next one is — and they give the live game its sense of progress without revealing anyone else’s guesses.
The leaderboard is held as a sorted set in Valkey, keyed by the game and scored by each player’s best total, so reading the top of the board or a player’s rank is a direct lookup. It is a derived view: the totals and the tiers recompute from the recorded guesses on Postgres, which remains the record of truth if the sorted set is ever rebuilt.
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
- Kreps — The Log: real-time data’s unifying abstractiona leaderboard and a settlement recomputable from the recorded guesses
- Helland — Life Beyond Distributed Transactions (CIDR 2007)the standings as a derived view, the recorded guesses as the record of truth
- King — Announcing Snowflake (2010)the branded id that keys a game’s leaderboard and a player’s rank
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus