devsper-graph
Event-sourced DAG actor for distributed task scheduling in the devsper runtime.
The graph is the source of truth for workflow state. All mutations go through GraphActor and are logged as immutable events, enabling full replay and audit.
Concepts
GraphActor— tokio actor owning thepetgraphDAG; all mutations are serialized through itGraphHandle— cheap clone used by callers to send commands; safe to share across threadsEventLog— append-only log of every mutation; enables state reconstruction from scratchMutationValidator— ensures mutations are legal before they're applied (e.g. no cycles, valid transitions)GraphSnapshot— point-in-time view returned to the scheduler/executor
Usage
[]
= "0.1"
use ;
use ;
let config = default;
let = spawn;
// Add nodes and edges
handle.add_node.await?;
handle.add_node.await?;
handle.add_edge.await?;
// Get nodes ready to run
let ready: = handle.get_ready.await;
// Claim a node (returns false if another executor won)
let won = handle.claim.await;
License
GPL-3.0-or-later — see repository.