B7 · module 3 of 6 · Guesses on Fair Lanes
Guesses on fair lanes.
A guess is six codes, validated and guarded by a short-lived lock, charged on the room’s currency path under an all-pay rule, then enqueued as a branded job on the player’s lane and served in rotation to one score worker that the host never bypasses.
Three dives: the guess and the lock, charged then enqueued, and fair lanes and the worker that broadcasts a result in a live room and withholds it in a blind one.
The three dives
each a leaf, the teachingThe guess and the lock
A guess is six codes in fixed positions, and before anything else it is checked: six of them, distinct, each addressing a cell in the game’s…
B7.3.2Charged, then enqueued
A move is charged before it is queued, not after it is scored. The reference implementation debits the player’s wallet on the room’s…
B7.3.3Fair lanes and the worker
Each player has a lane, named by their PLR id, and the bus serves the lanes in rotation rather than draining one to the bottom. A…
The module, in one law
codemojex · the play pathB7.3 is the play path: how a guess becomes a scored result without the player ever holding the secret. A guess is six codes, validated against the game’s emoji set and guarded by a short-lived Valkey lock so one move charges once. It is charged on the room’s currency path inside a transaction — an all-pay rule, paid per attempt regardless of outcome — and only then appended as a branded job, carrying ids and the guess but no score and no secret, to the player’s lane. The bus serves the PLR lanes in rotation behind a starvation gate; the host never scores; one score worker reads the cached secret, computes the result, and records it. In a live room a scored event broadcasts at once; in a blind room the worker stays silent and the bank accrues until the close. Three dives: the guess and the lock, charged then enqueued, and fair lanes and the worker.
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 abstractionthe lane as an append-only log a single consumer drains in order
- All-pay auctions — every bid is paid, the standings decide the prizethe charge-per-attempt that funds the bank and curbs throwaway guesses
- The Go Blog — Share Memory By Communicatingthe worker consuming a job by message, holding no shared state
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus