Hello everyone. Welcome to the section number 7 where
we're going to talk about the mqtt, which is
application layer communication protocol.
So this is our first lecture video number 7.1
and we're going to talk on what is mqtt. It's
feature and how it works and it's architecture. So
guys, let's get started with that.
So firstly mqtt is a message queue
Telemetry transfer protocol and it is a lightweight
protocol works on the pub/sub method used
to transport the messages from one device to
another device. But with the user job centralized broker.
And it uses tcp/ip stack and
mqtt is preferred where
we have a lower bandwidth because it uses
a small core footprint because if we compare
with the HTTP and the other communication protocols, then
it uses less headers
or you can say that less overhead
data as compared to the other protocols because
it's some M2M communication protocol specifically designed for
devices.
So if we talk about the feature, the first feature is a
lightweight and efficient and the number two benefit is
it is bidirectional communication and the instant communication
and the third benefit is it is
able to scale million of devices instantly and
the number fourth is reliable message
delivery because it's using tcp/ip stack
instead of UDP and Sport for unreliable
networks mean it is providing qos levels.
And the last is security enabled it
provides a built-in username and
password authentication as well as restriction to the topics.
So now the question is how it works.
In the previous slide. I told you that it uses
pub/sub method to understand how the pub/sub method
works. There is example of a university and different
departments. So let's get started with that. Now we
have a university its name is Islamic Institute
of applied sciences and it have a four
different departments, which are CS saw
space science agriculture physics and the
math and every Department have two or four
different classes. For example, if we want to
give a notice to the all students of the University, then we
will put the notice on the main gate where
all the students will read. What
are the next instruction from the University management what
for example if we want to talk specific to
the Department of computer science, then what I will
do I will not place that notice on the
University gate I will place that notice on
the departmental notice board because I
only want to Target that department students for
that specific notice. But what if I want to
send a message to the agriculture department and
specific to the MS agriculture class
then what I will do is then the university management will
do is they will visit the class or
they will put the message on their lab because the
only want to Target that Ms. Students
as compared to other students. So same way
that topics will work. Now you
need to consider is that this University is your home or
your industry and if you want to monitor?
Actually mqtt uses slashes to
distinguish the topics now, for example, this is
our home and these are the one two three
four rooms and in every room. We have a different sensors and
equitators. And this is our
home name and this is our room name. Okay, and if
I want to send a specific for example,
this is our ball.
Okay. Sorry. My writing is not good too
much, but you can consider it that it is well, okay,
then I will use slash room one.
Sorry. This is my home name and
this is the room and this is the
device that I want to control that. I want to receive the
message from that device.
What is the benefit is that for example, if we have another
room or other home? Then the name will be changed
from here?
Don't worry, we will discuss in deeply in when
we're going to do some exercises in that upcoming videos. So
this is the main architecture behind the topic system
how pops up works?
Now there are single level Plus in topics. For
example. Yeah, this is the good example I created
for you guys. For example in the
house. We have a two floors and on each floor. We
have a two rooms and we are monitoring the
temperature. I mean you can say that we have deployed the temperature
devices in every room. So how we can distinguish.
So this is the house
This is the floor ground floor. And this is the floor one
and this is the room one and the room two
and here are the temperatures. Okay, for example
if I want to
temperature of room to from
which floor
From the first floor. So this is the house.
And this is the floor one.
And Slash and we need to mention the room.
room one and this is the temperature of
that room. So how in this
way the topics will work. For example, I want
to monitor the temperature of
All the ground floor rooms, so I don't
want to use again and again this so how
we will monitor the our ground
floor devices by using the plus topic the
plus topic will eliminate all the
stuff and listen whatever is coming to the ground floor.
So this is the single level while card to
avoid from that. Okay, and next we
have a
multi-level wired card, for example, I want
to monitor all the temperature of that
house. So we have a two sensors
on the ground floor.
And two sensors on the floor one and ever
since I have a different rooms. So here
we have a multi wild card one add one is that and
the other is that to remove that?
from that scenario
we will use ash.
and this will be our
Final topic that slash house hash whatever
is coming and floor or
room or whatever. We need only temperature
from
those rooms. Okay. So this is
the multi-level wildcard and topics.
Now it's time to talk about the application real-time communication
and the lightweight communication is a
priority for every iot solution. So
In tracking of assets or you
can say that.
Logistics monitoring then mqtt is a good
to go because it is a lightweight protocol and instant
a protocol to San and receive
messages by pub/sub Method and the next is smart
building and smart cities for example in different
scenarios. For example, we are
monitoring the weather we can use a lot of van and I'm
mod a
it doesn't make some issues but for example if you are monitoring the
smoke
Of the building our fire alarms
then mqtt is a good application layer protocol
to send instant messages to the cloud or
you can say the specific authority to get alerts and
in the smart Healthcare where critical operations are going
on mqtt is a good option to consume and
in smart agriculture. It's a good
to monitor the soil moisture sensor and temperature but to
control the water watering
system. It is good to use
the mqtt for instant on and off. And in iot.
We also have a different use cases
where we need to
communicate instantly for to
monitor the critical operations just like machines are
going on and if something is
happened, then we can use the mqtt protocol
to send instant messages. For example, if we deploy the
smoke sensor in the processing Hall and
we want to monitor that if there is any fire
there is a smoke which means there is some issue so mqtt
will sort out your issue to send instant
message to Cloud to get
the notifications. So these are the different use cases
we can assume and there are a lot of other use
cases, but I just pick up some of use cases
there.
So guys in the next video. We're going to talk about
there are different mqtt Brokers, and we will
install the emqx mqtt broker.
So guys, you can also start installing and exploring
different type of Brokers to get prepared for
the next video. So guys see you in the next video. Have a good day. Bye.