Architecture
The Cogniteam Cloud Platform Agent is a modular, containerized edge service that bridges on-premise robots (ROS / ROS2) and Cogniteam Cloud. It standardizes telemetry, media, command & control, and remote management while remaining resource-aware and resilient to intermittent connectivity.
1. High-Level Goals
The agent is designed to:
- Provide a secure, bidirectional communication channel between edge devices and cloud services.
- Stream heterogeneous data (metrics, logs, video, point clouds) efficiently under variable bandwidth.
- Expose remote operations: file transfer, terminal access, configuration updates, and ROS interactions.
- Operate autonomously in degraded network states (buffer, retry, backoff) and recover transparently.
2. Core Components
| Component | Responsibility |
|---|---|
| Process Supervisor | Boots sub-modules, monitors liveness, restarts on failure. |
| Config Manager | Loads layered config (image defaults → device override → remote updates). Hot-reload for selected keys. |
| Cloud Connector | Maintains authenticated gRPC/TLS session; multiplexes RPC channels (telemetry, actions, file ops). |
| Streaming Pipeline | Encodes and transports media (WebRTC). Dynamically downgrades (resolution / FPS) based on congestion signals. |
| ROS Adapter | Subscribes/publishes to selected ROS/ROS2 topics; performs message shaping & throttling. |
| Data Normalizer | Converts raw inputs (ROS msgs, sensor packets) into canonical schemas before dispatch. |
| Command Dispatcher | Applies incoming cloud commands (start stream, run action, open terminal) with authorization checks. |
| Terminal Proxy | Provides remote shell / exec capability within confined sandbox rules. |
| Metrics & Health | Emits heartbeat, resource stats, module status; tracks failure counters. |
| Persistence Layer | Local lightweight store (e.g., SQLite / file-backed) for queued events when offline. |
3. Protocols & Interfaces
- gRPC: Primary control & telemetry channel (bi-directional streaming + unary RPCs).
- WebRTC: Media (video, audio, point cloud) using SRTP with congestion & jitter management.
- WebRTC is also used to tunnel USB connected video devices and IP RTSP cameras.
- Supports Bi-directional audio
- ROS/ROS2 Bridge: Topic subscription (rate-limit, QoS mapping), service invocation, action feedback relaying.
- File Transfer: Chunked, resumable; integrity validated (SHA256 + size) before activation.
- Remote Terminal: Multiplexed over secure gRPC stream with bounded session lifetime and audit logging.
- OOB - Out-Of-Band for RMI supporting devices (Including Serial-Over-Lan)
4. Security Layers
- Mutual TLS (device certificate or token exchange) for gRPC.
- Per-command authorization (policy map: capability → allowed roles / contexts).
- Sandboxed execution (restricted filesystem paths, memory & CPU quotas for spawned processes where supported).
- Audit trail (command ID, timestamps, actor identity, outcome, resource deltas).
- Secrets isolation (in-memory only; never logged). Rotating tokens refresh prior to expiry.
5. Reliability & Resilience
- Connection Supervisor: Exponential backoff with jitter; circuit-breaker for repeated TLS negotiation failures.
- Buffered Telemetry: Writes to local queue when disconnected; flushes FIFO on reconnect with size + age pruning.
- Stream Adaptation: Real-time downgrade (resolution, encoding bitrate) when packet loss > threshold; upgrade on sustained recovery.
- Health Probes: Internal self-check endpoints (not exposed externally) consumed by the supervisor.
- Graceful Degradation: Non-critical plugins shed first under resource pressure; core loop remains active.
6. Performance Strategies
- Batching small telemetry messages to reduce protocol overhead.
- Zero-copy frames (where platform permits) between capture and encoder.
- Adaptive encoder presets matched to hardware capabilities (ARM vs x86_64).
- Topic throttling / sampling to avoid flooding during bursts.
- Parallelism: IO-bound (streams) vs CPU-bound (encoding) separated via worker pools.
- Unified message rate mechanism for WebRTC and gRPC streams for consistent pacing under mixed protocols.
7. Failure Handling Examples
| Scenario | Mitigation |
|---|---|
| Cloud unreachable | Queue telemetry, retry with backoff; alert after threshold. |
| Stream congestion | Lower bitrate / resolution; pause secondary streams. |
| Corrupt file upload | Reject + request resend; log hash mismatch. |
| Unauthorized command | Deny; audit record with reason code. |
| Video recording instability | Improved buffering and segment flush logic; automatic recovery |
8. Observability
- Structured logs (JSON) with correlation IDs tying cloud requests to local actions.
- Metrics: CPU, memory, queue depth, stream stats (bitrate, RTT, loss), error counters.
- Traces (optional) via OpenTelemetry exporter when enabled.
- Enhancements:
- Alignment of single-message and continuous streaming layers in cloud viewers.
- Unified message rate mechanism; improved video recording stability.
Summary
The agent provides a secure, adaptive, and extensible bridge between edge robotics ecosystems and Cogniteam Cloud. Its architecture emphasizes resilience, observability, controlled extensibility, and efficient multimodal data handling—laying a foundation for scalable remote operations.
Quick Capability Recap
- Secure gRPC + WebRTC connectivity
- ROS/ROS2 topic / action bridging
- Adaptive media / point cloud streaming
- Remote terminal & file operations with audit
- Offline buffering & automatic recovery
- Pluggable extensions & policy-driven command execution