Skip to Content
ArchitectureMessage Broker (WAMP)

Message Broker (WAMP)

The WAMP message broker is the communication backbone of IronFlock. Every component — edge devices, central services, virtual devices, the AI system, and the web UI — connects to the broker and communicates through it.

Why WAMP

WAMP (Web Application Messaging Protocol) combines two communication patterns in a single protocol:

  • Publish/Subscribe (pub/sub) — A device publishes sensor data to a topic; dashboards, the FleetDB Service, and alarm evaluators subscribe and receive it in real time
  • Remote Procedure Calls (RPC) — The AI service calls a function on an edge device; the backend triggers an OTA update; an operator sends a command to a machine

This dual pattern means IronFlock doesn’t need separate systems for real-time data streaming and request-response operations. One protocol, one connection, both patterns.

How Components Connect

┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Edge │ │ Virtual │ │ Web UI │ │ Device │ │ Device │ │ (Browser) │ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │ WSS │ WSS │ WSS └────────────────────┼────────────────────┘ ┌───────┴───────┐ │ WAMP Broker │ └───────┬───────┘ ┌────────────────────┼────────────────────┐ │ WSS │ WSS │ WSS ┌──────┴───────┐ ┌──────┴───────┐ ┌──────┴───────┐ │ Backend │ │ FleetDB │ │ AI │ │ Service │ │ Service │ │ Service │ └──────────────┘ └──────────────┘ └──────────────┘

All connections use WSS (WebSocket Secure) — encrypted, persistent, bidirectional connections over TLS.

Project Isolation via Realms

The broker enforces strict isolation between projects using WAMP realms:

  • Each project-app combination gets its own realm — a completely isolated messaging namespace
  • Messages published in one realm are invisible to all other realms
  • Devices in Project A cannot see or interact with devices in Project B
  • Even the same app installed in two different projects operates in separate realms

Authentication

Every connection to the broker requires authentication:

ComponentAuth Method
Edge devicesWAMP-CRA (Challenge-Response) with per-device secrets
Backend servicesWAMP-CRA with system credentials
Web UI clientsOIDC-based session tokens
AI serviceSystem credentials with scoped access

Unauthorized clients cannot join a realm, subscribe to topics, or call procedures.

Real-Time Data Flow

Here’s how a sensor reading flows from a device to a dashboard:

  1. Device app reads a sensor value and publishes it to a WAMP topic in the project realm
  2. WAMP broker routes the message to all subscribers in that realm
  3. FleetDB Service receives the message, writes it to TimescaleDB, and evaluates alarm rules
  4. Web UI receives the same message and updates the dashboard chart in real time

This entire flow happens with sub-second latency — the dashboard updates as fast as the data arrives.

RPC for Device Control

The broker also enables direct control of edge devices:

  1. Operator clicks “Restart App” in the web UI
  2. Backend calls an RPC on the device agent through the broker
  3. Device agent receives the call, restarts the container, and returns the result
  4. Web UI displays the confirmation

The same mechanism powers physical AI — when the AI assistant invokes a function on a device, it’s an RPC call through the broker.

Scalability

The WAMP broker operates as a cluster in production deployments:

  • Multiple broker nodes handle concurrent connections
  • Load is distributed across nodes
  • Devices maintain persistent connections with automatic reconnection on failure
  • The broker handles thousands of concurrent device connections with low-latency message delivery

On-Premises Deployment

In on-premises deployments, the WAMP broker runs on your infrastructure alongside the other central services. The protocol and isolation guarantees remain identical — the only difference is the network path (local instead of internet).

See On-Premises Deployment for details.

Last updated on