jonnify·redis /redis-patterns

A jonnify course

Redis Patterns,
Applied.

The judgement layer above the command reference — thirty Redis design patterns, each shown working in a real system. Taught as problem → solution → trade-off → when-to-use, then shown where the BCS architecture applies it.

The running system: EchoMQ backed by Valkey, Valkey under the hood, EchoStore in front. The worked examples are real keys, commands, and atomic Lua scripts — quoted verbatim from committed records, not plausible ones.

cache queue stream
§1

How to read this

the running system: the BCS build

Each chapter teaches a family of Redis patterns. A pattern is a single unit: the problem it solves, the Valkey structures and commands that solve it, the trade-off it accepts, and the workload it fits. The claim of the course is that knowing the commands is not enough — the same engineer reaches for a single-node “distributed lock” a failover silently breaks, or a fixed-window rate limiter with a boundary burst. The fix is grounding: every pattern is shown applied in a real system, so the worked example is verifiable.

The running system is the BCS build. EchoMQ is the bus between systems, and it owns its protocol: the braced emq:{q}: keyspace, every Lua key declared or root-derived, the wire version echomq:3.0.0 behind a two-way typed boot fence — backed by Valkey, the current stable line, an enforced conformance gate. The atomic Lua scripts are the protocol: a corpus of Redis patterns made owned, declared code.

EchoStore is the near-cache in front of it — branded keys, an L1 of ETS tables over the shared L2 Valkey, coherence by mint time. The worked consumer of both is the codemojex — the trading system these patterns are applied inside (echo/apps/codemojex); where a chapter’s deeper implementation belongs to the protocol itself, it doors forward to the dedicated EchoMQ course.

A scope note. The engine is Valkey — the current stable line, the substrate the EchoMQ connector is gated against. Where a pattern depends on a specific command, the lesson names it.

The grounding · pick a pattern family to read its real EchoMQ / EchoStore artifact
readout · Select a family. Every pattern points at a real artifact — a Valkey key, a command, or an atomic Lua move — that you can read and run.

No pattern is taught in the abstract. Each one points at a committed artifact — the braced emq:{q}: keyspace, the claim script, the four sorted sets, or an EchoStore figure — quoted verbatim from the record.

§2

The evidence ethic

committed outputs, quoted verbatim

Every claim in the course is backed by a committed record — a frozen transcript quoted verbatim. A number that is not in a committed output does not appear on a page. The EchoMQ connector — the production Valkey client at echo/apps/echo_wire — pipelines as its primitive:

EchoMQ.Connector · the production Valkey client (echo/apps/echo_wire) · figures content/bcsA.mdfrozen
fence claimed                 echomq:3.0.0   ← typed, fatal on mismatch
sequential INCR               29456 ops/s
pipelined SET                 454483 ops/s   ← fifteen times the sequential figure, same socket
pipelined EVALSHA             161192 ops/s   ← declared-keys law at speed
script_loads                  1              ← exactly one NOSCRIPT load
10000-command pipeline        returned 1..10000 in order
§3

The map

R1–R8 · sequenced along the EchoMQ build

The full course, chapter by chapter. The patterns are sequenced along the EchoMQ build — coordination, then queues, then time, streams, flow, and operations — so the catalog doubles as a guided build of the BCS Redis tier. The module that closes each chapter is its workshop.

live chapter front door built lesson ready planned drafted, on the way soon specified
R1

Caching

Open chapter →

The read path: serving reads fast and keeping the cache consistent on writes. → EchoStore

R2

Coordination & Consistency

Open chapter →

Atomicity first — the foundation every later chapter builds on. → EchoMQ

R3

Reliable Queues

Open chapter →

Wait, active, done, recover — the heart of EchoMQ, the densest grounding in the course. → EchoMQ

R4

Time, Delay & Priority

Open chapter →

The sorted set as a clock — a timer wheel and a priority ladder. → EchoMQ

R5

Streams & Events

Open chapter →

The durable log — observability and event-driven coordination. → EchoMQ

R6

Flow Control & Scale

Open chapter →

Staying stable under load — limiting, fairness, batching, concurrency. → EchoMQ

R7

Data Modeling & Memory

Open chapter →

How data lives in RAM — the modeling family and the BCS read-models.

R8

Production & Operations

Open chapter →

Running the tier at scale — case studies and operational discipline; the capstone. → EchoMQ

A module card becomes a link when its pages ship. R1–R4 are built; R5, R6, and R8 are opening; R7 is specified. The chapters are sequenced as the EchoMQ build, so the catalog doubles as a guided tour of the BCS Redis tier.

§4

The doors

the sibling courses
§5

References

sources · related

Sources

Related