Skip to main content
Home
LabTime

Main navigation

  • Home
  • Demos
  • James
User account menu
  • Log in

Breadcrumb

  1. Home

Spaghetti vs MQTT

Spaghetti Networks

Image
Spaghetti Networks

Networked computer solutions use a variety of methods to communicate between applications.  Some of these methods are provided from a vendor, some are built in-house, some are based on a standard (REST, GraphQL, Sockets), some are as simple as an SSH shell script.  

The formats for the message content varies from one connection to another.  Also security is different for the connections. 

It's a hodge podge of different techniques which makes it difficult to support.  It's also difficult to expand, multiple connections have to be made and permissions have to be updated.   

MQTT Broker

Image
MQTT Broker

With an MQTT architecture there is one program, the MQTT broker, that handles all messages between applications.  The broker is responsible for routing messages, managing permissions, and ensuring messages are delivered.  

Applications connected to a broker are called clients.

When a client starts up it first connects to the broker and subscribes to topics it wants.  When a client wants to publish a message it creates a payload, assigns a topic and sends the message to the broker.  The broker then relays the message on to clients that have subscribed to the topic.

Clients do not have to know about each other.  This completely separates the sources of information from the users of that information.  All a client has to know is how to connect to the broker and the topics it wants to subscribe to and publish to.  

All clients must agree on the message format.  It could be JSON, binary, an image, anything.  The MQTT broker itself however does not in any way use or care about the message content.  The broker simply relays the message to subscribers.

Book traversal links for Spaghetti vs MQTT

  • MQTT
  • Up
  • Clients

Documentation

  • Features
  • Applications
  • Architecture
  • Metrics
  • MQTT
    • Spaghetti vs MQTT
    • Clients
    • Topics
    • Actions
    • Payloads
  • Drupal CMS
  • Glossary of Terms
RSS feed