How dora-rs/dora works
Project Type and Purpose
• dora-rs is a dataflow-oriented robotics framework written in Rust, with multi-language APIs (Rust, Python, C, C++), a CLI, a coordinator service, a daemon service, and a runtime engine.
High-Level Components
a. User-facing CLI (“dora-cli”)
• Parses YAML dataflow definitions
• Sends commands to the coordinator
b. Coordinator Service (“binaries/coordinator”)
• Receives directives from CLI
• Plans node placement, resource allocation
• Issues spawn/teardown commands to daemon(s)
c. Daemon Service (“binaries/daemon”)
• Manages node processes on one machine
• Handles control channel and health checks
• Provides shared-memory segments or TCP sockets for inter-process message exchange
d. Runtime Engine (“binaries/runtime”)
• Loads operator implementations (plugins or shared libraries)
• Drives execution loop of each node
e. Node Processes
• User code written against one of the language APIs under apis/
• Link to core libraries (libraries/core, libraries/message, libraries/communication-layer)
f. Core Libraries
• libraries/message: message definitions and serialization
• libraries/communication-layer: shared-memory, TCP, Zenoh abstractions
• libraries/core: dataflow descriptor, graph validation, schema generation
Relationships and Dataflows
• CLI → Coordinator: control/management RPC over a control channel
• Coordinator → Daemon(s): spawn, start, stop node processes via RPC
• Daemon ↔ Node Processes:
• Control channel for liveness and metrics
• Node Processes ↔ Node Processes: dataflow streams as defined in YAML
• All components emit Opentelemetry spans/metrics/logs to an external collector
Architectural Patterns and Principles
• Declarative Dataflow: nodes and their interconnections defined in a YAML graph
• Microservices / Service Orchestration: CLI, coordinator, daemon, runtime are separate binaries
• Plugin/Extension: language-specific API crates under apis/, ROS2 bridge, telemetry extensions
Key Technologies
• Rust for core, coordinator, daemon, runtime, libraries
• Python / C / C++ language bindings for nodes
• Shared-Memory, TCP, Zenoh transport layers
• Opentelemetry for distributed tracing/metrics
• YAML for configuration (dataflow definitions)
• Cargo and pip for package management