Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why and when i need mqtt broker for IOT/M2M application

Just asking one silly question, hope someone can answer this.

I'm bit confused regarding MQTT broker. Basically, the confusion is, there are so many things being used for data storing, transfer and processing (like Flume, HDInsight, Spark etc). So, when and why I need to use one MQTT broker?

If I would like to use Windows 10 IoT application with HiveMQ, from where can I get the details? how to use it? How I get benefit out of this MQTT broker? Can I not send data from my IoT application directly using Azure or HDFS? So, how MQTT broker fits into it or helping me to achieve something?

I'm new to all these and tried to find some tutorials, however, I'm not getting anything proper. Please explain it in more details or give some tutorials for this?

like image 627
bapi Avatar asked Aug 20 '15 17:08

bapi


People also ask

Why use MQTT for IoT?

Why use MQTT? Why MQTT is one of the best network protocols for the Internet of Things – IBM Developer For Internet of Things (IoT) devices, connecting to the Internet is kind of a requirement. Connecting to the Internet allows the devices to work with each other and with backend services.

What is MQTT (MQ Telemetry Transport)?

If you play in the IoT space, you may have heard of the MQ Telemetry Transport (MQTT) protocol. In addition to being used as an underlying communications protocol for IoT and Industrial IoT architectures, MQTT is used in smart home automation systems alongside cloud platforms such as Microsoft Azure, AWS and IBM Watson.

What is mqmqtt?

MQTT is a lightweight and flexible network protocol that strikes the right balance for IoT developers: The lightweight protocol allows it to be implemented on both heavily constrained device hardware and high latency / limited bandwidth networks.

Does MQTT offer as much security as https?

Do MQTT offer as much security as HTTPS? MQTT relies on TCP as transport protocol, which means by default the connection does not use an encrypted communication. To encrypt the whole MQTT communication, most many MQTT brokers – like HiveMQ – allow to use TLS instead of plain TCP.


1 Answers

This is an architectural choice. IoT applications are possible without MQTT but there are some advantages when using MQTT. If you are completely new to MQTT, take a look at this in-depth MQTT series: http://forkbomb-blog.de/2015/all-you-need-to-know-about-mqtt

Basically the main architectural advantage is publish / subscribe designed for low-latency, high throughput (mobile) communication with minimal protocol overhead (which is important if bandwidth is at a premium). You can completely decouple consumers and producers.

HDFS is the (distributed) Hadoop file system and is the foundation for Map / Reduce processing. It is not comparable to a MQTT broker. The MQTT broker could write to the HDFS, though (in case of HiveMQ with a custom plugin).

Basically MQTT is a protocol while the products you are mentioning are, well, products which solve completely different problems:

Flume is basically used for log aggregation at scale. You won't use MQTT for that, at least there is not too much advantage because this is typically done in backend applications.

Spark and Hadoop shine at Big Data crunching. They are a framework and not a ready to use solution. They are not really comparable to MQTT. Often MQTT brokers like HiveMQ are used in conjunction with these, Spark / Hadoop for data processing and HiveMQ for communication.

I hope this helps you getting started. Best would be to read about typical use cases of all these technologies, this is a bit too broad for a single SO answer.

like image 114
Dominik Obermaier Avatar answered Oct 19 '22 06:10

Dominik Obermaier