General > General Technical Chat
MQTT - is it a fad which will move on?
peter-h:
It is supposed to be a simplified version of TCP/IP with some special features for embedded devices with online access (what is today fashionably called "IOT") and for remote management of large numbers of devices.
https://mqtt.org/
However they say it uses TLS for security which means it will be anything but efficient. Even on a 168MHz ARM, TLS takes a few seconds to set things up.
nfmax:
MQTT is definitely not a fad, it's been around for more than 20 years and is widely used. It doesn't replace TCP/IP as it is a higher-level protocol, running on top of it (or indeed on top of any other protocol providing ordered, lossless, bi-directional connections). The MQTT protocol itself is lightweight, both in terms of network traffic, and the software needed to implement a client - or even a broker (server).
MQTT supports authentication, but not encryption. Where encryption is needed (i.e. anywhere on the public Internet) this can be provided at a lower level, using TLS, or by sending encrypted payloads in the MQTT messages (or both). You rightly point out this adds considerable overhead. This is the unfortunate price we all have to pay for the current state of the Internet. If you are on a private network, or a network safely firewalled off from the public Internet, you can avoid it and MQTT will allow you to do so.
Note the TLS connection is set up once, when the client connects to the broker: this persistent connection is used for all subsequent MQTT messages in either direction.
Siwastaja:
--- Quote from: peter-h on February 09, 2022, 08:57:38 am ---It is supposed to be a simplified version of TCP/IP
--- End quote ---
No! Forget marketing, look at specs. I was also given a marketing lecture how MQTT is so superior compared to TCP.
Yet, in reality, MQTT is (almost always) on TCP. It can't solve problems of TCP when it's on TCP, so marketing about this is BS.
But, it's quite simple and it works, so use it if appropriate? I have no big problem with it. It solves the problem of collecting different data sources on a server, and subscribing on a chosen set or subset of message types, and it does this fairly well. If it's exactly what you need, then... use it.
m98:
Uhm, first and foremost, look at your protocol architecture. MQTT is at OSI-Layer 7, 6 and 5, while TCP/IP is at layer 4 and 3. It's an alternative to using HTTP, not an alternative to TCP/IP. If you want to go even more light-weight, consider using CoAP, based on UDP.
peter-h:
Thank you all.
On a quick read-up, it looks like MQTT is intended to address the management of (and obtaining data from) a number of IOT devices, each of which is a client (not a server). In nearly all cases, IOT devices are clients, not least because a server implies some sort of open port on a router, fixed IP for it, etc.
To see how the server (called "broker") part is done, I did a google on "free mqtt server" and found loads. I wonder how e.g. https://mosquitto.org/ makes money? Are they offering open source stuff and charge for implementation consultancy (same business model as e.g. Magento)?
Navigation
[0] Message Index
[#] Next page
Go to full version