Skip to content

Commit

Permalink
fixup! Describe the MQTT bus
Browse files Browse the repository at this point in the history
  • Loading branch information
didier-wenzek committed Jul 5, 2023
1 parent c8dda38 commit d252657
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions docs/src/understand/mqtt-bus.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MQTT Bus
tags: [Concept, MQTT]
sidebar_position: 1
sidebar_position: 3
---

# Thin Edge MQTT bus
Expand All @@ -18,6 +18,23 @@ between the miscellaneous hardware and software components that make up a piece
Collectively, the MQTT broker and the normalized MQTT topic schema form the __MQTT bus__.
The local HTTP server and the normalized URLs schema are referred as the __file transfer service__.

## Local Digital Twin

The MQTT topic schema establishes the local representation of a piece of equipment, with its main device, child devices and services.
This local representation has a one-to-one relationship with the remote digital twin.
However, while the latter is a user interface the former is akin to a program interface, an API.

- the main device as well as the child devices are each represented by a topic
- each type of telemetry data, measurements, events, alarms, is given a specific sub-topic of the topic related to the source device
- each type of operations is given a specific sub-topic of the topic related to the target device

## Cloud Bridges

The MQTT bus is extended to connect the cloud using an MQTT bridge
that publishes back and forth messages from the local MQTT broker to the remoted MQTT endpoint.

Such a bridge is by definition cloud specific - each kind of messages having to be sent or received from specific topics.

## Local File Transfer

Using MQTT is appropriate to collect telemetry data from devices and services
Expand All @@ -27,19 +44,9 @@ However, it's more pertinent to use HTTP to transfer files from one device to an
And this is not only because of payload size constraints, but also for *pull* versus *push* constraints.

By combining MQTT with HTTP, a thin-edge service can *notify* a child-device that a file is *available* for local transfer
and then let the child-device *download* the file when *ready*.
and then let the child-device *download* the file when *ready*.

A notable use is to install on a child-device a new version of firmware, software package or configuration file.
The device profile service will start the update operation by making the associated file locally available,
before notifying the child-device of the update request
and simply monitoring the progress of the operation once delegated to the child-device.

## Local Digital Twin

TODO: explain how the MQTT topic schema establishes the local representation of the device,
with the child devices, the services, their hierarchy ...

## Cloud Bridges

TODO: explain that the MQTT bus is extended to connect the cloud.

0 comments on commit d252657

Please sign in to comment.