Architecture Note (MVP)¶
IronFlow is intentionally Rust-first: the rust-engine crate is the authoritative orchestration kernel — deterministic state transitions, validation, and append-only history. Python (prefect_compat) is the authoring and integration layer: Prefect-like decorators, process orchestration glue, HTTP when enabled, and calls into the engine over FFI when the native library is loaded. The frontend (if used) observes state through the same persistence and APIs; it is not a second control plane.
Runtime path¶
- Python
@flow/@taskcalls enter the compatibility shim. - The shim creates runs and proposes state transitions to the control plane; the Rust engine applies and records them (deterministic validation, append-only event history).
- Read models and query paths are served from the projected store; heavy or correctness-critical query logic is implemented in Rust when the native bridge is active, with Python fallbacks where provided.
- UI/API consumers read timelines and run state from that stack (SQLite / projections as implemented).
Static planning path¶
- On flow start, IronFlow compiles the
@flowfunction body (AST) into graph IR viastatic-planner/. - Supported patterns:
submit/mapchains,wait_for, constant bounded loops, repeated same-task calls, and@task(name=...)when task objects are visible to the flow module/closure. - The manifest is stored per flow run; each
submitreceives the next matchingplanned_node_id(or a dynamicdyn_<task>_<n>id when the forecast is exhausted).map()shares one planned node across all fan-out task runs in a batch. - Unsupported constructs (
if, dynamicrange(n), opaque control flow) setfallback_required; the UI/API can still build a runtime-inferred DAG from task-run history. - Forecast emits task count, edge count, critical path length, and parallelism estimate.
See DAG and forecast for UI behavior and testing wide/long graphs.
UI DAG view¶
The optional Vite/React frontend renders run DAGs from GET /api/flow-runs/{id}/dag with Aggregated fan-out (planned manifest, mode=logical) and Task runs (mode=expanded) views. Dependencies always flow left → right; parallel siblings stack top → bottom. GPU-accelerated zoom/pan, search-to-focus, and upstream/downstream path highlighting.
Compatibility scope (MVP)¶
task.submitchainstask.mapfan-out (subset)@task(name=...)and repeated same-task invocations in one flow- retries/timeouts/cancellation semantics at control-plane level
- deployment concurrency limits (per-deployment run caps)
- global + tag concurrency limits (Rust slot ledger; see
docs/how-to/concurrency-limits.md)