jonnifyechomq

The Protocol · the foundation

The substrate the
pillars share

The keys, the record, the transitions, 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 transitions, each one native command: EchoMQ.Script declares the verb, EchoMQ.Connector sends it with no Lua, every key carrying its queue's {q} hashtag, and the native trafikey module, where each core job transition is one EMQ.* command inside the server, which the same connector sends on wire 6, while lanes, flows and the reaper run only as scripts; and the immutability and branded-id discipline — the wire identity each executor fences on, the 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. The first four modules teach one each; the fifth, the native module, is the second executor of the third part, the transitions. 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 transitionshow immutabilityheld fixed one Valkey · emq:{q}:*
The keyspace — says where
surface: EchoMQ.Keyspace.queue_key/2 → emq:{q}:<type>
the {q} hashtag pins one queue to one Valkey slot; {emq}: is the core reserve

Four parts, one wire: the keys say where, the record says what, the transitions say how — as a script or as a native command — and immutability says it does not change underneath a reader.

The modules

Four modules, each a hub and three dives, then a workshop. Each grounds in real code: the Elixir in echo/apps/echo_mq and echo/apps/echo_wire — the keyspace builder, the job record, the script declarations and their one dispatch seam, the branded-id gate and the version fence — and the native module's Rust handlers in trafikist/crates/trafikey.

built page ready to read

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.

After the pillars, the Proof chapter shows the whole system holds: the conformance suite, telemetry and the read plane.

References

Sources

Related in this course