System Overview
Design Principle: Separating Control and Data Responsibilities
A key design point in CoBiz is the separation between the two planes.
- Control: domain state, policies, authentication, Workflows, Tasks, and operational events managed by CoBiz Server
- Data: video, audio, sensor, and control Tracks delivered by Moth
This separation allows real-time media handling and business-domain state transitions to be operated as distinct responsibilities.
System components
| Component | Role |
|---|---|
| CoBiz | Responsible for operator UI, authentication, device management, workflow execution, and orchestration of the overall server components. |
| Device | A physical robot or agent that publishes sensor data to Moth, receives assigned Tasks, and reports back to CoBiz. |
| Moth | A real-time data and event hub that relays device sensor data, control data, and cross-service event messages. |
| TGDM | A recording solution for Moth network streams. It records by consuming stream URIs from Moth. |
| Mantis | AI analysis pipeline server that consumes specific Tracks and produces analysis streams and events |
System architecture
Data exchange perspective: Moth-centric connectivity
Client, Server, Device, TGDM, and Mantis are all participants connected to Moth.
- Client ↔ Moth: subscribes to server events, subscribes to Tracks, publishes control messages
- Server ↔ Moth: operates the client event channel and the device management channel
- Device ↔ Moth: exchanges video, audio, sensor, and control Tracks
- TGDM ↔ Moth: consumes recording-source stream URIs
- Mantis ↔ Moth: consumes analysis input streams and output references
Orchestration perspective: CoBiz-centered structure
CoBiz Server is at the center of domain-state management, while the other components exchange data through Moth.
- Devices register with the Server and report Task progress.
- The Server instructs Devices to execute Tasks and apply operating control.
- The Server sends recording requests and policies to TGDM.
- The Server requests pipeline creation, stop, and mapping management from Mantis.
- TGDM and Mantis consume Moth Track URIs for real data access.
In short, logical interactions are centered on CoBiz Server, while the real-time transport implementation is handled by Moth.
Layer responsibilities
CoBiz Client
- Uses REST APIs to query and change devices, Workflows, Workflow Runs, Tasks, and server settings
- Subscribes to the server event stream through
/moth/events - Receives selected device Track endpoints and connects directly to Moth
- Updates device state, current Task, Workflow history, and AI pipeline state from events
CoBiz Server
- Issues tokens when devices are registered
- Manages runtime settings for
device,tgdm, andmantis - Manages Task, Workflow, and Workflow Run state transitions
- Performs follow-up actions based on device connect/disconnect events and Task events
- Publishes client events and device-management messages through Moth
- Calls TGDM and Mantis as external integration services
Device
- Uses its issued device token to identify its Tracks
- Exchanges video, audio, sensor, and control channels through Moth
- Receives
TASK_REGISTERED,HEALTHCHECK, and similar messages on the Moth device channel - Reports Task status to CoBiz Server through the
start,complete,reject, andabortAPIs - Sends heartbeats as health-check responses
Moth
- Relays device Tracks in real time
- Provides the
clientTrack for server events - Provides the
deviceTrack for device-management traffic - Acts as the real-time bus that loosely couples CoBiz Server, Client, Device, TGDM, and Mantis
TGDM / Mantis
- TGDM: creates recording files from Moth URIs
- Mantis: creates AI analysis streams from Moth URIs