Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog: MQTT: The Frontrunner for Your UNS Broker Part - 1 #2687

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d6211d6
Blog: MQTT: The Frontrunner for Your UNS Broker
sumitshinde-84 Oct 21, 2024
0cfad9f
update blog
sumitshinde-84 Oct 21, 2024
93643c1
update blog
sumitshinde-84 Oct 21, 2024
2a2a7a6
Optimised images with calibre/image-actions
github-actions[bot] Oct 21, 2024
64b48a1
Merge branch 'main' of https://github.com/FlowFuse/website into mqtt-…
sumitshinde-84 Oct 21, 2024
5531064
Merge branch 'mqtt-frontrunner-uns' of https://github.com/FlowFuse/we…
sumitshinde-84 Oct 21, 2024
47655a9
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 21, 2024
7d829dc
update blog
sumitshinde-84 Oct 21, 2024
e5e079b
Merge branch 'mqtt-frontrunner-uns' of https://github.com/FlowFuse/we…
sumitshinde-84 Oct 21, 2024
282e995
update blog
sumitshinde-84 Oct 22, 2024
2cc9eb4
Optimised images with calibre/image-actions
github-actions[bot] Oct 22, 2024
aeb54df
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 22, 2024
5d1ddac
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 25, 2024
60f1001
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 25, 2024
7b6d542
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 25, 2024
e3d3e68
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 25, 2024
6a60af3
Merge branch 'main' of https://github.com/FlowFuse/website into mqtt-…
sumitshinde-84 Oct 25, 2024
8868f01
update blog
sumitshinde-84 Oct 25, 2024
39398a0
push tile and update mqtt compatiblity image
sumitshinde-84 Oct 25, 2024
16a3a11
Optimised images with calibre/image-actions
github-actions[bot] Oct 25, 2024
00c9f51
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 25, 2024
a78c889
split the blog
sumitshinde-84 Oct 28, 2024
b9af58e
Merge branch 'mqtt-frontrunner-uns' of https://github.com/FlowFuse/we…
sumitshinde-84 Oct 28, 2024
69bd1e0
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 28, 2024
f3c5edc
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 28, 2024
0645ae0
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 28, 2024
12e8966
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 28, 2024
27f1aad
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 28, 2024
6262558
Update compatibility image
Oct 29, 2024
b809fa4
Optimised images with calibre/image-actions
github-actions[bot] Oct 29, 2024
cba94bd
update blog
sumitshinde-84 Oct 30, 2024
e3cf0c2
update blog
sumitshinde-84 Oct 30, 2024
5871ec1
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 30, 2024
640026b
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 30, 2024
0f513e8
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 30, 2024
c724d05
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Oct 30, 2024
d512261
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Dec 17, 2024
12acdd3
Merge main into mqtt-frontrunner-uns
sumitshinde-84 Dec 18, 2024
e7b4c38
update blog
sumitshinde-84 Dec 18, 2024
80c66c3
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Dec 18, 2024
f46c356
Update mqtt-frontrunner-for-uns.md
sumitshinde-84 Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/blog/2024/10/images/mqtt-compatiblity.png
sumitshinde-84 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/blog/2024/10/images/mqtt-for-uns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/blog/2024/10/images/mqtt-google-trends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/blog/2024/10/images/mqtt-packate-size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/blog/2024/10/images/mqtt-qos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/blog/2024/10/images/mqtt-topics-org.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions src/blog/2024/10/mqtt-frontrunner-for-uns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "MQTT: The Frontrunner for Your UNS Broker - Part 1"
subtitle: "Why MQTT is the Best Choice for Your UNS Broker"
description: "Learn why MQTT is the top choice for Unified Namespace (UNS) brokers and explore the ideal platform that simplifies the connection of devices and services while providing a reliable MQTT broker service."
date: 2024-10-31
authors: ["sumit-shinde"]
image: /blog/2024/10/images/mqtt-for-uns.png
keywords: mqtt unified namespace, why use mqtt in uns, mqtt in a unified namespace, mqtt data modeling UNS, Best protocols for UNS IoT, Implementing UNS with MQTT, Unified Namespace protocols
tags:
- posts
- mqtt
- uns
- unified namespace
---

Is MQTT truly the go-to option for your UNS broker, or are there better alternatives out there? As the IoT landscape evolves, it's worth questioning whether its lightweight design can meet the demands of complex systems.
sumitshinde-84 marked this conversation as resolved.
Show resolved Hide resolved

<!--more-->

The [Unified Namespace (UNS)](/blog/2023/12/introduction-to-unified-namespace/) (UNS) is a popular way to organize data from all components of your IoT environment in a centralized place, making it easy for different systems to talk to each other. It provides a real-time single source of truth, ensuring that all users have access to the same accurate information, which prevents confusion and data silos.
sumitshinde-84 marked this conversation as resolved.
Show resolved Hide resolved

Why do you need a protocol in the UNS? A robust communication protocol ensures seamless interactions among diverse devices and systems. It establishes standardized methods for data exchange, which helps maintain data integrity, enhances interoperability, and enables scalability across various applications.
sumitshinde-84 marked this conversation as resolved.
Show resolved Hide resolved

