mmapq

Many processes.
One history.
No coordinator.

A persistent, indexed trail, lock-free from commit to read. Writers append in parallel. Readers can lag, restart, replay from any retained index, and rebase when the archive passes them; a snapshotter reclaims old files. None of it slows the writers, and none of it is a separate mode: it holds together, under concurrency, with no broker and no coordinator.

>Single Linux machine · x86-64 or ARM64
no network

>A writer can die mid-publish.
Readers never notice.

> The failure mode

What happens when a writer dies halfway?

Several processes write to one ordered, persistent log. One of them is killed halfway through publishing a message.

A reader reaches that spot. It can't skip the entry — the order is global. It can't read it — it was never finished. It can't tell a dead writer from a slow one.

Everything behind that message is stuck.

It might happen once in a million runs. Once is enough. So the usual fix is a coordinator — a broker, a lease, a timeout, a repair pass — running forever, and needing its own failover, to guard against a failure that almost never happens.

Sequenced log Index →
  • ◆ idx 0 committed
  • ◆ idx 1 committed
  • ◆ idx 2 committed
  • ✕ idx 3 writer died mid-publish
  • ◇ idx 4 blocked
  • ◇ idx 5 blocked
reader stuck at idx 3

The cost is permanent.
The threat is occasional.
That's the wrong trade.

Write first.
Claim last.

mmapq removes the failure instead of recovering from it. Each writer prepares its message in its own private lane. Only when complete does it publish with a single atomic claim.

> Dead writers are irrelevant

> Capabilities

What you get.

01 — Low latency and high throughput

Many writers, one stream.

Many concurrent writers, variable-length messages, one globally ordered persistent stream.

02 — Liveness

Reader progress is independent.

Reader progress independent of writer liveness.

03 — Coordination

The queue is a sequencer.

Everyone writes and everyone reads the same ordered history to maintain common shared state.

04 — Determinism

Replay and reconstruct.

Deterministic replay and state reconstruction from the same history.

05 — Forensics

Post-event forensics.

Post-event forensics from the persistent log.

06 — Retention

Concurrent archiving and reclamation.

Advance the archive line while writers keep going; reclaim whole files behind it without stopping the head.

07 — Snapshots

Snapshots are application-defined.

Snapshotting is not out of the box: implement it in your application, then archive up to the snapshot index.

08 — Out-of-order commits

Write order isn't commit order.

Append payloads as they arrive, then commit in sequence order; readers still see one strictly ordered history. A building block for UDP reliability layers and pipelined writes.

09 — Polyglot

One queue, three languages.

C · Rust · Python

Many-to-many by design — one-to-one and one-to-many work the same way. Start with one writer; add more as the system grows.

Built for

Peer agents with no central authority · multi-agent simulations · robotics and flight companion computers · local actor and event-sourced systems.

> What you can build

An agentic market.
Or an agentic AI environment.

mmapq is the queue — the application is yours

mmapq gives independent processes one ordered, replayable history. What you build on that history is up to you.

One pattern it enables is an agentic market simulator. Each agent is an independent process; it publishes intents — orders, cancels, amends — to the shared log and replays the same history. Because everyone applies the same intents in the same order, everyone derives the same state, without a central coordinator in the queue.

The same pattern fits an agentic AI environment: independent agents coordinate through a common, replayable log instead of a broker. The queue provides the history; the matching engine, agent policy, snapshots, and derived state are the application's.

Who provides what
mmapq

One ordered history · persistent indexed replay · multi-writer commits · recovery and archiving.

Your application

Matching engine or agent policy · snapshots · derived state · determinism rules (integer prices, no wall-clock reads, explicit tie-breaking).

An agent can be killed and restarted at any time. It replays the log and rejoins with the same view as everyone else. A new agent joins mid-session the same way.

Determinism is the application's job: the same intents in the same order must produce the same state. mmapq keeps the order and the history; your simulator keeps the rules.

Many processes.
One history.
No coordinator.

cargo add mmapq · pip install mmapq