Mainflux 0.12.0 — Groups Are Here

Drasko DRASKOVIC
Mainflux IoT Platform
3 min readApr 4, 2021

--

New release of Mainflux brings groups, universal JSON writer and more enhancements and bugfixes

We at Mainflux Labs are building one of the world’s most sophisticated IoT system — an Unified Cloud-Native IoT Platfom. Open-sourced under Apache-2.0 license and published on our GitHub.

It took more than 9 months of hard work, but new Mainflux release 0.12.0 is finally here. This release brings a lot of enhancements in the internal architecture, bugfixes and improvements, but notable new features are:

  • Groups
  • Universal JSON writer
  • SMTP and SMPP support

Groups

The biggest part of the new release certainly are the groups. In Mainflux groups are generic containers — they can hold any entity. Biggest challenge was the architecture — how to come up with something really powerful, but at the same time simple to use. Simplicity of implementation and maintainability was important as well.

With clever architecture we made groups with unlimited hierarchy — i.e. all groups can have their subgroups (tree-like structure). This is useful for creating for example organizations (groups of users), and then creating number of sub-organization in a hierarchical order.

What is currently missing to complete a security story are fine-grained policies that should be attached to groups. But this is scheduled already for the next release (0.13.0).

Universal JSON Writer

Mainflux has a set of different writers, supporting different databases: PorstgreSQL, Cassandra, MongoDB, InfluxDB and so on. These writers need to know not only underlying protocol in order to talk to the adequate DB, but also the semantics of the message in order to write data in the structured manner.

For this reason Mainflux choose SenML, IEEE RFC 8428 standard that represent sensor messages format.

However, there is a lot of legacy devices which do not adhere to this standard, and where firmware cannot be changed easily to update the message format. For these devices usually support must be added via custom-made protocol adapter, a microservice that should be deployed as a part of Mainflux system.

In the case of JSON payload, however, there is a possibility now to use a universal JSON adapter that is capable to fetch any JSON and write it into any database in a structured manner. Different JSONs can be written into different DB tables automatically, and this is controlled via channel subtopic.

The feature is actually enabled by enhancing Transformer library to be capable to transform JSON payload on-the-fly.

This new feature now allows connecting arbitrary JSON sensor in a plug-and-play mode, and all the messages will be automatically written into database and be ready for other applications to consume them.

SMTP and SMPP Support

In 0.12.0 we made a change in the architecture, abstracting central message bus subscribers with data consumers interface. This gave us possibility to have different types of consumers: besides famous writers, we now have notifiers also.

Examples of notifiers are SMTP notifier, which is used to send e-mail upon a certain event, and SMPP notifier, which can send SMS messages to notify some events.

When combined with Rules Engine, these notifiers are very powerful tools when building reliable IoT systems.

Mainflux 0.12.0 brings several important features, and with groups it is one important step closer to a full-blown enterprise system. These enhancements will be completed by policies, which are scheduled for next 0.13.0 release.

To learn more about Mainflux and how we’re building the world’s most sophisticated open-source Industrial IoT cloud, visit our website and follow us on Twitter!

--

--