# storypku/cyberrt architecture

> Architecture diagram of the GitHub repository storypku/cyberrt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/storypku/cyberrt
- Repository: https://github.com/storypku/cyberrt

## Overview

Apollo Cyber RT is a robotics-oriented runtime for loading application components, scheduling their work, and exchanging typed data across nodes. Its central workflow is application configuration → component loading and execution → node/channel communication → downstream consumers. The repository also provides discovery, services and parameters, data fusion, recording/playback, monitoring, and Python bindings. The tree and excerpts establish these product areas, but do not expose every call path; uncertain wiring is omitted.

Main entry points: [`cyber/mainboard/module_controller.cc`](https://github.com/storypku/cyberrt/blob/master/cyber/mainboard/module_controller.cc) (Module controller), [`cyber/transport/transport.h`](https://github.com/storypku/cyberrt/blob/master/cyber/transport/transport.h) (Message transport), [`cyber/node/node.h`](https://github.com/storypku/cyberrt/blob/master/cyber/node/node.h) (Nodes and APIs), [`cyber/proto/dag_conf.proto`](https://github.com/storypku/cyberrt/blob/master/cyber/proto/dag_conf.proto) (DAG configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Application execution"]
  node_dag["DAG configuration<br/>[dag_conf.proto]"]
  node_mainboard["Module controller"]
  node_loader["Class loader"]
  node_component["Components<br/>[component.h]"]
  node_task["Task manager<br/>[task_manager.cc]"]
  node_scheduler["Scheduler<br/>[scheduler.cc]"]
end

subgraph group_communication["Communication runtime"]
  node_node["Nodes and APIs<br/>[node.h]"]
  node_transport["Message transport<br/>[transport.h]"]
  node_data["Data dispatch<br/>[data_dispatcher.h]"]
  node_fusion["Data fusion<br/>[data_fusion.h]"]
  node_discovery["Topology discovery"]
  node_services["Services<br/>[service.h]"]
end

subgraph group_operations["Runtime operations"]
  node_parameters["Parameters"]
  node_record_api["Record APIs<br/>[record_reader.cc]"]
  node_record_files[("Record files")]
end

subgraph group_tools["Developer tools"]
  node_recorder["Recorder and player<br/>[main.cc]"]
  node_monitor["Topology monitor<br/>[main.cc]"]
  node_python["Python bindings<br/>[py_cyber.cc]"]
end

node_developer(("Application developer"))

node_developer -->|"defines modules"| node_dag
node_dag -->|"configures"| node_mainboard
node_mainboard -->|"loads classes"| node_loader
node_mainboard -->|"initializes"| node_component
node_component -->|"submits work"| node_task
node_task -->|"creates tasks"| node_scheduler
node_node -->|"publishes messages"| node_transport
node_transport -->|"dispatches data"| node_data
node_data -->|"supplies messages"| node_fusion
node_transport -->|"announces topology"| node_discovery
node_node -->|"offers requests"| node_services
node_developer -->|"sets parameters"| node_parameters
node_recorder -->|"records or reads"| node_record_api
node_record_api -->|"reads and writes"| node_record_files
node_monitor -->|"queries topology"| node_discovery
node_python -.->|"exposes APIs"| node_node

click node_dag "https://github.com/storypku/cyberrt/blob/master/cyber/proto/dag_conf.proto"
click node_mainboard "https://github.com/storypku/cyberrt/blob/master/cyber/mainboard/module_controller.cc"
click node_loader "https://github.com/storypku/cyberrt/blob/master/cyber/class_loader/class_loader_manager.h"
click node_component "https://github.com/storypku/cyberrt/blob/master/cyber/component/component.h"
click node_task "https://github.com/storypku/cyberrt/blob/master/cyber/task/task_manager.cc"
click node_scheduler "https://github.com/storypku/cyberrt/blob/master/cyber/scheduler/scheduler.cc"
click node_node "https://github.com/storypku/cyberrt/blob/master/cyber/node/node.h"
click node_transport "https://github.com/storypku/cyberrt/blob/master/cyber/transport/transport.h"
click node_data "https://github.com/storypku/cyberrt/blob/master/cyber/data/data_dispatcher.h"
click node_fusion "https://github.com/storypku/cyberrt/blob/master/cyber/data/fusion/data_fusion.h"
click node_discovery "https://github.com/storypku/cyberrt/blob/master/cyber/service_discovery/topology_manager.cc"
click node_services "https://github.com/storypku/cyberrt/blob/master/cyber/service/service.h"
click node_parameters "https://github.com/storypku/cyberrt/blob/master/cyber/parameter/parameter_server.cc"
click node_record_api "https://github.com/storypku/cyberrt/blob/master/cyber/record/record_reader.cc"
click node_record_files "https://github.com/storypku/cyberrt/blob/master/cyber/record/file/record_file_base.cc"
click node_recorder "https://github.com/storypku/cyberrt/blob/master/cyber/tools/cyber_recorder/main.cc"
click node_monitor "https://github.com/storypku/cyberrt/blob/master/cyber/tools/cyber_monitor/main.cc"
click node_python "https://github.com/storypku/cyberrt/blob/master/cyber_py3/internal/py_cyber.cc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dag,node_mainboard,node_loader,node_component,node_task,node_scheduler toneBlue
class node_node,node_transport,node_data,node_fusion,node_discovery,node_services toneAmber
class node_parameters,node_record_api,node_record_files toneMint
class node_recorder,node_monitor,node_python toneRose
class node_developer toneIndigo
```

## Components

### Application execution

- [DAG configuration](https://github.com/storypku/cyberrt/blob/master/cyber/proto/dag_conf.proto): `cyber/proto/dag_conf.proto`
- [Module controller](https://github.com/storypku/cyberrt/blob/master/cyber/mainboard/module_controller.cc): `cyber/mainboard/module_controller.cc`
- [Class loader](https://github.com/storypku/cyberrt/blob/master/cyber/class_loader/class_loader_manager.h): `cyber/class_loader/class_loader_manager.h`
- [Components](https://github.com/storypku/cyberrt/blob/master/cyber/component/component.h): `cyber/component/component.h`
- [Task manager](https://github.com/storypku/cyberrt/blob/master/cyber/task/task_manager.cc): `cyber/task/task_manager.cc`
- [Scheduler](https://github.com/storypku/cyberrt/blob/master/cyber/scheduler/scheduler.cc): `cyber/scheduler/scheduler.cc`

### Communication runtime

- [Nodes and APIs](https://github.com/storypku/cyberrt/blob/master/cyber/node/node.h): `cyber/node/node.h`
- [Message transport](https://github.com/storypku/cyberrt/blob/master/cyber/transport/transport.h): `cyber/transport/transport.h`
- [Data dispatch](https://github.com/storypku/cyberrt/blob/master/cyber/data/data_dispatcher.h): `cyber/data/data_dispatcher.h`
- [Data fusion](https://github.com/storypku/cyberrt/blob/master/cyber/data/fusion/data_fusion.h): `cyber/data/fusion/data_fusion.h`
- [Topology discovery](https://github.com/storypku/cyberrt/blob/master/cyber/service_discovery/topology_manager.cc): `cyber/service_discovery/topology_manager.cc`
- [Services](https://github.com/storypku/cyberrt/blob/master/cyber/service/service.h): `cyber/service/service.h`

### Runtime operations

- [Parameters](https://github.com/storypku/cyberrt/blob/master/cyber/parameter/parameter_server.cc): `cyber/parameter/parameter_server.cc`
- [Record APIs](https://github.com/storypku/cyberrt/blob/master/cyber/record/record_reader.cc): `cyber/record/record_reader.cc`
- [Record files](https://github.com/storypku/cyberrt/blob/master/cyber/record/file/record_file_base.cc): `cyber/record/file/record_file_base.cc`

### Developer tools

- [Recorder and player](https://github.com/storypku/cyberrt/blob/master/cyber/tools/cyber_recorder/main.cc): `cyber/tools/cyber_recorder/main.cc`
- [Topology monitor](https://github.com/storypku/cyberrt/blob/master/cyber/tools/cyber_monitor/main.cc): `cyber/tools/cyber_monitor/main.cc`
- [Python bindings](https://github.com/storypku/cyberrt/blob/master/cyber_py3/internal/py_cyber.cc): `cyber_py3/internal/py_cyber.cc`

### Other components

- **Application developer**

## Connections

- Application developer → DAG configuration: defines modules
- DAG configuration → Module controller: configures
- Module controller → Class loader: loads classes
- Module controller → Components: initializes
- Components → Task manager: submits work
- Task manager → Scheduler: creates tasks
- Nodes and APIs → Message transport: publishes messages
- Message transport → Data dispatch: dispatches data
- Data dispatch → Data fusion: supplies messages
- Message transport → Topology discovery: announces topology
- Nodes and APIs → Services: offers requests
- Application developer → Parameters: sets parameters
- Recorder and player → Record APIs: records or reads
- Record APIs → Record files: reads and writes
- Topology monitor → Topology discovery: queries topology
- Python bindings → Nodes and APIs: exposes APIs
