Distributed Runtime with Dora-rs
MoFA integrates with dora-rs, a high-performance dataflow runtime for distributed agent systems. This enables scaling agents across processes and machines while maintaining low-latency communication.Architecture
Enable Dora Support
Add thedora feature flag:
Runtime Modes
Embedded Mode
Run dataflows in the current process:Distributed Mode
Run dataflows across multiple machines:Dataflow Builder
Define dataflow graphs declaratively:Agent Nodes
Wrap MoFA agents as Dora nodes:Custom Node Logic
Operators
Use operators for lightweight processing:Plugin Integration
Wrap MoFA plugins as Dora operators:Channel Configuration
Control communication between nodes:Running Dataflows
Simple Execution
With Logging
Background Execution
Message Passing
Zero-copy Messaging
Dora uses shared memory for efficient communication:Serialization
Fault Tolerance
Node Restarts
Health Checks
Monitoring
Integrate with MoFA monitoring:Distributed Coordination
Coordinator Setup
Worker Registration
Best Practices
- Use operators for simple logic: Reserve agent nodes for complex reasoning
- Enable shared memory: Use zero-copy for large data transfers
- Set appropriate buffer sizes: Balance latency and memory usage
- Implement health checks: Enable automatic recovery
- Monitor dataflow performance: Track message rates and latency
- Handle backpressure: Implement flow control for slow consumers
- Use typed messages: Define clear data schemas
- Test locally first: Debug in embedded mode before deploying
Performance Tuning
Buffer Sizing
Concurrency
Backpressure
Deployment
Docker Compose
Kubernetes
Troubleshooting
Connection Issues
Message Drops
Performance Debugging
See Also
- Workflow Orchestration - Combine with workflows
- Monitoring - Track distributed performance
- Security - Secure distributed communication