mocra-dag
Generic distributed DAG execution engine extracted from the mocra crawler framework — zero crawler coupling.
Features
- Build DAGs (
Dag/DagChainBuilder): nodes + dependency edges, topological validation, cycle detection. DagScheduler: layered concurrent execution, retry policies, fencing-guarded distributed run guards.- Node dispatch via the
DagNodeDispatchertrait (built-inLocalNodeDispatcher; hosts can plug in custom dispatchers). - Runtime dependencies are injected via traits (
DagStorefor a distributed KV/atomic backend,DagEventSinkfor node-state events), so the crate does not depend on the host — the host adapts its cache / pub-sub services to those traits.
Example
use ;
let dag = builder./* add nodes + edges */.build?;
let report = new.run.await?; // layered concurrent execution
Part of the mocra workspace.
License
Licensed under either of MIT or Apache-2.0 at your option.