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 12 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-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.
107 changes: 107 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,107 @@
---
title: "MQTT: The Frontrunner for Your UNS Broker"
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-29
authors: ["sumit-shinde"]
image:
keywords: mqtt unified namespace, why use mqtt in uns, mqtt in 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. Despite this, MQTT (Message Queuing Telemetry Transport) has proven its worth in real-world applications time and again. In this blog, we’ll delve into why MQTT continues to be a top choice for Unified Namespace implementations, revealing its unique advantages and why it might just be the solution you’re looking for.

<!--more-->

The [Unified Namespace (UNS)](/blog/2023/12/introduction-to-unified-namespace/) is a way to organize data at centralized place from all component of your IoT environment, 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.

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, the types of devices and systems involved, as well as factors like scalability, reliability, and ease of integration. Several options are available alongside MQTT, such as AMQP, WebSocket, and OPC UA. While these alternatives offer unique features, But
it’s important to evaluate whether they truly meet the specific needs of various IoT scenarios.

For instance, AMQP is more complex that require robust messaging patterns and advanced features, which might be overkill for simpler IoT setups. WebSocket, while excellent for real-time communication, can introduce additional overhead and complexity when dealing with numerous low-power devices that need to maintain persistent connections. On the other hand, OPC UA excels in industrial automation but is often more intricate to implement and may not offer the lightweight efficiency needed for large-scale IoT deployments.

## Why MQTT Stands Out?

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 not only enhanced its capabilities but also reflected the changing needs of an increasingly interconnected world. Today, MQTT is considered the de facto protocol for IoT.

**So, what exactly makes MQTT the frontrunner for Unified Namespace (UNS) implementations?**

To answer that question, let’s take a step back and reflect on my journey through the world of messaging protocols. Over the past few months, as I prepared content on [different protocols](/node-red/protocol/), I absorbed a wealth of insights from articles, videos, LinkedIn posts, and conversations with my team. Each piece of information revealed both strengths and weaknesses among the protocols, but one consistently stood out: MQTT. Industry experts have highlighted it as the go-to choice for IoT applications, with many also noting its status as the frontrunner for Unified Namespace (UNS) implementations. To evaluate whether this is truly the case, I began exploring the reasons why MQTT excels in the context of UNS.

As I began my exploration, first I wanted to understand how downtime affects companies, particularly regarding cost. Nowadays, every IoT solution, platform, and technology—including Unified Namespace (UNS)—ultimately focuses on reducing downtime and improving production efficiency. Therefore, grasping the financial impact of downtime is essential. To gain insight, I reached out to Steve, a seasoned engineer with over 25 years of experience in the automotive sector. During our conversation, I learned about the significant effects of downtime. When I asked him about its costs, he revealed that a minute of downtime can cost a company, on average, $15,000 to $20,000 or more. This revelation struck me deeply. For engineers monitoring machines, waiting for data can lead to substantial financial losses. 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 structer](./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.

Another critical aspect of that we need to consider in 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 diffrent levels](./images/mqtt-qos.png)
_MQTT Quality of Service's diffrent 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.

