Reference architecture

Five layers between a sensor reading and a decision

Pick a layer to see what runs there, what we build versus what we buy, the questions we will ask you about it in week one, and the failure we most often inherit.

Device

Where the measurement happens

The part that lives in the cold, on a pole, or bolted to a machine. Everything above it is only as good as the sampling, power and radio decisions made here, and those are the hardest to change once units are in the field.

What runs here

  • Sensor drivers and calibration
  • Sampling and local thresholds
  • Store-and-forward buffer
  • Signed OTA client
  • Secure element key storage

Typically built with

  • Zephyr RTOS or ESP-IDF
  • C / C++
  • BLE, Wi-Fi, LoRa or cellular
  • MQTT over mutual TLS

Questions we ask in week one

  • How often does this really need to report?
  • What is the power source and the target life?
  • What happens if it cannot reach the network for a week?
  • Who physically installs it, and what can they be expected to do?
The failure we inherit most often at this layer

A power budget that assumed one transmission an hour, and a product manager who later wanted one a minute.

One reading, end to end

What happens between the sample and the operator

The path a single measurement takes, and which layer owns each step. Most incidents are traced by walking this list from the top.

#StepOwned byWhat happens
01SampleDeviceA reading is taken, calibrated on-device, and timestamped against the device clock synced over NTP or the network.
02BufferDevice or gatewayIf the link is up, the reading is published immediately. If not, it lands in flash with its original timestamp and waits.
03AuthenticateIngestThe broker verifies the device certificate and checks it is permitted to publish on that topic. Unknown identities are rejected at the edge.
04ValidateIngestThe payload is checked against a versioned schema. Anything that fails goes to the dead-letter topic with the reason attached, never silently dropped.
05PersistIngestBatched writes into the time-series store. Raw telemetry is retained to policy; rollups are computed for anything a chart will read.
06EvaluateServicesRules run against the reading and any recent context. A breach opens an incident rather than firing a bare notification.
07NotifyServicesRouting decides who gets told, on what channel, and what happens if they do not acknowledge within the window.
08ActConsoleThe operator sees the incident with history, acknowledges it, and either resolves it or dispatches someone. Every action is recorded against the device.
Choosing a link

The radio decision is the one you cannot undo

Everything else on this page can be changed after launch. This cannot, so it gets decided in discovery with measurements rather than preferences.

LinkRangePowerRateBest forWatch out for
BLELow cost10–100 mVery low125 kbps – 2 MbpsProvisioning, wearables, short-range sensors near a phone or gatewayNeeds something nearby to talk to. Range claims assume line of sight.
Wi-FiLow cost30–100 mHighTens of MbpsMains-powered devices on a site you controlCredential management across thousands of customer networks is the real cost.
LoRaWANMedium cost2–15 kmVery low0.3–50 kbpsBattery sensors reporting small payloads over long distancesDuty cycle limits. Do not plan on firmware updates over this link.
NB-IoT / LTE-MMedium, recurring costCellularLow to medium20 kbps – 1 MbpsDevices spread across geography with no site network to joinPer-device data plans and coverage gaps in exactly the rural sites you care about.
Modbus / OPC UALow costWired siteMainsSerial to EthernetExisting industrial equipment that already speaks itRegister maps differ per vendor and are frequently wrong in the manual.
Sizing

Work out what your fleet will actually generate

Move the sliders to see the peak rate, the daily volume and the storage footprint. The peak is what sizes the architecture, and it is almost never the number people arrive with.

5,000
Plan for the fleet at the end of the contract, not the pilot.
15 min
The most common mistake here is choosing a rate nobody actually needs.
140 bytes
A compact binary payload is often a quarter the size of the obvious JSON.
24 months
Regulatory retention is usually shorter than people assume. Ask before you size.
Tariff periods, shift changes and site power cuts all synchronise a fleet. A few seconds of random jitter on the device flattens the spike for free.

What this implies

Average rate
6 msg/s
Peak rate
833 msg/s
Messages per day
480,000
Ingest per day
67.2 MB
Stored at retention
65.3 GB
Broker
Mosquitto is enough
Buffer
Redis Streams

Small enough that the simplest thing works. Do not buy a streaming platform for this.

Bring us the number you are least sure about

Peak message rate, target battery life, or the retention period nobody has confirmed. Those three questions shape most of the architecture above.

Why peaks matter