Cloacina

Cloacina

Plenty of work is too important to run as a loose script and too small to justify standing up a separate orchestration service. Cloacina is built for that middle ground; it is a workflow orchestration platform for Rust that you can embed directly in your application or run as a standalone server, using the same engine and the same packaging format either way.

You pick the shape that fits the team. Embedded, Cloacina is a library inside your binary with nothing extra to operate. As a service, cloacina-server loads packaged .cloacina workflow archives over an HTTP and WebSocket API, uploaded and managed through the cloacinactl CLI. Moving from one to the other does not mean rewriting your workflows.

It also gives you two execution primitives that compose. Durable workflows are database-backed DAGs with retries, failure recovery, and multi-tenancy; reach for these when work has to survive a process restart. Computation graphs are in-process, deterministic, event-driven DAGs that fire on accumulator boundaries through reactors; reach for these when work is event-driven and latency matters. A workflow can subscribe to a reactor firing, and a workflow task can drive a computation graph, so the two are not separate worlds.

Tasks and workflows are defined with the #[task] and workflow! macros, which validate dependencies and data flow at compile time rather than leaving you to find a broken pipeline in production. State lives in PostgreSQL or SQLite, chosen at runtime from the connection URL; multi-tenant deployments get real isolation through per-tenant PostgreSQL schemas with fail-closed enforcement. Execution is content-versioned, so you always know which version of a workflow actually ran, and a Prometheus endpoint reports on the rest. Everything available in Rust is available in Python through the cloaca wheel as a first-class surface, not a feature flag.

The name is Roman; Cloacina presided over the Cloaca Maxima, the drainage system that kept the city running underneath everything else.

Cloacina is open source under the Apache 2.0 license. If you want help designing or operating workflows on it, we offer consulting.

Cloacina on GitHub