50 lines
2.4 KiB
ReStructuredText
50 lines
2.4 KiB
ReStructuredText
MQTT
|
|
====
|
|
|
|
I first came across the MQTT protocol when I was looking for possible
|
|
alternative ideas and implementations to Syncplay. The key concept was that
|
|
video players such as mpv would connect to a central server, share information
|
|
about their media they're playing and synchronize their state with other peers.
|
|
|
|
MQTT stands for Message Queuing Telemetry Transport and is an open OASIS and ISO
|
|
standard. It is designed to be lightweight and primarily for as a
|
|
publish-subscribe protocol which is what synchronization-based software such as
|
|
Syncplay *should* use. Another aspect of MQTT that makes it a viable design
|
|
option for media synchronization is its simplicity of design. That leaves the
|
|
implementer with a small well-defined logic to implement which means higher
|
|
chances of an efficient implementation and less unintentional errors. It also is
|
|
reasonable to go for a minimal transport protocol to provide a minimal service
|
|
such as media synchronization.
|
|
|
|
I'll be reading through the standard version 5.0.0 published in 07 March 2019
|
|
and trying to provide a UML-based representation of the MQTT standard with few
|
|
notes to the C implementation. Keep in mind that at the time of writing this, I
|
|
do not plan on implementing myself but I believe these notes would be helpful
|
|
for anyone wishing to implement MQTT themselves.
|
|
|
|
Another note to keep in mind is that I do not have prior MQTT experience so I'm
|
|
not familiar with "best solutions" or "practice workarounds". I'll solely view
|
|
MQTT through the lens of the standards I have downloaded. Possible notes *may*
|
|
be added in the future.
|
|
|
|
* Keep in mind that I'm by no means an expert and have very little experience
|
|
with real-word software. I'll be researching things I do not understand and
|
|
share my explanation here if possible. I suggest you double-check every
|
|
information provided here as well in order to spot any misconception or
|
|
misunderstanding.
|
|
|
|
* Do note expect a strict and regulated publishing schedule, I'll only read the
|
|
standard and write about it in my free time whenever I wish. You *may*
|
|
contribute if you wish too. Alternatively you may advance on your own.
|
|
|
|
* I *may not* respect the styling and indentation of the standard e.g., I *may*
|
|
choose to merge a sub-header back with its parent-head.
|
|
|
|
Below are notes about each chapter in separate pages in the order provided by
|
|
the standard.
|
|
|
|
.. toctree::
|
|
:glob:
|
|
:maxdepth: 1
|
|
|
|
*/index
|