fv-streams-engine
The FusionVault Streams engine: it runs one stream
pipeline continuously over Kafka. N independent consumer threads in one group each own the
partitions Kafka assigns them and run a self-contained consume → transform → emit → commit loop, so
throughput scales with partitions and cores and there is no shared poll thread to serialise on.
Stateful steps use fv-streams-ops operators, one instance
per assigned partition, checkpointed to a compacted state topic; with exactly-once on, emissions
and checkpoints ride one Kafka transaction.
Host it
The engine asks its host four things through one trait; everything else is the engine's.
use Arc;
use async_trait;
use ;
use ;
;
# new.unwrap.block_on;
topology— the pipeline as stages of steps in the engine's vocabulary (the engine validates them and fails loudly before consuming anything).resolve_topic— a dataset name to its topic and brokers.heartbeat— called on a cadence; returningStoptriggers the ordered shutdown (final checkpoint, flush, commit).ContinueUnreachablekeeps the stream alive when the host is down.put_record— the live build record (status,consumed/emitted/droppedcounters).
fv-streams is this trait answered from a TOML file; a
platform answers it over HTTP. Same engine, same semantics.
Steps
A stage is inline steps around at most one operator step:
- inline:
select,rename,drop,filter,applyExpression(the value dialect, per row, poison rows isolated and counted, never a stalled stream); - compute:
wasm/container— a Kinetics transform byref, resolved fromFV_TRANSFORMS_DIR; - stateful:
windowedAggregate,sessionAggregate,streamJoin,topN,lastN.
Settings are STREAM_* environment variables (consumers, batch size, checkpoint interval,
exactly-once, offset reset, idle timeouts); the repository README has the table.
Apache-2.0.