The Internet of Things ... Babel by Paolo Patierno Senior Software Engineer at Red Hat Messaging & IoT team @ppatierno LinuxDay Napoli 2016
Agenda Perché sono cosi forti: Proprietary vs Open protocols Standard protocol comparison Architecture Implementation & Weight Data transport & Manipulation IoT communication patterns Security
Proprietary protocols Perché sono cosi forti: Difficult to port applications Requires re-coding all applications Difficult to integrate Application level bridge for translating formats Restricted platform support Limited to whatever vendor provides
Open (standard) protocols Perché sono cosi forti: Simple application porting Re-coding is no needed Simple integration Well known messages format Broader platform support Everyone can implement for a platform
Standardization Perché sono cosi forti: HTTP IETF standard (RFC 2616 is HTTP/1.1) CoAP IETF standard (RFC 7252) MQTT 3.1.1 version OASIS and ISO/IEC 20922 AMQP 1.0 version OASIS and ISO/IEC 19464
Implementation & Weight Perché sono cosi forti: HTTP Client more complex (ASCII parser) More bytes to pay on data transfer Connection oriented via TCP CoAP HTTP-like but binary Connection less via UDP Client more simple than HTTP
Implementation & Weight Perché sono cosi forti: MQTT Client simple to develop (spec about 70 pages) Constrained devices (smallest packet 2 bytes) Connection oriented via TCP AMQP Client more complex Full featured Connection oriented via TCP + multiplexing
Data transport & Manipulation Perché sono cosi forti: HTTP & CoAP Content-Type based on MIME MQTT Payload agnostic No data types No metadata Any data format (text, binary, JSON, XML, ...) Peers must agree on serialization/deserialization
Data transport & Manipulation Perché sono cosi forti: AMQP Message Header : system and custom/user properties Body : opaque Metadata Data Type System Peers can use Content-Type and Content-Encoding Filter on properties
IoT Communication Patterns Perché sono cosi forti: Publish/Subscribe Telemetry Notification Request/Reply Command Inquiry
IoT patterns : resources Perché sono cosi forti: HTTP & CoAP REST architecture for CRUD operations on resources URIs + POST, GET, PUT & DELETE method CoAP : a device act as “server”
IoT patterns : resources Perché sono cosi forti: AMQP Address based Publish/Subscribe & Request/Response “for free” Brokered (with “store and forward”) Queues : for point to point and request/response Topics/Subscriptions : for publish/subscribe Routed Routing messages between peers No “store and forward”
Security Perché sono cosi forti: SSL/TLS For authentication and encryption Payload encryption HTTP : basic & digest authentication CoAP : Datagram TLS (DTLS) AMQP : SASL for authentication MQTT : username/password on connection
Conclusions Perché sono cosi forti: Devices How much they are constrained ? Network How much it is reliable ? Message rate How many messages per second ? QoS ? Processing data Do the system need more info on processing ?
Conclusions Perché sono cosi forti:
Resources Perché sono cosi forti: MQTT Eclipse Paho (clients) : https://www.eclipse.org/paho/ Eclipse Mosquitto (servers) : https://mosquitto.org/ Apache ActiveMQ Artemis (brokers) : https://activemq.apache.org/artemis/ AMQP Apache Qpid (clients/brokers) : https://qpid.apache.org/ CoAP Eclipse Californium : https://eclipse.org/californium/