jonnifyechomq

← the depth behind redis-patterns R8 · Production Operations

The Proof · module 02

How it reports
on itself

Push the events as work happens; pull the state whenever you ask — and never change the work either way.

A proven system still owes you one answer: how is it doing right now — and it has to answer without being asked to change. The bus answers two ways, mirror images of each other. Push (EchoMQ.Meter): as work happens the lifecycle emits [:emq, …] events the standard Elixir :telemetry way — attach a handler and throughput, latency, and failures flow to it, at zero cost when telemetry is absent. Pull (EchoMQ.Metrics): a pure-read plane answers counts, a job's state, throughput, and the rate-gate off the as-built structures — every verb observes, none mutates. One side observes by emitting; the other answers by reading. It is all real code.

Push and pull, one lifecycle

Both reports watch the same thing — a job moving through its lifecycle — from opposite sides. The meter sits on the work and emits an event at each transition. The read plane sits to one side and, when asked, counts how many ids are in each state right now. Neither moves a job. Step a job through its life to see both reports update.

One lifecycle, two reports · step the job

JOB — one branded id through its life push · EchoMQ.Meter emits [:emq, :job, …] [:emq, :job, :add] queue_time [:emq, :job, :start] system_time, worker [:emq, :job, :complete] duration pull · EchoMQ.Metrics.get_counts/3 reads ZCARD pending 0 active 0 scheduled 0 completed 0

Two reports of one life: the meter says it as it happens, the read plane answers it when asked — and the work is untouched by either.

The dives

Three dives, the push side then the pull side then the property that ties them. Each grounds in the real echo/apps/echo_mq code — the EchoMQ.Meter event surface, its zero-cost-when-absent guard, and the EchoMQ.Metrics read plane.

built page ready to read

Redis Patterns Applied

This is the depth behind the Redis Patterns Applied chapter that doors here: R8 · Production Operations — the metering and read-side introspection an operator runs a tier with, made concrete here as the EchoMQ.Meter event tree and the EchoMQ.Metrics read plane. There the pattern is the door; here is the surface.

The rest of the pillar

This module is how the proven system reports on itself. The conformance suite proves the contract holds; the benchmark gate is the named frontier. The pillar shows one thing three ways: the system holds, meters itself, and reads honestly.

The conformance suite and the read plane are ready to read; the benchmark gate is the named frontier, added when its surface lands.

References

Sources

Related in this course