jonnifyechomq

The Protocol · the foundation

The substrate the
pillars share

The keys, the record, the scripts, and the immutability that make one wire serve three pillars.

Below the language line is the protocol — the part every pillar and every runtime shares. This chapter teaches it in depth, and it is all real code: the braced emq:{q}: keyspace that EchoMQ.Keyspace builds; the job record hash and its field names; the atomic Lua scripts run by EVALSHA, every key declared; and the immutability and branded-id discipline — the version fence, the 14-byte branded id — that keeps the wire honest. Master this and the Queue, the Bus, and the Cache are three readings of one substrate.

The wire in four parts

The protocol is four things, and the four modules of this chapter are each one of them. Pick a part to read what it is and the real surface that carries it — then take the module.

The protocol · pick a part

keyspacewhere recordwhat Lua layerhow immutabilityheld fixed one Valkey · emq:{q}:*

Four parts, one wire: the keys say where, the record says what, the scripts say how, and immutability says it will not change underneath a reader.

The modules

Four modules, each a hub and three dives, then a workshop. Each grounds in the real echo/apps/echo_mq code — the keyspace builder, the job record, the Lua scripts, the branded-id gate and version fence.

built page ready to read soon on the build front

Redis Patterns Applied

This is the depth behind two Redis Patterns Applied chapters that door here: R0.3 · Patterns become protocol (the idea that a pattern, pushed below the language line, becomes a protocol) and R2 · Coordination (hash-tag co-location and one-slot atomic Lua — the {q} keyspace this chapter owns). There the pattern is the door; here is the wire.

Up next — the three pillars

With the protocol in hand, take the pillar you need. Each is a reading of this substrate: the Queue distributes work over it, the Bus broadcasts signals across it, the Cache serves reads in front of it.

Ibuilt

The Queue

Distribute work: lifecycle, lanes, batches, controls, flows.

IIsoon

The Bus

Broadcast signals: events, the event log, consumer groups, time-travel.

IIIsoon

The Cache

Serve reads: cache-aside, single-flight, coherence on the Bus.

←built

Back to the Overview

The thesis, the three pillars, and the door.

The Protocol and the Queue are ready to read; the Bus, the Cache, and the Proof chapter are on the build front, each added as its pages land.

References

Sources

Related in this course