Delivered remotely for a business based in Helsinki, Finland. Names withheld by agreement.
Project Overview
Managing distributed industrial controllers—from grid inverters and cold-chain gateways to automated factory sensors—turns brittle once fleets expand beyond a single lab environment. Field devices operate behind erratic cellular backhauls, enter deep sleep cycles, and stay deployed for years, making manual SSH maintenance impossible and uncoordinated firmware pushes dangerously expensive.
We engineered an industrial IoT device management platform built with Go, MQTT, and React. The system unifies X.509 device identity, persistent digital-twin configuration sync, real-time health telemetry, and cryptographically signed Over-the-Air (OTA) firmware rollouts under a single control plane designed for unreliable field networks.
Field Connectivity & Firmware Risks
Operating connected industrial hardware at scale introduces constraints absent from standard cloud web applications:
- Asymmetric firmware failure cost: Pushing an untested binary to remote devices without staged blast-radius limits can require costly physical truck rolls to recover unbootable hardware.
- Intermittent connectivity and sleep cycles: Devices drop offline mid-download or miss configuration broadcasts while conserving battery, causing naive push commands to fail silently.
- Broker saturation under reconnect storms: Regional cellular outages cause thousands of devices to reconnect simultaneously, overwhelming stateful listeners if telemetry and binary transfers share the same channel.
- Fragmented fleet visibility: Firmware teams struggle to correlate device crash loops, RSSI signal drops, and hardware revisions when telemetry lives in separate tools from deployment logs.
Architectural Strategy
Our architecture separates lightweight control signaling from bulk binary distribution. Devices maintain persistent or periodic MQTT v5 sessions authenticated via mutual TLS (mTLS) solely for heartbeats, digital twin deltas, and signed OTA job notifications. Actual firmware binaries and delta patches reside in signed object storage fetched via resumable HTTPS range requests.
A Go control plane acts as the deterministic state machine for every device twin and rollout wave. Rather than broadcasting fire-and-forget updates, the orchestrator tracks per-device acknowledgment stages (QUEUED, DOWNLOADING, VERIFYING, COMMITTED, ROLLED_BACK) in PostgreSQL, pausing entire campaigns automatically if canary error rates breach configured thresholds.
Core Capabilities
- Staged Canary OTA Campaigns: Targets devices by hardware revision, firmware version, or site tag, advancing progressively through gated rollout rings with automated failure-threshold circuit breakers.
- Cryptographic Firmware Verification: Signs firmware manifests with Ed25519 keys verified by the device bootloader alongside A/B partition health checks before committing a boot slot.
- Versioned Digital Twin Sync: Stores desired and reported configuration schemas in PostgreSQL, reconciling missed parameter updates automatically when offline nodes reconnect.
- Real-Time Telemetry & Diagnostics: Streams bounded device metrics—CPU load, memory headroom, link quality, and fault codes—into TimescaleDB for fleet anomaly inspection.
- React Fleet Operations Console: Gives reliability engineers live rollout progress bars, cohort drill-downs, remote log-bundle triggers, and certificate revocation controls.
Technical Architecture
Field gateways establish mTLS connections using unique X.509 device certificates to a clustered MQTT v5 broker. Broker ACLs restrict each unit to its scoped telemetry, twin, and job topics. Stateless Go consumers pull messages via MQTT shared subscriptions, persisting configuration reports to PostgreSQL and time-series metrics to TimescaleDB. When an engineer launches an OTA campaign in the React console, Go rollout workers transition cohort twins, issue signed job payloads over MQTT, and direct devices to download delta images via pre-signed HTTPS URLs.
Flow: Field Devices (mTLS) → Clustered MQTT v5 Broker → Go Shared-Subscription Consumers → PostgreSQL (Twins & OTA State) + TimescaleDB (Telemetry) → Go Control-Plane API → React Fleet Operations Console
Splitting telemetry ingestion from the OTA campaign state machine ensures bursty sensor traffic never stalls critical deployment abort commands.
Technology Stack
| Category | Technology detail |
|---|---|
| Control Plane & Workers | Go microservices managing OTA wave state machines, twin reconciliation, and alerts |
| Device Messaging | Clustered MQTT v5 broker enforcing mTLS client certificates and topic ACLs |
| Fleet Operations Console | React and TypeScript dashboard for cohort targeting, rollout controls, and live telemetry |
| Device Registry & State | PostgreSQL storing hardware cohorts, desired/reported twin documents, and rollout ledgers |
| Telemetry Time Series | TimescaleDB ingesting bounded health heartbeats, battery diagnostics, and error counters |
| Artifact Distribution | Signed object storage serving delta firmware images via short-lived pre-signed URLs |
| Identity & Trust | X.509 mTLS certificate authority lifecycle with automated rotation and CRL revocation |
| Stream Routing | Shared MQTT subscriptions distributing incoming device telemetry across stateless Go consumers |
Engineering Trade-offs & Solutions
| Engineering Challenge | Solution & Trade-off |
|---|---|
| Delivering multi-megabyte firmware updates over constrained cellular links | Used MQTT solely for lightweight job manifests while serving binary delta patches via HTTPS range requests; adds a dual-protocol requirement on the device agent in exchange for resumable transfers and stable broker throughput. |
| Preventing reconnect storms after carrier outages from stalling ingestion | Enforced randomized jittered backoff on device clients combined with MQTT shared subscriptions across horizontally scalable Go workers; trades a short window of delayed reconnects for bounded broker CPU load. |
| Guarding against silent configuration drift on intermittently connected units | Adopted optimistic locking on desired/reported twin version numbers in PostgreSQL rather than imperative RPC calls; guarantees eventual consistency without blocking operators on offline units. |
| Rolling back bad updates when newly flashed firmware breaks network connectivity | Paired cloud-side canary health gates with an on-device watchdog timer requiring post-boot MQTT check-in before marking the new A/B flash partition permanent; increases flash storage overhead on hardware while preventing remote bricks. |
Security & Reliability
Industrial infrastructure demands defense-in-depth from bootloader to web console. Every field controller authenticates via a unique X.509 certificate provisioned during manufacturing and bound to hardware secure elements where supported. MQTT broker policies enforce strict topic ownership so a compromised unit cannot impersonate peers or inject rogue telemetry into neighboring tenants.
Firmware artifacts never rely solely on transport encryption: build pipelines sign image hashes offline, and devices verify signatures prior to flashing. On the cloud side, PostgreSQL transactions protect OTA wave transitions with idempotent state checks, ensuring duplicate MQTT QoS 1 deliveries never trigger redundant reboots or double-count rollout failures.
Performance & Scale
MQTT v5 shared subscriptions allow Go telemetry consumers to scale out cleanly as device counts grow, keeping per-connection state inside the broker cluster while backend workers remain stateless. TimescaleDB chunks incoming health metrics automatically by time interval, applying native compression to older diagnostic partitions so long-term fleet comparisons stay fast without runaway disk costs.
In the React fleet console, cohort tables and live rollout trackers fetch pre-aggregated status counts from PostgreSQL rather than scanning raw device logs, keeping operator workflows fluid even during active multi-region firmware deployments.
Operational Outcomes
Consolidating firmware distribution, identity lifecycle, and health telemetry into a cohesive Go, MQTT, and React platform transformed field reliability operations:
- Controlled rollout blast radius: Staged canary waves and automatic halt thresholds catch boot or connectivity regressions in small cohorts before touching critical production sites.
- Deterministic offline convergence: Digital twin versioning eliminates manual follow-up scripts when disconnected hardware comes back online days later.
- Unified troubleshooting context: Operators inspect historical signal strength, reboot counts, and active firmware revisions in one console without stitching logs manually.
- Zero-touch security hygiene: Automated certificate rotation and instant topic revocation harden large hardware deployments without field technician intervention.