the internet of things ... babel
TRANSCRIPT
![Page 1: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/1.jpg)
by Paolo Patierno
The Internet of Things ... Babel
LinuxDay Napoli 2016
Senior Software Engineer at Red HatMessaging & IoT team
@ppatierno
![Page 2: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/2.jpg)
Perché sono cosi forti:
● Proprietary vs Open protocols
● Standard protocol comparison– Architecture– Implementation & Weight– Data transport & Manipulation– IoT communication patterns– Security
AgendaAgenda
![Page 3: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/3.jpg)
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
Proprietary protocolsProprietary protocols
![Page 4: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/4.jpg)
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
Open (standard) protocolsOpen (standard) protocols
![Page 5: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/5.jpg)
Perché sono cosi forti:IoT “languages” on Babel towerIoT “languages” on Babel tower
HTTP
CoAP
STOMPDDS
XMPP
MQTTAMQP
![Page 6: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/6.jpg)
Perché sono cosi forti:StandardizationStandardization
● 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
![Page 7: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/7.jpg)
Perché sono cosi forti:Architecture : HTTP & CoAPArchitecture : HTTP & CoAP
● Client/Server– Request/response
● HTTP : synchronous● CoAP : (also) asynchronous
● HTTP is ASCII based
● CoAP is binary basedClient Server
![Page 8: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/8.jpg)
Perché sono cosi forti:Architecture : MQTTArchitecture : MQTT
● Broker centric– Broker receives subscriptions from clients on topics– Broker receives messages and forward them– Clients subscribe/publish on topics– No flow control
Publisher
BrokerPublisher
Subscriber
Subscriber
Topic
Topic
Subscriber
![Page 9: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/9.jpg)
Perché sono cosi forti:Architecture : AMQP 1.0Architecture : AMQP 1.0
● “Peer to peer” nature– Generic concepts of containers and nodes
● Containers : clients and brokers● Nodes : queues, topics/subscriptions or just ... endpoints
– Multiplexing on connection– Flow control
client
producer (consumer)
broker
queue
![Page 10: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/10.jpg)
Perché sono cosi forti:Implementation & WeightImplementation & Weight
● 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
![Page 11: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/11.jpg)
Perché sono cosi forti:Implementation & WeightImplementation & Weight
● 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
![Page 12: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/12.jpg)
Perché sono cosi forti:Data transport & ManipulationData transport & Manipulation
● 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
![Page 13: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/13.jpg)
Perché sono cosi forti:Data transport & ManipulationData transport & Manipulation
● 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
![Page 14: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/14.jpg)
Perché sono cosi forti:IoT Communication PatternsIoT Communication Patterns
Telemetry
Information flows from device to other systems for conveying status changes in the device
Inquiries
Requests from devices looking to gather required information or asking to initiate activities
Commands
Commands from other systems to a device or a group of devices to perform specific activities
Notifications
Information flows from other systems to a device or a group for conveying status changes in the world
1:N 1:N
![Page 15: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/15.jpg)
Perché sono cosi forti:IoT Communication PatternsIoT Communication Patterns
● Publish/Subscribe– Telemetry– Notification
● Request/Reply– Command– Inquiry
![Page 16: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/16.jpg)
Perché sono cosi forti:IoT patterns : resourcesIoT patterns : resources
● HTTP & CoAP– REST architecture for CRUD operations on
resources– URIs + POST, GET, PUT & DELETE method
● CoAP : a device act as “server”
![Page 17: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/17.jpg)
Perché sono cosi forti:IoT patterns : resourcesIoT patterns : resources
● MQTT– Topic based– Publish/Subscribe “for free”– Request/Response needs additional effort (on topic
semantic)building1
room1
floor1 floor2
room1room2
temp humidity temp humidity
![Page 18: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/18.jpg)
Perché sono cosi forti:IoT patterns : resourcesIoT patterns : resources
● 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”
![Page 19: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/19.jpg)
Perché sono cosi forti:SecuritySecurity
● 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
![Page 20: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/20.jpg)
Perché sono cosi forti:SecuritySecurity
![Page 21: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/21.jpg)
Perché sono cosi forti:ConclusionsConclusions
● 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 ?
![Page 22: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/22.jpg)
Perché sono cosi forti:ConclusionsConclusions
![Page 23: The Internet of Things ... Babel](https://reader031.vdocuments.us/reader031/viewer/2022030306/586f9c151a28abcc238b5967/html5/thumbnails/23.jpg)
Perché sono cosi forti:ResourcesResources
● 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/
– Apache ActiveMQ Artemis (brokers) : https://activemq.apache.org/artemis/
● CoAP– Eclipse Californium : https://eclipse.org/californium/