Module 10/10 · Weeks 15 · 14 h

Information-system integration and performance monitoring

UAT 457 UAS for Transportation and Autonomous Delivery

About 95 minDraft, awaiting reviewLast updated 24 October 2026

Lesson

By the end of this module you will be able to

  1. Design the integration of a delivery system with ERP systems, apps, field equipment and UTM services using REST, webhooks and MQTT
  2. Write an event consumer that tolerates duplicate and out-of-order messages
  3. Design MQTT topics and estimate the data volume to receive and store
  4. Define SLIs and SLOs for a delivery service, compute percentiles, and track trends with a p chart

Prerequisites: Modules 6 to 9 · UAT 105 Digital Technology and Networks (MQTT and Mosquitto) · UAT 106 Statistics and Data Analytics for Technology

Why this matters

Factories on the estate do not want yet another app. Purchasing and production want their existing ERP system to place jobs by itself and to know job status without phoning. Estate management wants to know how good the service is, whether it pays, and when it gets worse. With poor integration, status data is duplicated, lost or out of order; with poor measurement, the team sees only a flattering average while one group of customers waits so long that they give up.

This module covers the last two topics of the course description: information-system integration and system performance monitoring.

The integration map

The fleet management system is a hub connected to six groups, each using the pattern that suits its data.

  • Factory ERP places jobs through REST (POST /jobs) and receives status through webhooks: our server calls a URL the factory registered whenever the status changes, instead of the factory asking repeatedly
  • Requester and recipient app reads status with GET /jobs/{id}
  • KPI dashboard receives every state-change event to compute indicators
  • Drones send telemetry and receive commands over MQTT
  • Docks and lockers send state and receive commands over MQTT
  • UTM service receives the operational intent of each flight
Diagram with a tall purple box in the centre for the fleet management server and MQTT broker. On the left: factory ERP sends POST /jobs in and receives webhooks out; requester app sends GET /jobs/{id} and receives status; KPI dashboard receives events. On the right: drones send telemetry in and receive cmd; docks and lockers send state and receive cmd; UTM/USS service receives intent
Figure 1 Integrating the delivery system with information systems

A general rule: human and enterprise systems that ask when they need something use REST, while devices that send frequent data over unstable networks use MQTT, which was designed for small messages and tolerance of lost connections.

APIs for external systems

An API used by many factories needs a clear, machine-readable contract. The OpenAPI Specification version 3.2 describes HTTP APIs so that both people and computers can understand a service’s capabilities without reading its source code (OpenAPI Initiative, 2026). Factory teams can generate client code and test suites from it straight away. A good contract states the following.

  • Resources and methods, such as POST /api/v1/jobs to create a job and GET /api/v1/jobs/{id} to read status, with v1 in the path so later changes do not break existing systems
  • Status codes per RFC 9110, such as 201 job created, 202 accepted but not yet processed, 409 conflict with the resource’s current state (for example cancelling a delivered job), and 422 understood but cannot be carried out
  • Units of every value, such as kg, min, and times in a standard format with time zone
  • Permissions: each factory has its own key and can see and change only its own jobs

A webhook event looks roughly like this.

{
  "event_id": "e5",
  "job": "J201",
  "seq": 5,
  "status": "DELIVERED",
  "time": "2026-10-01T09:42:17+07:00"
}

What every event consumer must know is that real networks do not guarantee one delivery in order. A sender that gets no acknowledgement sends again, and a later message may arrive first. The consumer must therefore be idempotent: receiving a message twice has the same effect as receiving it once. The usual method is to remember event_ids already received and use each job’s sequence number seq to decide whether a message is newer than the state already held.

Example 1 An event consumer that tolerates duplicates and disorder

A factory ERP receives the seven messages below in this order; e3 is repeated and e4 arrives after e5 (assumed).

# a factory system receives job-status events that may arrive twice or out of order
events = [  # (event_id, job, sequence number, status), in the order they arrived (assumed)
    ("e1", "J201", 1, "QUEUED"), ("e2", "J201", 2, "ASSIGNED"), ("e3", "J201", 3, "IN_FLIGHT"),
    ("e3", "J201", 3, "IN_FLIGHT"),                       # resent after a timeout
    ("e5", "J201", 5, "DELIVERED"), ("e4", "J201", 4, "AT_DEST"),   # 4 arrives after 5
    ("e6", "J202", 1, "QUEUED"),
]
seen, latest = set(), {}
for eid, job, seq, status in events:
    if eid in seen:
        print(f"{eid}: duplicate, ignored")
        continue
    seen.add(eid)
    if seq <= latest.get(job, (0, ""))[0]:
        print(f"{eid}: older than seq {latest[job][0]}, logged only")
        continue
    latest[job] = (seq, status)
    print(f"{eid}: {job} -> {status}")
