Distributed Edge Telemetry & Control Plane

edge-telemetry-plane

MQTT → Rust edge (NATS JetStream) → gRPC → Go cloud (Kafka → TimescaleDB). A runnable reference stack for factory and fleet telemetry with a clear edge/cloud boundary.

Rust Edge Go Cloud Protobuf gRPC NATS JetStream Kafka TimescaleDB Docker Compose
1883
MQTT
4222
NATS
50051
gRPC
1
Proto contract
02 / 06
Why DETCP

Survive WAN blips with durable edge buffering

Factory floors are noisy. Cloud analytics need typed, batched telemetry — without losing samples when the link drops.

🛡 WAN resilience

JetStream file-backed queue buffers telemetry before gRPC sync to cloud.

📜 One contract

detcp.v1 Protobuf + EdgeSyncService gRPC — edge and cloud stay aligned.

🐳 Runnable locally

make up + Python fleet simulator → rows in TimescaleDB in minutes.

Roadmap (planned)

OpenTelemetry (Collector, Jaeger, Grafana) and mTLS on gRPC. The ingestion hot path works in Docker Compose today.

03 / 06
Architecture

Factory edge → cloud plane

Factory Edge Devices ──MQTT JSON──► edge-gateway (Rust) │ ▼ NATS JetStream (file-backed) │ ▼ edge-sync (Rust) │ gRPC batches ▼ Cloud Plane ingress (Go) ──► Kafka ──► processor (Go) ──► TimescaleDB Ports: 1883 MQTT · 4222 NATS · 50051 gRPC · 5432 Timescale · 9092 Kafka
04 / 06
Repository

Layout & Makefile

PathPurpose
proto/detcp.v1 Protobuf + gRPC EdgeSyncService
edge/edge-gateway, edge-sync (Rust)
cloud-plane/gRPC ingress + Kafka consumer → DB (Go)
deploy/Compose, Mosquitto, Timescale init SQL
scripts/Fleet simulator, dev layout check
docs/Architecture, phased plan, chaos runbook

make up / make down

Start or stop the full stack (volumes removed on down).

make proto · make smoke

Regenerate Go from .proto; run dev check script.

05 / 06
Quick Start

From clone to COUNT(*)

make up
Docker stack
Simulator
10 robots @ 0.5s
TimescaleDB
telemetry_points
git clone https://github.com/vgandhi1/edge-telemetry-plane.git
cd edge-telemetry-plane && make up

python3 -m venv .venv && . .venv/bin/activate
pip install -r scripts/requirements.txt
python3 scripts/simulate_robot_fleet.py --count 10 --interval 0.5

docker compose -f deploy/docker-compose.yml exec timescaledb \
  psql -U detcp -d detcp -c "SELECT COUNT(*) FROM telemetry_points;"
06 / 06
Summary

Clear boundary between factory floor
and cloud analytics

DETCP: durable edge buffering, typed batches, and a path to scale with Kafka + time-series storage.

github.com/vgandhi1/edge-telemetry-plane MIT License
View Repository →