EMMA
Distributed QoS-Aware MQTT Middleware
for Edge Computing Applications
Thomas Rausch, Stefan Nastic, Schahram Dustdar
TU Wien
Distributed Systems Group
http://dsg.tuwien.ac.at
2
AWS IoT
3
Subscribe to topic:
/robot/arm
Publish “move x,y,z” to
/robot/arm
Decoupled messaging
4
Trust?!
Availability?!
End-to-end latency: ??ms!
5
Edge-Enabled MOM
Data centers
Internet
Mobile
edge
Extreme
edge
IoT
Cloudlets
Message broker
Cloud-based MOM
Edge-enabled MOM
Scale
Proximity &
Responsiveness
6
▪ Popular platform for IoT
– ISO standardized pub/sub protocol
– Low-bandwidth design
▪ Simple Protocol
– CONNACK
– SUBSCRIBE(t), SUBACK(t)
– PUBLISH(t, msg)
– ...
7
Static MQTT Topic Bridging
Local Broker
Central
Broker
Internal
Topics
Static
config
Static
config
Cloud
M. Garcia, “How to Bridge Mosquitto MQTT Broker to AWS IoT”
The Internet of Things on AWS -- Official Blog, 2016.
https://aws.amazon.com/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/
Edge
Topic Bridge
8
Goals
▪ Decentralized messaging middleware
▪ Leverages edge resources to reduce latency
▪ Can handle mobile clients
▪ Can handle volatile resources
▪ Seamlessly integrates with IoT infrastructure
9
EMMA MQTT Middleware
Client
GW
c
GW
c
Broker
Broker
Device
Monitoringprotocol
Controller
Bridging
Tables
Gateway
Bridging
Table
Reconfigura-
tion Engine
REST Endpoints
Network
monitor
Buffer out
Buffer in
MQTT
Server
Discovery Service
https://git.dsg.tuwien.ac.at/emma/emma
10
QoS Optimization & Balancing
0-2 ms
2-5
5-10
PINGREQ
PINGRESP
Broker Gateway▪ Continuously monitor network
QoS via simple UDP protocol
▪ For each client create
latency group to brokers
▪ Connect gateways to
a broker in closest group
▪ Balance load between
brokers in same group
11
Orchestration
:b1::b2::gateway::controller
SUBSCRIBE
...
CONNECT
DISCONNECT
replay
control
packets
TCP connect
TCP open
update
network
RECONACK(b2)
RECONREQ(b2)
:brokerA
:controller:gateway:client
CONNACK
CONNACK
lookup
result(brokerA)
store
packet
CONNECT
CONNECT
12
Evaluation
us-east eu-west
eu-central
BrokerGateway BrokerGateway
Controller
... ...
Gateway
Broker
98 ms 27 ms
85 ms
https://git.dsg.tuwien.ac.at/emma/pubsub-benchmark
13
Controller
eu-west
eu-centralus-east
14
Controller
<1 ms
98 ms
27 ms
85 ms
15
Controller
16
Controller
17
Controller
18
Controller
19
Controller
20
Controller
21
Controller
22
Message Loss
▪ Caused by subscriber mobility
▪ Guaranteed message delivery requires
transactional reconnection
23
More Results in the Paper
71
2
3 4 5 6 8
24
Dipl.-Ing. (MSc)
Thomas Rausch
Research Assistant
TU Wien
Distributed Systems Group
Argentinierstraße 8/194-02, 1040, Vienna, Austria
T: +43 1 58801 184 838
E: t.rausch@dsg.tuwien.ac.at
dsg.tuwien.ac.at/staff/trausch
QoS Monitoring & Reconfiguration
25
Related Work – P2P Pub/Sub
NCA’05
DEBS’05
MW’05
PODC’07
26
State of the Art – Research
27
State of the Art – The Real World
ScalAgent. JoramMQ, a distributed MQTT broker for the Internet of Things.
White paper. 2014.

EMMA: Distributed QoS-Aware MQTT Middleware for Edge Computing Applications