jonnifyechomq

← the depth behind redis-patterns R2 · Coordination

The Proof · module 01

The contract is run

The bus contract is not asserted in prose — it is run against a live server, scenario by scenario.

EchoMQ.Conformance is the protocol written as a set of runnable scenarios. Each is a name and a one-line contract that drives the public surface — or raw commands where the contract is the wire — against a live server and asserts the externally visible verdict: the fence, the row shape, idempotent admission, the kind law, the lex law, the token discipline, the schedule, the morgue, the reaper, the lanes, the read / operator / watch planes, the flow family. The suite is the polyglot promise made testable: any runtime that speaks the wire is conformant exactly when it drives the same server to the same verdicts. It is all real code.

Run, don’t assert

A scenario is a name plus a one-line contract. scenarios/0 returns the whole set as a keyword list in run order; run(conn, queue) walks it, drives each one against a live server on its own sub-queue, and records the verdict. Pick a scenario below to read its contract, the verb (or raw command) it drives, and the externally visible verdict it asserts — the value an outside caller, or a port in another language, must reproduce.

A scenario · drive the surface, assert the verdict

the contract name: "one line" fence live server emq:{q.name}: drive verb / raw cmd verdict ok externally visible GET emq:{q}:version the value a port must reproduce — wire-level, never an internal detail

A scenario is one honest row: a named contract, a live drive, an externally visible verdict. The set is the protocol — and the set is run.

The set is not a fixed number: it grows by additive minor — a new clause is appended, the prior set stays byte-frozen, the count is re-pinned. This page teaches the shape (names + contracts in run order → run on sub-queues → one CONF line each → {:ok, n}), never a count that would go stale.

Which executor a run proves

A run drives the server through EchoMQ’s connector, so the connection’s wire decides which executor it proves. On the default wire: 4 connection every scenario evaluates the scripts on a node branded echomq:4.0.0. On a wire: 6 connection the job-core scripts travel as their native verbs, and run/3 with only: :jobs runs a pinned subset of the job scenarios against them; three of those (fence, lock_extend, extend_fenced) expect the native difference. The rest of the set leans on scripts with no native verb, which a wire 6 connection refuses, so the whole suite runs on wire 4.

The dives

Three dives: the list of scenarios, the run that walks it, and the law that lets the set grow without breaking the wire. Each grounds in the real echo/apps/echo_mq code — EchoMQ.Conformance's scenarios/0 and run/2.

built page ready to read

Redis Patterns Applied

This is the depth behind the Redis Patterns Applied chapters that door here: R2 · Coordination — the atomic claim, the fencing token, idempotent admission: exactly the externally visible promises the conformance scenarios assert against a live server.

And R8 · Production Operations — running the tier as it grows: the additive-minor law is how the contract gains clauses without breaking the clients already passing it.

The manuscript

The Proof shows the four libraries hold as one system. That whole is the subject of The Branded Component System · Together — one umbrella, one write down, one read up, the branded id the thread through all of it.

References

Sources

Related in this course