What is MQTT?
So MQTT fits into the conversation about IIoT.
So in the previous videos we talked about what is IIoT and why does it matter and how
that translates into digital transformation and creating a digital factory and why does
a digital factory matter.
So what we are going to talk about is the protocol that is MQTT.
In order for you to implement IIoT you have to adopt an IIoT protocol.
So the question is: What is an IIoT protocol?
Let's start with that.
Let's answer that.
What qualifies as an IIoT protocol?
So it's going to be things like ethernet IP the industrial protocol.
That would be an IIoT protocol.
Why?
The answer is... is because I can take a piece of equipment and I can plug it into my network
with other equipment and just by dropping in an IP address I can be connected to anywhere
in my network.
That's an IIoT protocol.
It's not a very smart IIoT protocol.
It doesn't have the ability to allow you to publish tag data into namespaces and that
kind of thing, but ethernet IP is an IIoT protocol.
But is has no specification related to it for industrial data.
So the other IIoT protocols are DNP3, there is a bunch of them so people will comment,
MQTT, those are the two big ones.
The question is why do you use one or the other.
So I'll answer the question about what is MQTT?
It is an IIoT protocol with a specification for handling data.
It is a report by exception protocol.
This is very important.
This is the most important part of the protocol.
It is a report by exception protocol.
It is a stateful protocol.
What does that mean?
It means that the server and the clients always know who they are connected to and they know
that they are connected.
It's stateful.
It is light-weight.
That's very important.
The payloads are very very small.
And it is incredibly flexible.
What does that mean?
It means that I can basically ship anything over the protocol.
If I want to ship images...
I can.
If I want to stream video...
I can.
If I want to send word files...
I can.
If I want to send a blob...
I can.
If I want to send a JSON dictionary with just text information in it...
I can.
If I want to send just an integer digit...
I can.
And it can be read and deciphered at the other end.
So MQTT...
I want to just go through the things that it is.
It's an IIoT protocol with a specification.
So you can go to the eclipse foundation.
The eclipse foundation manages a specification called spark plug B. All the spark plug B
specification tells you how to connect something in the field to an MQTT server, we call them
brokers, and how do you format the data and the payload so that it can be organized at
the server.
Report by exception.
What that means is.. is when I am an MQTT client, so let's think of these as PLCs, for
example EZ Automation has the EZLogix PLC the EZ Rack that supports both flat MQTT,
that is I can put anything in the payload that I am going to send, or spark plug B,
which has a specification for how the data should be packaged and sent.
So I have got 4 PLCs in the field and I have one MQTT broker.
The PLCs are going to send their data to the broker only when the data changes.
So I have got 100 tags inside my PLC, 3 of those tags change, the moment they change,
the MQTT client publishes 3 tag changes into the namespace.
The traditional way is a poll-response method.
Right OPC-UA which we will see over here in a second.
OPC-UA where my server makes a request to the PLC, and the PLC responds to the server.
Then it moves to the next request.
The advantage of IIoT protocols, specifically MQTT, is that MQTT publishes the changes to
the broker.
Only the things that change.
Report by exception.
So obviously what you can see is bandwidth is much lower.
And it's much more efficient.
The third part is stateful protocol.
What that means is there is always a connection here and we always know what that connection
is.
We do that through what's known as birth and death certificates.
So part of the MQTT protocol is that the client will publish a birth certificate to the server.
That means that any person who goes to the server and looks at the information for that
node will know when that node came online, how many times it's disconnected, and when
the most recent death certificate published, and when was the most recent birth certificate
published.
Very important that is the stateful piece.
It's lightweight.
Basically the header is really really small.
It's a two byte overhead, exactly, very very very small overhead with MQTT.
So what are the implications there?
Basically in many of the applications that we have done, we have an example right now
in south-west Texas over a cellular connection, 275k bandwidth that's it.
Okay we are talking 2G to 3G speeds cellular.
Really really slow.
We are able to send 875 tags every second.
Every change, 875 changes per second over MQTT because it's so small.
And then flexible.
Flexible means this.
Our payload can be standardized or it can not.
I could have a structure for my payload or I could not.
That's what makes it flexible.
In another video later on, probably not in this set of videos, we'll do what is the difference
between DNP3 and MQTT.
Disadvantages and advantages of the two.
It starts with DNP3 is still a poll based protocol.
Alright and then I want to talk a little bit about Why MQTT matters?
Okay?