A merge you can always undo
Most stream systems stamp every event with a timestamp and reconcile things in fuzzy time windows. RetractorDB starts from something simpler: a regular stream is just a clock — a starting point and a fixed interval between ticks. Two clocks running at different rates can be woven into one combined stream, in order, with nothing lost.
The part that matters: that combined stream can always be pulled back apart into the exact two clocks it came from — no approximation, no drift, no guessing which tick came from which stream. Merge and split are exact opposites, for any pair of regular rates. Replay the same recording twice and get the identical result down to the bit, because the operation was never approximate to begin with.
It's also where the marks come from — the scissors mark is literally this split operation, drawn.
The formal proof — grounded in number theory — is in the paper, for the curious.
Any machine that streams, any signal that matters
RetractorDB is domain-neutral. It sits at the edge, next to the sensors, and turns raw multi-rate telemetry into exact, reduced, replay-stable streams before they reach a historian, a TSDB, or the cloud. Wherever signals with different sampling rates must be merged, resampled, and audited, the algebra applies unchanged — only the coefficients differ.
Aerospace
Flight-test and avionics telemetry: hundreds of sensors at mismatched rates merged deterministically, with byte-identical replay for post-flight and incident analysis.
Automotive
ECU and vehicle-bus signals aligned without floating-point drift; reproducible traces for validation, fleet analytics, and homologation.
Industrial monitoring
Machine condition monitoring and predictive maintenance: vibration, current, and temperature reduced at the edge to exact, comparable features.
Energy & grid
Synchrophasors, substations, wind turbines: every rate is a rational multiple of line frequency, and post-fault analysis demands exact, replayable records.
Audio & broadcast
44.1 ↔ 48 kHz is exactly 147:160 — a rational conversion the algebra performs with zero accumulated drift, keeping long chains sample-accurate.
Software-defined radio
Decimation and interpolation chains with rational factors are SDR’s daily bread; here they are exact, declarative, and inspectable query operators.
Robotics & test benches
Encoder, IMU, and force signals fused across control-loop rates; hardware-in-the-loop runs replay bit-for-bit for regression testing and certification.
Biomedical
Vital-sign pipelines — the engine’s original domain and the paper’s worked example, a special case of the same algebra.
The same pattern recurs wherever regular telemetry meets an audit trail: rail and maritime data recorders, seismic networks, structural health monitoring of bridges and buildings, environmental sensor grids.
Three binaries, one deterministic pipeline
Declare source streams and continuous transformations in RQL, a declarative query language realizing the algebra. The compiler resolves every stream to a rational interval and builds a dependency DAG; the runtime schedules slots on a rational timeline. Identical input traces produce byte-identical artifacts — a property exercised continuously in CI.
xretractor
Parser, compiler, and runtime for RQL plans. Compile-only and plan-dump modes for inspection.
xqry
Queries running streams live over IPC — raw or formatted, ready to pipe into gnuplot.
xtrdb
Inspects and edits binary artifacts: schema, null/gap metadata, deterministic test data.
One worked example, the same algebra everywhere
Every domain above reduces to the same operator chain. As the paper’s worked example we chose a demanding, well-specified pipeline from the engine’s original domain: the Pan–Tompkins QRS detector over MIT-BIH ECG data — bandpass, derivative, squaring, integration, adaptive threshold, end-to-end in the algebra. Swap the coefficients and the same chain computes a vibration envelope or a bus-signal feature. No user-defined functions, no procedural escape hatches.
DECLARE MLII INTEGER, V1 INTEGER STREAM ecg, 1/360 FILE 'rec205' # 1. bandpass 5–15 Hz — 25-tap FIR convolution SELECT * STREAM mlii_win FROM mlii@(1,25) SELECT mlii_win[_]*bpf[_] STREAM bp_acc FROM mlii_win+bpf # 2. derivative 3. squaring 4. moving-window integration SELECT d_out[0]*d_out[0]/1000 STREAM sq_out FROM d_out # 5. adaptive threshold — 0.5 s moving average SELECT mlii[0]-900, mwi[0]*5, (mwi[0]-mwi_thr[0]*2)*5 STREAM qrs_out FROM mlii+mwi+mwi_thr
A century of mathematics, one engine
Beatty shows two sequences ⌊np⌋, ⌊nq⌋ partition ℕ for irrational rates.
Fraenkel generalizes the partition criterion to rational parameters — the computable case.
The covering-systems ↔ stream-alignment bridge is established in peer-reviewed form.
Full formal semantics, proofs, and the engine report: arXiv:2607.07730.