When choosing a protocol for your UNS broker, it’s crucial to consider how well the selected protocol fits the specific requirements of your IoT environment, including the types of devices and systems involved, as well as factors such as scalability, reliability, and ease of integration. Several options are available alongside MQTT, including [AMQP](/node-red/protocol/amqp/), CoAP, [HTTP](/node-red/integration-technologies/rest/), [Kafka](/blog/2024/03/using-kafka-with-node-red/), and [OPC UA](/node-red/protocol/opa-ua/). While these alternatives offer unique features, it's essential to evaluate whether they truly meet the specific needs of various IoT scenarios.

## Why MQTT Stands Out

[MQTT](/node-red/protocol/mqtt/) began its journey in the late 1990s, developed by IBM to address communication challenges in low-bandwidth, unreliable networks. In those formative years, it was a pioneering solution, laying the groundwork for the Internet of Things (IoT).

As the IoT landscape evolved, so did MQTT, transitioning from the widely adopted MQTT 3.1.1 to the more feature-rich MQTT 5.0. Each iteration enhanced its capabilities and reflected the changing needs of an increasingly interconnected world. Today, 25 years later, MQTT is considered the de facto protocol for IoT.

**But, what exactly makes MQTT the frontrunner for UNS implementations? Let's take a deeper look at some of its key features?**

## Low Latency and Lightweight Messaging with Publish-Subscribe Model

Every IoT solution, platform, and technology—including UNS—ultimately focuses on reducing downtime and improving production efficiency. A minute of downtime can cost a company on average $15,000 to $20,000. For engineers monitoring machines, waiting for data can be detrimental to their operations. This urgency underscored the necessity for a low-latency protocol, making it clear that such solutions are essential for any Unified Namespace.

This is where MQTT truly shines. Designed for lightweight messaging, MQTT operates on a simple yet powerful **publish-subscribe model**. Unlike traditional request-response protocols that can cause delays due to constant querying, MQTT establishes a persistent connection. Once devices connect, they can publish messages or subscribe to topics in real-time, eliminating the need for repeated requests.

![MQTT Topic structure](./images/mqtt-packate-size.png)  
_Image showing the MQTT Topic Structer_

In addition to its efficiency in message handling, MQTT keeps message sizes compact—a crucial factor when working with **low-bandwidth networks** or a high number of connected devices. The MQTT protocol itself introduces **minimal overhead**, as its messages typically consist of just a few bytes, making it perfect for constrained devices like sensors that need to transmit data without overloading the network. The result? As soon as a sensor detects a change—whether it’s a temperature spike or a production error—it can instantly send that data in a compact message to the relevant applications or systems. Decisions can be made on the fly, and proactive measures can be implemented immediately, significantly reducing the risk of costly downtimes.

While protocols like HTTP operate over a request-response model and have large payload sizes that increase latency. AMQP, Kafka, and OPC UA require significant processing power and memory, making setup unnecessarily complex. They also have higher latency than MQTT.

## Reliability

Another critical aspect we must consider in the UNS context is reliability. What happens if communication fails? MQTT excels with its **Quality of Service** (QoS) levels, ensuring message delivery even under challenging network conditions.

MQTT provides three levels of Quality of Service (QoS) to ensure message delivery reliability, catering to different application needs. `QoS 0` delivers messages on a "best-effort" basis, meaning they may be lost if the connection fails. `QoS 1` guarantees that messages are delivered at least once, ensuring that even if there’s a temporary disruption, the message will reach its destination. `QoS 2` is the highest level, ensuring that messages are delivered exactly once, preventing duplicates, and ensuring data integrity.

![MQTT Quality of Service's different levels](./images/mqtt-qos.png)  
_MQTT Quality of Service Is different levels_

In a world where data integrity is paramount, especially in industrial environments, the ability to choose the right QoS level ensures that all components—whether they are sensors, devices, or applications—are working with the most accurate and up-to-date information.

Protocols like AMQP, Kafka, and OPC UA offer strong message delivery capabilities but have higher latency than MQTT and are more complex to set up. HTTP and CoAP also present reliability challenges. Although CoAP is known for its low-latency communication and small payload sizes, it can experience message delivery failures in unreliable network conditions. Additionally, CoAP is still maturing in the industry and lacks sufficient resources for effective implementation and troubleshooting.

MQTT stands out as the top choice for UNS implementations due to its lightweight design, low latency, and reliable message delivery. As IoT systems grow more complex, the need for efficient communication is paramount, and MQTT meets this demand with its publish-subscribe model and Quality of Service (QoS) levels.

**In part 2, we explore MQTT's security, scalability, topic organization, and community support, providing more solid reasons why it is the ultimate choice for UNS brokers.**

Additionally, we are excited to announce that the FlowFuse Platform now includes an integrated MQTT Broker service (link to announcement blog), allowing you to manage all your MQTT clients, Node-RED instances, and devices from a single, centralized platform—eliminating the need for a separate broker service.
Loading