echd — Echo on Encore · E3.2 · dive
The Polyglot Seam
A subscription lives in Valkey, not in a runtime — so joining a group is a command any language issues, and the polyglot promise stops being a slogan and becomes server state.
echd speaks in the present tense over a build ladder. Every module, verb, key, and port named on this page is real; the composition into one standing platform is the vision the ladder builds.
The dive
docs/echo_mq/emq.streams.md:42The polyglot claim of the bus is easy to state and easy to doubt: any runtime that speaks the protocol is a first-class peer. The stream tier is where it stops being a slogan, because a consumer group makes the claim concrete. A subscription is not an object inside the BEAM; it is state that lives with the stream, on the Valkey server. Joining it is issuing XREADGROUP against a key — something a Go program, a Python worker, and a BEAM node do identically, because there is nothing runtime-specific to join.
Turn that around and the supersession is sharp. PubSub's fan-out lives in the runtime that owns the topic, so a second language needs a bridge, and a subscriber that blinks loses whatever arrived while it was gone. The stream tier keeps the subscription — cursor, pending lists, and all — on the server, so a non-BEAM consumer stands in the same group as the BEAM consumers, drains the same pending list, and gets the same at-least-once guarantee. The seam is not a translation layer; it is the absence of one.
One group, many runtimes
docs/echo_mq/emq.streams.md:42XREADGROUP, XACK, and reclaim are the same commands whatever issues them, so to join the group is to join from anywhere.Hover or focus a part to read it; click to pin. Without scripting, all three read in sequence.
The seam is the absence of a bridge
docs/echo_mq/emq.streams.md:42It is worth being precise about what makes this polyglot, because it is not a feature that was added — it is a bridge that was never needed. A conventional broker offers per-language SDKs: a Go library, a Python library, each re-implementing the client's half of a bespoke protocol, each a place for the languages to disagree. The stream tier has no such surface. The protocol is Valkey commands, the subscription is server-side group state, and the payload is a branded claim a few bytes wide. A new language is not onboarded; it already has a Valkey client, so it already has everything it needs.
This is the streams-shaped form of the wire rule from the previous module: there, the point was that the protocol is the database's own wire, so any runtime that speaks it is a peer. Here the point is narrower and more concrete — the subscription is on the wire too, so peers do not merely issue the same commands, they share the same durable delivery. A Go consumer and a BEAM consumer are not two systems integrated; they are two members of one group, and the group cannot tell them apart. The conformance suite makes the equality a test rather than a promise, standing a non-BEAM reader in the group and draining the same pending list the BEAM does.
The rule
one line to carryThe polyglot rule — the subscription lives in Valkey, so any language joins the same group. PubSub's fan-out dies at the runtime boundary; a consumer group is server state — one cursor, one pending list — so a Go reader and a BEAM node share one stream and one at-least-once guarantee, with no bridge between them.
Doors
the seam, provenEchoMQ — the protocol, in depth
The conformance suite and the claims codec: how a non-BEAM reader is stood up in a group and checked against the BEAM.
the non-BEAM reader — the polyglot seam as a running test.
/redis-patternsRedis Patterns, Applied
Consumer groups and the pending-entries list as patterns — the shared machinery every language reads.
one group, many readers — durable fan-out as a pattern.
References
sources · relatedSources
- Valkey — Streamsconsumer groups as server-side state every client shares, whatever the language
- Valkey — Pub/Subthe fire-and-forget primitive with no shared subscription — the limitation the seam removes
Related
- E3.2 — Streams Supersede PubSubthe module this dive closes
- the-wire-fencethe wire-level rule this dive makes concrete for streams
- E3 — The Bus — EchoMQ Supersedesthe supersessions the stream tier delivers