0% found this document useful (0 votes)
7 views54 pages

Module 4

The document discusses messaging protocols for IoT applications, focusing on MQTT (Message Queuing Telemetry Transport) and its lightweight characteristics suitable for constrained devices. MQTT operates on a publish/subscribe model where a central broker facilitates message dispatching to subscribed nodes, ensuring efficient data exchange. The use of topics allows for organized message routing without the need for traditional addressing, making MQTT comparable to a TV/Radio broadcast where subscribers can also publish messages.

Uploaded by

pduvvuri2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views54 pages

Module 4

The document discusses messaging protocols for IoT applications, focusing on MQTT (Message Queuing Telemetry Transport) and its lightweight characteristics suitable for constrained devices. MQTT operates on a publish/subscribe model where a central broker facilitates message dispatching to subscribed nodes, ensuring efficient data exchange. The use of topics allows for organized message routing without the need for traditional addressing, making MQTT comparable to a TV/Radio broadcast where subscribers can also publish messages.

Uploaded by

pduvvuri2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module-IV

Transport Control and Application Protocols


for Wireless Sensor Networks
Massaging protocols:
• Messaging protocols play a vital role to send and receive the
data/message to/from the cloud for any IoT application. In this section we
will cover two of such protocols MQTT and CoAP.
• MQTT stands for Message Queuing Telemetry Transport. MQTT is a
simple messaging protocol, designed for constrained devices with low
bandwidth.
• So, it's the perfect solution to exchange data between multiple IoT devices.
MQTT communication works as a publish and subscribe system.
• Layer5:Session/Message layer:
MQ Telemetry Transport (MQTT)
What Telemetry is? According to the Oxford dictionary says" The process of
recording and transmitting the readings of an instrument’.

MQTT is a lightweight protocol which makes it exceptionally useful.


What do you mean by lightweight? By being lightweight means that it demands
minimal resources for its functioning and does not require additional resources
from its working environment.
IoT vouches for this kind of lightweight protocols due to resource constraints.
MQTT follows the publish/subscribe pattern. In such case can we call it
client/server model?
The answer is, No.
The protocol was designed by Andy Stanford Clark and Arlen Nipper for IBM in
1999
Earlier the protocol was proprietary. However, by 2014, the protocol was made
free and open.
MQ Telemetry Transport (Contd..)
So how does it work? As stated before, MQTT uses
publish/subscribe model.
A component called central broker plays the key role in the entire
schema.
 The message broker is like the heart of the system and it helps to
dispatch the messages to the nodes that have subscribed for the
same.
The publisher (node) sends the message to the broker and the
broker takes the responsibility of dispatching the messages to the
destinations which have already subscribed.
MQTT scheme: Publish and subscribe
MQTT scheme: Publish and subscribe
MQTT scheme: publish and subscribe.
From the above figure, one can see that a node (publisher) can send the
data (message) to the MQTT broker.
Based on the subscriptions from the nodes connected, broker shall send the
messages appropriately.
In this scheme, only subscribers 1 and 3 have subscribed for the humidity
data; hence, the data is captured by the nodes which have expressed the
interest through subscription.
Thus, the data (message) reaches the node which really wants it and not to
all the nodes present in the network.
MQTT scheme: Publish and subscribe
There is another important aspect to this theory.
 The messages are published as topics and the publisher publishes the messages
with a topic.
 From the figure, one can see that the topic of the published message is Humidity.
Clients subscribe to the topics, and they get the messages based on their
subscriptions
Here, in this approach, clients do not have any address. When there is no address
available, the messages cannot be routed appropriately. In a typical networking
schema, it is a well-known that addressing connects the source and destination.
And so, "topics" are used.
MQTT scheme: Publish and subscribe
Messages are sent as a topic and brokers filter the messages
based on the topics subscribed, which will then be circulated to
the respective subscribers. To make it more precise, topics are
used to connect the publisher to the subscriber.
The way the topic are named is not of much importance and it
can be a usual string, just as it named as Humidity
MQTT scheme: Publish and subscribe

One can relate MQTT to the TV/Radio broadcast.


The only difference is that the subscriber can also
become a publisher in the MQTT, which is not
possible with the TV/Radio broadcast.
MQTT Scheme: Client and broker:
MQTT scheme: Publish and subscribe
MQTT scheme: Publish and subscribe

You might also like