Ararat is a general-purpose, high-performance orchestration framework for Software-Defined Workflows (SDW). Built in the Mojo programming language and integrated natively with the Neo4j graph database, it leverages Directed Hypergraphs (DHG) to model and execute complex, distributed closed-loop systems (such as neuromodulation control systems).
graph TD
classDef control fill:#e1f5fe,stroke:#01579b,stroke-width:2px;
classDef data fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px;
classDef database fill:#f3e5f5,stroke:#8e24aa,stroke-width:2px;
subgraph Control_Plane ["Control Plane"]
API["Northbound API<br>(Dynamic Hot-Swapping)"]
Orchestrator["Stateless Ararat Orchestrator<br>(Mojo Engine)"]
DB[("Neo4j Graph Database<br>(Shared State Machine)")]
API == "Graph Mutation" ==> DB
Orchestrator == "Cypher Polling / ACIDs" ==> DB
end
subgraph Data_Plane ["Data Plane (Service Agents)"]
Sensing["Sensing Node"]
Controller["Controller Node (CTL)"]
Stimulator["Stimulator Node"]
Logger[/"Data Logger"\]
end
Orchestrator -.->|"TRIGGER_EXECUTION"<br>Control Signals| Sensing
Orchestrator -.->|Control Signals| Controller
Sensing == "Sync DHG edge" ==> Controller
Sensing -. "Async (Thin Edge)" .-> Logger
Controller == "Sync DHG edge" ==> Stimulator
Stimulator == "Feedback Loop" ==> Sensing
class API,Orchestrator control;
class Sensing,Controller,Stimulator,Logger data;
class DB database;
Ararat separates the Control Plane (Orchestration State & Rules) from the Data Plane (Service Execution), utilizing a database-driven architecture:
- Neo4j-Native Control: The Directed Hypergraph workflow topology and execution states are stored directly in a Neo4j property graph.
- Stateless Mojo Orchestrators: Multiple stateless, high-performance Mojo execution engines query and claim tasks atomically using Cypher queries, eliminating centralized state bottlenecks.
- Graph-Native Algorithms: Performs topological operations (such as cycle checking and transitive downstream path pruning for fault isolation) directly in the database.
- Directed Hypergraphs (DHG): Natively supports complex topological patterns, including cycles, dicycles, and 1-to-many hyperedges.
- Dynamic Adaptability: Real-time "Hot-Swap" of active workflow topologies by executing basic graph mutations on the Neo4j database, without restarting running orchestrators or service agents.
Unlike traditional workflow engines (Nextflow, Snakemake) that are limited to Directed Acyclic Graphs, Ararat natively supports Dicycles. This is critical for biomedical control systems where continuous feedback loops (e.g., Plant Model
Supports both Blocking (Synchronous) and Non-Blocking (Asynchronous) signaling. "Thin Edges" allow nodes to continue execution while receiving fire-and-forget state updates, preventing bottlenecks in high-frequency data streams.
Built-in ServiceLauncher capable of orchestrating:
- Cloud-Native: Dockerized microservices.
- HPC-Native: Singularity (Apptainer) containers for research clusters.
- Local: Standalone Mojo/Python scripts.
Implements network-aware service scheduling (src/optimization/heuristics.mojo) that evaluates available CPU, memory, incident link latency, and total link bandwidth to assign workloads to optimal edge hosts.
Evaluates task claim throughput and dispatch latency across scaling numbers of concurrent stateless Mojo worker daemons (1 to 16 daemons), comparing performance quantitatively against durable execution engines (Temporal) and stateful DAG orchestrators (Apache Airflow).
Includes parameter sweep engines (src/sim/evaluation.mojo) that evaluate core network cost savings across bandwidth-to-compute unit price ratios (
Ararat/
├── src/
│ ├── core/ # DHG Primitives (Nodes, Hyperedges)
│ ├── controller/ # Logically Centralized & Neo4j Orchestrators
│ ├── infra/ # Container Launchers & YAML Parsers
│ ├── sim/ # Closed-loop case studies & evaluation engines
│ └── optimization/ # Resource, Bandwidth & Link-aware allocation heuristics
├── scripts/
│ ├── bayesian_optimizer.py # Local Python node
│ ├── feature_extractor.py # Biomarker extraction script
│ ├── stimulator.py # Pulse generation script
│ ├── generate_plots.py # 4-panel PDF figure generator
│ └── neuromod-pm/ # Docker node (plant model)
│ ├── Dockerfile
│ └── plant_model.py
├── workflows/ # YAML-based DHG definitions
├── tests/ # Automated Python test suite (test_all.py)
├── setup.sh # Idempotent environment setup
├── main.mojo # CLI runner for custom user workflows
└── run_use_cases.mojo # Verification suite running pre-defined research use cases
Ararat is managed using Pixi. Run the bundled setup script — it checks for existing installations and skips any step that is already satisfied:
bash setup.shThe script handles:
- Installing Pixi (if not already on
PATH) - Running
pixi installto install Mojo and PyYAML (if not already solved) - Building the Docker image
kathiravelulab/neuromod-pm:latest(if not already present) - Verifying the installation with
pixi run mojo --version
If you prefer to run steps manually, see Tutorial.md.
To execute the bundled research use cases (Neuromodulation Control Loop, Dynamic Hot-Swap, Network-Aware Routing, Parameter Sensitivity Analysis, and Concurrency Baselines):
# Run the complete verification suite using Pixi
pixi run mojo run_use_cases.mojoTo run the automated test suite verifying QoE math safety, YAML validation, launcher security, and plot generation:
python3 -m unittest discover -s tests -p "test_*.py"Ararat allows you to run any user-defined workflow YAML directly through the CLI:
# Run a custom workflow YAML definition
pixi run mojo main.mojo workflows/neuromodulation.yaml --iterations 5To run the evaluation benchmarks and regenerate the exact 4-panel plot presented:
-
Execute the main evaluation simulation to produce raw CSV metrics:
pixi run mojo run_use_cases.mojo
This generates
evaluation_metrics.csvin thescripts/directory. -
Run the plot generator script to consume the CSV and output the 4-panel PDF figure:
python3 scripts/generate_plots.py
This outputs
evaluation_results.pdfin thescripts/directory.
Ararat inherently focuses on zero-code deployments via declarative topologies natively in YAML, while also exposing its raw Mojo primitives programmatically.
For comprehensive instructions on how to design YAML schemas and inject hot-swaps using the native WorkflowParser, please refer to the Ararat User Guide.