![MQTT's Compatiblity](./images/mqtt-compatiblity.png)
_MQTT can connect with everything_

As I moved forward, a key question arose in my mind: Does MQTT **connect with a variety of devices and systems**? This is a primary requirement for any Unified Namespace (UNS), as it serves as a single source of truth collected from every part of the IoT environment. Therefore, it needs to be able to connect seamlessly with diverse devices and systems.

MQTT’s long-standing standardization since the 1990s enables it to bridge the gap between legacy PLCs and modern IoT devices. Because of its established presence, many modern systems and cloud solutions now support it as well. This compatibility eliminates the need for extensive changes to existing infrastructures, allowing organizations to leverage their current investments while integrating new technologies.

For example, a manufacturing facility can use MQTT to connect older machines that previously operated in isolation with newly installed IoT devices. This integration facilitates smooth communication and data sharing across the board. As a result, organizations can enhance operational efficiency while supporting a cohesive data ecosystem that maximizes the value of every device, regardless of its age or manufacturer.

As I continued my exploration, **scalability** emerged as another key factor. The UNS broker must easily adapt to the evolving needs of a factory, which may start with a few sensors but could expand to hundreds or even thousands over time. Would MQTT accommodate this growth? Absolutely. Its lightweight architecture, characterized by a publish-subscribe model, allows for seamless scalability.

Each new device can be added without disrupting existing operations, and the system can handle thousands of concurrent connections. This adaptability is especially crucial in industries where rapid expansion is common. Imagine a manufacturing facility that starts with a handful of devices monitoring key performance indicators and then expands to hundreds or even thousands as it grows. MQTT’s architecture accommodates this scaling effortlessly.

This realization filled me with confidence—MQTT wasn’t just a short-term solution; it was future-proof, ready to grow alongside the organization.

However, **security** became my next concern. In a world where data breaches are common, having strong security measures is essential—especially in a Unified Namespace (UNS), which provides a complete digital picture of your factory. A UNS includes machine performance data, sensor readings, and control commands, making it crucial to protect this information from unauthorized access. So, can MQTT secure sensitive information? I was pleased to learn that MQTT uses **TLS (Transport Layer Security)** encryption to protect data in transit. This means that all communications between devices are encrypted, preventing eavesdropping and tampering, and ensuring the safety of your entire operation.

But MQTT doesn’t stop there. It incorporates robust authentication methods, allowing only trusted devices to connect to the network. This can range from simple **username and password** combinations to more advanced methods like **client certificates**, which provide a higher level of security. Furthermore, **Access Control Lists** (ACLs) enable administrators to define who can access specific data streams, ensuring that sensitive information is only available to authorized individuals or devices.

I finally discovered the MQTT community—a vibrant network of developers and users eager to share their experiences and help each other. Picture this: when challenges arise, whether they’re bugs or integration issues, there’s a wealth of knowledge at our fingertips.

The availability of open-source tools, libraries, and forums means that when you face a problem, there’s a good chance someone has encountered it before and can provide guidance. This active support network makes the journey much less daunting and encourages innovation within the ecosystem. Surprisingly, this community is growing day by day. The Google Trends chart below illustrates the exponential increase in interest in MQTT.

![MQTT Growing Interest](./images/mqtt-google-trends.png)
_Google Trend: showing the growing interest in MQTT all around the world_

Imagine having access to countless tutorials, example projects, and troubleshooting tips from a community that thrives on collaboration. This support network is invaluable, providing reassurance that you are never alone in your MQTT journey. Whatever challenge you face, someone in the MQTT ecosystem has likely encountered it before and can offer a solution.

After examining MQTT's strengths, it’s clear that it’s a strong choice for your Unified Namespace (UNS) broker. Its lightweight design, scalability, security, and ability to handle numerous concurrent connections make it an attractive option. But wait—given the numerous concurrent connections and the data flowing in from all parts of the IoT environment, this brings up an important question: how do we efficiently find the information that truly matters?

The sheer volume of data can be overwhelming. In a Unified Namespace (UNS), the digital representation of your business needs to be more than just a collection of data—it must provide meaningful context.

MQTT helps with this by allowing to use its structured topics that clarify the flow of information from various devices. For example, to organize data in a broker for a house, the topic structure might look like following image, where accessing the kitchen temperature topic would be: `house/rooms/first-floor/kitchen/temperature`

![MQTT's Topics tree example](./images/mqtt-topics-org.png)
_Exmample of MQTT Topics tree heirarchy_

Additionally, MQTT’s support for wildcards allows monitoring of multiple data streams simultaneously.

In summary, MQTT is not just a protocol; it’s a strategic advantage for your UNS broker. Its efficiency, security, and scalability equip your organization to handle the complexities of IoT seamlessly. By choosing MQTT, you’re setting a solid foundation for both current needs and future growth. Now is the time to leverage its capabilities and drive your data strategy forward.

## FlowFuse’s New MQTT Broker Service

At FlowFuse, our goal has always been to empower engineers to build, manage, scale, and secure their Node-RED solutions. We help teams seamlessly connect IT and OT environments, supporting thousands of devices and protocols. This integration enables quick data collection, transformation, and visualization to optimize industrial workflows and create a Unified Namespace (UNS).

We’ve listened closely to our customers, They expressed that they have to rely on separate MQTT broker services, which complicates the management of multiple services simultaneously. To address this challenge, we’re excited to announce that we are enhancing the FlowFuse platform by adding our own MQTT broker service!

This new feature will allow you to connect, manage, and analyze data from all your devices without the hassle of juggling multiple services. With the FlowFuse MQTT Broker, you can oversee all your MQTT clients, Node-RED instances, and devices from a single, centralized platform. This eliminates reliance on external broker services, streamlining your operations and allowing you to focus on driving innovation.

As your operations grow—from small projects to large-scale IoT deployments—our MQTT broker will scale with you. Additionally, robust role-based permissions will keep your data secure, ensuring that only authorized personnel can access sensitive information.
Stay tuned for updates on this exciting enhancement! You can track our progress [here](https://github.com/FlowFuse/flowfuse/issues/1350).

**Ready to take your IoT solutions to the next level?** [Join FlowFuse today](https://app.flowfuse.com/account/create) and experience the power of seamless integration and management for your IoT environment!
Loading