Upload
kellogh
View
452
Download
1
Embed Size (px)
Citation preview
HOW TO IMPROVE ON
MQTT 3.1.1Tim Kellogg
@kellogh
MQTT: An Implementor’s Perspective
AOL Keywords: vasters mqtt
MQTT
Servers
Wired Networks
Vertically scaled
Kafka | AMQP | HTTP
loca-tion
tempfuel
Funnel Protocol
MQTT
“Uptime” isn’t straightforward
“Exactly Once” Violates CAP
Security Problems
• Retained messages
• Provenance
Error Handling
CAP Theorem
Availability
Network Partitions
Consistency CP
AP
CAP Theorem
Availability
Partition Tolerance
Guaranteed In-Order Delivery
CP
AP
Subscriber dies prematurely
Receive
• Via QoS 2
Do Work
• Not idempotent work
• Duplicate message would cause errors
Crash
• ACK isn’t sent
Subscriber dies prematurely (2)
Receive
• Via QoS 2
ACK
• Auto-acknowledge
Crash
• Before work is done
MQTT Recommendations
Message Dedup
• Have clients implement “QoS 2” via QoS 1
Token-based Security
Provenance story
Metadata about messages
Error codes
CoAP-PubSub
Resource Directory
Garbage Collection
Polling Allowed
Retained Messages
Error Codes
QUESTIONS?@kellogh
app.thingfabric.com
mqtt.io – No Bullshit, Just MQTT™
coap.io – No Bullshit, Just CoAP-PubSub™