2. MQTT
MQTT: Message Queue Telemetry Transport
• MQTT -Open Connectivity for Mobile, M2M and IoT
• A lightweight publish/subscribe protocol with predictable bi-
directional message delivery
1999 Invented by Dr. Andy Stanford-Clark (IBM),
Arlen Nipper (now Cirrus Link Solutions)
2011 - Eclipse PAHO MQTT open
source project
2004 MQTT.org open community
2013 – MQTT Technical Committee
formed
Cimetrics, Cisco, Eclipse, dc-Square,
Eurotech, IBM, INETCO Landis & Gyr, LSI,
Kaazing, M2Mi, Red Hat, Solace, Telit
Comms, Software AG, TIBCO, WSO2
Evolution of an open technology
3. MQTT structure
▶ MQTT is described on the mqtt.org site as a machine-
to-machine (M2M) / IoT connectivity protocol.
▶ MQTT is an Event based IoT middleware (one to
many)
▶ publish/subscribe messaging transport protocol
▶ Over TCP/IP (or MQTT-S over UDP for LAN)
▶ Its protocol is lightweight
▶ it can be supported by some of the smallest measuring
and monitoring devices (ex. Arduino)
▶ it can transmit data over far reaching networks
▶It can transmit data over sometimes intermittent
networks.
Event based IoT Middleware
• Event pattern of communication
(one to many)
• Over IP (TCP)
4. Publish / Subscribe Messaging (One to Many)
▶ A producer publishes a message (publication) on a topic (subject)
▶ A consumer subscribes (makes a subscription) for messages on a topic (subject)
▶ A message server (called BROKER) matches publications to subscriptions
▶ If none of them match the message is discarded after modifying the topic
▶ If one or more matches the message is delivered to each matching consumer after
modifying the topic
▶ Publish / Subscribe has three important characteristics:
1. It decouples message senders and receivers, allowing for more flexible applications
2. It can take a single message and distribute it to many consumers
3. This collection of consumers can change over time, and vary based on the nature of the
message.
7. UDP
• UDP stands for User Datagram Protocol.
• UDP is a simple protocol and it provides no sequenced transport functionality.
• UDP is a connectionless protocol.
• This type of protocol is used when reliability and security are less important
than speed and size.
• UDP is an end-to-end transport level protocol that adds transport-level
addresses, checksum error control, and length information to the data from the
upper layer.
• The packet produced by the UDP protocol is known as a user datagram.
8. TCP
• TCP stands for Transmission Control Protocol.
• It provides full transport layer services to applications.
• It is a connection-oriented protocol means the connection established between both
the ends of the transmission. For creating the connection, TCP generates a virtual
circuit between sender and receiver for the duration of a transmission.
• Features Of TCP protocol
• Stream data transfer
• Reliability:
• Flow Control:
• Multiplexing:
• Logical Connections:
• Full Duplex:
9. MPTCP
• MultiPath TCP (MPTCP) is an effort towards enabling the simultaneous use
of several IP-addresses/interfaces by a modification of TCP that presents a
regular TCP interface to applications, while in fact spreading data across
several subflows.
• Benefits of this include better resource utilization, better throughput and
smoother reaction to failures.
10. DCCP
• Datagram Congestion Control Protocol
DCCP is basically a message-based transport-level protocol.
DCCP is a great technique to access congestion control mechanisms,
also we don’t need to implement them at the application level also.
DCCP basically allows similar Transfer Control Protocol feeds also, but
delivery in the order of transmission cannot be done. Sequential
delivery of multiple streams (as in SCTP- Stream Control Transmission
Protocol) is not available in DCCP.
11. TLS and DTLS
• TLS operates on top of the TCP layer but below the application layer.
• It can be considered as top sublayer for the Layer-4.
• DTLS is based on TLS protocol and provides equivalent security
guarantees.
• DTLS protocol provides communications privacy for datagram
protocols.
• Both of these protocols delivers data communication security over
computer network.
• They are widely used in email, web, VoIP and other messaging
applications.
12. Session Layer
• HTTP: HyperText Transfer Protocol
• XMPP: Extensible Messaging Presence Protocol
• AMQP: Advanced Message Queuing Protocol
• HTTP is a protocol for fetching resources such as HTML documents.
• It is the foundation of any data exchange on the Web and it is a client-server protocol,
which means requests are initiated by the recipient, usually the Web browser.
• XMPP stands for Extensible Messaging and Presence Protocol. It is a communication
protocol, based on Extensible Markup Language (XML), for real-time communication. It
supports a wide range of applications including presence, collaboration, instant messaging,
multi-party chat etc.
• Advanced Message Queuing Protocol (AMQP) is an open source published standard for
asynchronous messaging by wire. AMQP enables encrypted and interoperable messaging
between organizations and applications. The protocol is used in client/server messaging and
in IoT device management.
13. Interoperable Data Encoding
• XML: Extensible Markup Language
• JSON: JavaScript Object Notation
• CBOR: Concise Binary Object Representation
• Extensible Markup Language (XML) is a common text-based markup language.
ArcGIS Velocity can ingest IoT observation data expressed as XML from a variety of
sources.
• JSON stands for JavaScript Object Notation, and is a concise hierarchical data
serialization syntax that is supported by all modern browsers.
• Concise Binary Object Representation (CBOR) is a binary data serialization format
loosely based on JSON authored by C. Bormann. Like JSON it allows the
transmission of data objects that contain name–value pairs, but in a more concise
manner.
14. SENML
• SensorML is an approved Open Geospatial Consortium standard. SensorML
provides standard models and an XML encoding for describing sensors and
measurement processes. SensorML can be used to describe a wide range of
sensors, including both dynamic and stationary platforms and both in-situ
and remote sensors.