print("final:", {j: s for j, (q, s) in latest.items()})
e1: J201 -> QUEUED
e2: J201 -> ASSIGNED
e3: J201 -> IN_FLIGHT
e3: duplicate, ignored
e5: J201 -> DELIVERED
e4: older than seq 5, logged only
e6: J202 -> QUEUED
final: {'J201': 'DELIVERED', 'J202': 'QUEUED'}

Without these checks, the late e4 would overwrite DELIVERED with AT_DEST and purchasing would think the item had not arrived. The old message is still logged, because its timestamp is useful for computing indicators.

MQTT for field equipment

MQTT version 5.0 is an OASIS standard (OASIS, 2019). Publish/subscribe through a broker and QoS levels were covered in UAT 105. A delivery system has some specific design points.

  • Topic structure, such as estate/v1/drone/D3/telemetry, estate/v1/drone/D3/status, estate/v1/drone/D3/cmd and estate/v1/dock/H2/state; the server subscribes to every drone with the wildcard estate/v1/drone/+/telemetry (+ matches one level, # all remaining levels)
  • Retained messages for the latest status, so a newly connected client gets the current state at once instead of waiting for the next update
  • Will message: the broker publishes a message on behalf of a device that disconnects abnormally, such as offline; MQTT 5 adds a Will Delay Interval to allow a quick reconnection before announcing it
  • Message Expiry Interval for commands: a “take off” command stuck in the broker that reaches the drone two minutes late may be more dangerous than one never received, so it must expire
  • QoS: telemetry can use QoS 0 because the next value comes soon; commands and important events use QoS 1, delivered at least once, so receivers must tolerate duplicates as in Example 1
  • Shared subscriptions ($share/{group name}/{filter}) spread messages across several processing workers as the fleet grows

The broker must also set per-device permissions so drone D3 can write only its own topics and read only its own commands, preventing a compromised device from commanding other aircraft.

Example 2 Message rate and data to store

Six drones send telemetry twice a second, about 260 bytes per message, flying 7 hours a day each. Eight docks and lockers report every 10 seconds all day, 400 bytes per message (assumed).

# MQTT telemetry load and storage for the fleet (assumed values)
drones, rate_hz, msg_bytes = 6, 2, 260          # telemetry messages carry JSON of about 260 bytes
docks, dock_period_s, dock_bytes = 8, 10, 400   # each dock reports its state every 10 s
flight_h_per_drone = 7                          # flying hours per drone per day

tel_msgs = drones * rate_hz * flight_h_per_drone * 3600
dock_msgs = docks * 24 * 3600 / dock_period_s
day_mb = (tel_msgs * msg_bytes + dock_msgs * dock_bytes) / 1e6
print(f"peak rate {drones * rate_hz + docks / dock_period_s:.1f} msg/s")
print(f"messages per day: telemetry {tel_msgs:,.0f}, docks {dock_msgs:,.0f}")
print(f"raw data {day_mb:.0f} MB/day, {day_mb * 365 / 1000:.1f} GB/year")
peak rate 12.8 msg/s
messages per day: telemetry 302,400, docks 69,120
raw data 106 MB/day, 38.8 GB/year

A small broker handles 12.8 messages per second easily, but nearly 40 GB of raw data a year needs a storage plan. The team keeps detailed telemetry for 90 days for incident investigation, then reduces it to per-flight summaries, while job state-change events, which are few, are kept in full because indicators are computed from them.

Integration with the UTM service goes through a USS under ASTM F3548. The delivery system submits each flight’s operational intent, the airspace volumes and times it will use, so conflicts with other airspace users are checked before flight, and it reports when a flight leaves its declared intent (ASTM International, 2021). The principles were covered in UAT 402 module 3; in the delivery system this is one item of the go/no-go check in module 9.

Service performance indicators

Monitoring starts by measuring what customers care about. Google’s Site Reliability Engineering book separates three terms (Jones and colleagues, 2017).

  • SLI (service level indicator): a measured value of service level, such as order-to-delivery time or the fraction of jobs completed
  • SLO (service level objective): a target for an SLI, such as 95% of jobs delivered within 30 minutes
  • SLA (service level agreement): an agreement with customers with consequences when an SLO is missed, such as a fee reduction

The book stresses percentiles rather than averages for times, because an average hides the group that waits abnormally long. The 50th percentile shows the typical experience; the 95th or 99th shows the bad cases some customers really meet.

Indicators for the estate delivery system fall into two groups. Customer-facing ones are on-time rate, order-to-delivery time (p50, p95) and success rate. Operational ones are drone and dock utilisation, first-attempt seated landing rate, diversions or avoidance stops per 100 flights, and drone availability during operating hours.

Example 3 Did we meet the SLO this week?

The estate promises that 95% of jobs arrive within 30 minutes. One week of 600 jobs is simulated with a fixed random seed (assumed).

import numpy as np
# one week of job records (simulated, seed fixed): order-to-delivery time and outcome
rng = np.random.default_rng(472)
n = 600
t = rng.lognormal(mean=np.log(17), sigma=0.35, size=n)     # minutes from order to hand-over
due = 30.0                                                  # promised: within 30 min
failed = rng.random(n) < 0.03                               # returned or cancelled after take-off

ok = ~failed
on_time = (t[ok] <= due).mean() * 100
p50, p90, p95, p99 = np.percentile(t[ok], [50, 90, 95, 99])
print(f"jobs {n}, delivered {ok.sum()}, success {ok.mean() * 100:.1f} %")
print(f"mean {t[ok].mean():.1f} min, p50 {p50:.1f}, p90 {p90:.1f}, p95 {p95:.1f}, p99 {p99:.1f} min")
print(f"on time (<= {due:.0f} min): {on_time:.1f} %  SLO 95 %: {'met' if on_time >= 95 else 'missed'}")
jobs 600, delivered 581, success 96.8 %
mean 18.4 min, p50 17.4, p90 26.7, p95 30.6, p99 36.7 min
on time (<= 30 min): 94.3 %  SLO 95 %: missed

The mean of 18.4 minutes looks far from 30, but p95 is 30.6 minutes and only 94.3% arrived on time, so the SLO is missed. The slowest 1% waited more than 36.7 minutes. The team must look further at which drop points and times the slow jobs belong to, for example the peak hour with high drone utilisation from module 7.

Horizontal bars of order-to-delivery time: p50 17.4 minutes in green, p90 26.7 minutes in yellow, p95 30.6 minutes and p99 36.7 minutes in pink, with a dashed pink line at the 30 minute promise
Figure 2 Order-to-delivery time over one week by percentile

Daily indicators move up and down on their own. If the team panics every time a number gets slightly worse, it wastes time hunting causes that do not exist. A control chart separates normal variation from abnormal variation with an assignable cause (Montgomery and Runger, 2018). For a proportion such as the daily late fraction, use a p chart: the centre line is the mean proportion and the control limits are , where is jobs per day. A point outside the limits is a signal to find the cause.

Example 4 A p chart of daily late deliveries

Over the last 14 days, with 80 jobs a day, the late counts were as listed (assumed).

import math
# p chart of the daily late-delivery fraction, 80 jobs per day (assumed counts)
late = [4, 3, 5, 2, 4, 6, 3, 4, 5, 3, 13, 4, 2, 5]
n = 80
p_bar = sum(late) / (n * len(late))
sigma = math.sqrt(p_bar * (1 - p_bar) / n)
ucl, lcl = p_bar + 3 * sigma, max(0.0, p_bar - 3 * sigma)
print(f"p-bar {p_bar:.4f}, UCL {ucl:.4f}, LCL {lcl:.4f}")
for day, k in enumerate(late, 1):
    p = k / n
    if p > ucl or p < lcl:
        print(f"day {day}: {k} late = {p:.3f} outside the limits, investigate")
p-bar 0.0563, UCL 0.1335, LCL 0.0000
day 11: 13 late = 0.163 outside the limits, investigate

Day 6, with 6 late jobs, looks worse than others but is within normal variation, so no cause hunt is needed. Day 11, with 13 late jobs (16.3%), is above the upper limit. The team checks the logs and finds (in this fictional case) that the W3 to W5 corridor was closed all day for a crane and the extra flight time was not added to the ETA estimate. This finding feeds straight back into the intake gate of module 6 and the scheduling of module 7.

Line chart of the daily late fraction over 14 days. Most values lie between 0.025 and 0.075 around a green centre line at 0.056; day 11 is a pink point at 0.163, above the dashed pink UCL at 0.134
Figure 3 p chart of the daily late-delivery fraction

Module lab

Lab: an end-to-end mock delivery system and dashboard

  1. Write an OpenAPI document for POST /api/v1/jobs and GET /api/v1/jobs/{id} with units, status codes and example requests, then build a mock server that uses the intake gate from module 6
  2. Set up a Mosquitto broker, design topics for drones and docks, set per-device permissions, use retained messages for status and a will message for offline, and test with a SITL drone or a simulator
  3. Write a webhook consumer following Example 1 and test it by deliberately repeating and reordering messages
  4. Run the mock system for at least an hour or use simulated data, compute SLIs with the code in Example 3 and a p chart with Example 4, and summarise them in a one-page report

Common mistakes

Watch out

  • Letting the ERP poll status every few seconds instead of using webhooks, loading the server for nothing
  • Event consumers that cannot handle duplicates or disorder, so the latest state is overwritten by an old message
  • MQTT commands without an expiry, so a stuck command reaches the drone late and is executed at the wrong time
  • Reporting only averages, hiding customers who wait long; use p95 and the on-time rate
  • Hunting causes whenever a number dips slightly, instead of checking the control chart for variation beyond normal

Summary

  • Enterprise systems connect through REST under an OpenAPI contract and receive status by webhook; field equipment uses MQTT
  • Event consumers must be idempotent, using event_id against duplicates and sequence numbers against stale overwrites
  • Design topics, retained messages, will messages, message expiry, QoS and per-device permissions, and estimate data volume with
  • Define SLIs and SLOs, use percentiles rather than averages, and use a p chart to separate normal variation from abnormal

Check your understanding

  1. Ten drones send telemetry once a second, 300 bytes per message, flying 8 hours a day each. How many messages and how many MB per day?
  2. 400 jobs were delivered and 372 arrived within the promised time. The SLO is 95%. Is it met?
  3. The mean late fraction is 0.05 with 100 jobs a day. What is the upper control limit of the p chart?
  4. Why should a take-off command sent over MQTT carry a Message Expiry Interval?
  5. Why do webhook events need a per-job sequence number and not just a timestamp?
Answers
  1. messages bytes MB per day
  2. , below 95%, so it is not met
  3. A command stuck in the broker that reaches the drone late may be executed after the situation has changed, which is more dangerous than not receiving it, so it should expire and the server should decide again
  4. Clocks on different systems may differ and events may happen within the same second; a sequence number incremented by the sender gives a definite order, so the consumer can tell which message is older

Key formulas

Data volume per day
On-time rate
p chart control limits

Key references

  1. OpenAPI Initiative. (2026). OpenAPI specification (Version 3.2.1). link
  2. Fielding, R. (Ed.), Nottingham, M. (Ed.), & Reschke, J. (Ed.). (2022). HTTP semantics (RFC 9110). RFC Editor. link
  3. OASIS. (2019). MQTT version 5.0 (OASIS Standard, 7 March 2019). link
  4. ASTM International. (2021). Standard specification for UAS traffic management (UTM) UAS service supplier (USS) interoperability (ASTM F3548-21). link
  5. Jones, C., Wilkes, J., Murphy, N., & Smith, C. (2017). Service level objectives. In B. Beyer, C. Jones, J. Petoff, & N. R. Murphy (Eds.), Site reliability engineering: How Google runs production systems. O'Reilly Media. link
  6. Montgomery, D. C., & Runger, G. C. (2018). Applied statistics and probability for engineers (7th ed.). Wiley. link

Further reading

Study the assigned knowledge units in advance, review media and take the module quiz

In class / field

Lab or field practice from worksheets with a safety checklist

Learning evidence: Checked worksheets and quiz results

Module quiz

This is a formative self-check, not a graded exam

Knowledge domain: Communications, networks and IoT · Programming and digital technology · Cybersecurity and UAS traffic management · Law, safety and risk