ringfire
Shared-memory interprocess rings with network multicast and unicast replication.
- d5e7389 docs: add CITATION.cff and README citation for Zenodo archive snapshot 2026-09-29
- 462b66d docs: add standard LICENSE-MIT and LICENSE-APACHE texts 2026-09-29
- 0993b2d test: ensure wait strategies and backpressure prune coverage on x86_64 2026-09-28
- cca3b0b test: cover tsc and wait strategy branches on x86_64 2026-09-28
Status from GitHub and crates.io as of 2026-11-16.
What it is
ringfire is a set of shared-memory ring buffers for interprocess communication on one machine, with network replication that keeps identical copies of a ring on other hosts.
It targets workloads where sockets, pipes and message brokers add too much latency: a producer publishes fixed-size or variable-length records into shared memory, and readers on the same host consume them directly - synchronously on dedicated cores or cooperatively from Tokio.
- 64-byte round trip on ARM Neoverse-N1: 0.29 µs busy-spin vs 6.55 µs Unix socket and 21.5 µs TCP loopback.
- push and try_recv around 11 ns on a warm cache.
- Lossy or lossless readers, start modes and shared-memory checkpoints for restart.
- ringfire serve / ringfire mirror replicate a ring to other hosts over multicast or unicast.
How it works
Records in shared memory
Producers publish fixed-size binary records or variable-length blobs into a ring in shared memory; readers on the same host read them with no syscall on the hot path.
Readers choose how to wait
A reader can busy-spin on a dedicated core, use an adaptive futex that spins briefly before sleeping, or run as a Tokio async consumer. By default the writer never blocks (latest wins); LosslessBackpressure throttles the writer to the slowest reader instead.
More than one channel
A blackboard offers an O(1) snapshot table of shared state, and multiplexers read several rings at once.
The ring itself, on another machine
ringfire serve publishes a ring and ringfire mirror keeps an identical copy elsewhere, over LAN multicast or unicast across sites, and resumes from the last record after a restart.
Example uses
01. Local feed consumers
A local feed handler can publish records for separate consumer processes.
02. LAN mirrors
LAN mirrors can give independent workers their own local streams.
03. Ordered remote mirror
A remote mirror can preserve order while handling reported gaps explicitly.
Where it fits
ringfire copies payloads into and out of ring slots. Lossy and lossless modes have different producer behavior, and the ring is not a durable broker or event log.
Get started
Use the README and library examples for the CLI and replication setup.
Clone the repository and install the ringfire CLI
git clone https://github.com/alex09x/ringfire && cd ringfire
cargo install --path .Serve a ring on the source host
ringfire serve /dev/shm/ticks --bind 0.0.0.0:7400 --udp 7403 --spinMirror it on another host
ringfire mirror source.example:7400 /dev/shm/ticks --unicast --spinLimitations
- Requires Linux shared memory.
- Multicast depends on network support.
- Retention is bounded by ring capacity.
- Slow readers and mirrors can see gaps.
Cite this software · archived version archive 0.5.3+licenses.462b66d
Cite this software
Alexander Panasenko (2026). ringfire: Shared-memory interprocess rings with network replication (archive 0.5.3+licenses.462b66d). Zenodo. https://doi.org/10.5281/zenodo.23028631This Zenodo archive is source snapshot 0.5.3+licenses.462b66d, based on v0.5.3 with MIT and Apache legal notices added. It is not a separate tagged release.
