reifydb_sub_flow/lib.rs
1// SPDX-License-Identifier: AGPL-3.0-or-later
2// Copyright (c) 2026 ReifyDB
3
4//! Streaming flow runtime: continuously evaluates registered flow definitions over the change stream coming out of
5//! the transaction layer, applies the operator graph the planner produced, and writes the resulting deltas back into
6//! the catalog so downstream queries observe a derived view that updates in step with its inputs.
7//!
8//! The runtime hosts both built-in operators and FFI-loaded ones from extensions, threading them through a shared
9//! deferred-work queue so backpressure from a slow consumer does not block fast ones. Connectors at the edges of
10//! the graph translate between the engine's internal column shape and external sources/sinks.
11//!
12//! Invariant: a flow's output for a given input set is fully determined by its definition - replaying the same input
13//! deltas through the same flow definition produces the same output deltas. Operators that introduce hidden state
14//! (a clock, a random number, an external read that may differ between runs) break this guarantee and break replay.
15
16#![cfg_attr(not(debug_assertions), deny(clippy::disallowed_methods))]
17#![cfg_attr(debug_assertions, warn(clippy::disallowed_methods))]
18#![cfg_attr(not(debug_assertions), deny(warnings))]
19#![allow(clippy::tabs_in_doc_comments)]
20
21pub mod builder;
22pub(crate) mod catalog;
23pub mod connector;
24pub(crate) mod deferred;
25pub mod engine;
26#[cfg(reifydb_target = "native")]
27pub mod ffi;
28pub mod host;
29pub mod operator;
30pub mod subsystem;
31#[cfg(reifydb_target = "native")]
32pub mod testing;
33pub mod transaction;
34
35pub(crate) use operator::Operator;
36pub(crate) mod transactional;