Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

The Internet of Things ... Babel

933 vues

Publié le

A quick comparison on different aspects between the most common Internet of Things protocols like HTTP, MQTT, AMQP and CoAP.

Publié dans : Logiciels
  • Soyez le premier à commenter

The Internet of Things ... Babel

  1. 1. by Paolo Patierno The Internet of Things ... Babel LinuxDay Napoli 2016 Senior Software Engineer at Red Hat Messaging & IoT team @ppatierno
  2. 2. Perché sono cosi forti: ● Proprietary vs Open protocols ● Standard protocol comparison – Architecture – Implementation & Weight – Data transport & Manipulation – IoT communication patterns – Security AgendaAgenda
  3. 3. 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
  4. 4. 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
  5. 5. Perché sono cosi forti:IoT “languages” on Babel towerIoT “languages” on Babel tower HTTP CoAP STOMP DDS XMPP MQTT AMQP
  6. 6. 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
  7. 7. 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 based Client Server
  8. 8. 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 Broker Publisher Subscriber Subscriber Topic Topic Subscriber
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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
  14. 14. 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
  15. 15. Perché sono cosi forti:IoT Communication PatternsIoT Communication Patterns ● Publish/Subscribe – Telemetry – Notification ● Request/Reply – Command – Inquiry
  16. 16. 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”
  17. 17. 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
  18. 18. 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”
  19. 19. 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
  20. 20. Perché sono cosi forti:SecuritySecurity
  21. 21. 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 ?
  22. 22. Perché sono cosi forti:ConclusionsConclusions
  23. 23. 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/

×