I am continuing the development of the Hlutir IoT platform. At the moment I am working on turning the database into a microservice. When this is done, I'm going to work more on adding MQTT support.
I have already planned out how the MQTT layer is going to work. I'm going to be using the Eclipse Mosquitto MQTT server, together with the Mosquitto Dynamic Security plugin. I'm using this plugin in order to dynamically add and remove clients, as well as define access policies for them without having to restart/reload the MQTT server every time. Besides, Mosquitto is an open-source MQTT server, which really fits our goal of creating an open platform.
Progress to this has been made already by me, I have created an NPM package for the DynSec plugin. There already was a package for this, but it was not really consistent and did not contain lots of comments. I'm trying to document this package in a better way and make it more reliable.
I really like the idea of microservices and a pluggable system. For example, you have a customer that wants to save datapoints to a database and ingest the data using MQTT and a direct TCP connection. The client also wants to be able to retrieve this data, but does not need a web interface, just a REST API.
Why would the customer need a CoAP service for data ingestion and a web interface and other things, which won't be used anyways? That's the nice thing of microservices, waste less resources and have the possibility to scale quickly and easily.
Then the age-old question comes: "Won't this break more easily?". The answer to that is: "No.". The reason for that is because of the way you implement the microservice architecture. I have chosen to use NATS as a message service. This is the core communication service between the microservices and is built for high performance applications, whilst having a low footprint. It also supports clustering, which is great for redundancy!
All these design choices make for a good and stable platform, upon which you can rely. However, if you think I'm making a mistake, please leave a comment and let's discuss it!
Thanks for reading as always, feedback is appreciated, and I will see you next time!