Kaa Friendly and Flexible Middleware for the Internet of Things

0
868
Advertisement

Kaa is an open source IoT middleware applicable to enterprise IoT development at any scale. The Kaa protocol is built on top of lightweight IoT protocols like MQTT and CoAP, and defines the basic rules of communication between devices and the platform.

We have known Kaa as one of the fictional characters in Rudyard Kipling’s classic, ‘The Jungle Book’. But here we will talk about another role played by Kaa, with relation to different applications developed using IoT. Kaa is an open source IoT platform that is built on a modern cloud-native architecture and a customisable feature set. It is very helpful for all those who are confused while choosing a platform prior to launching an IoT based project. Kaa is basically an IoT middleware technology that can be used for any scale of enterprise IoT development. It equips IoT based project developers with a range of unique features, which allows them to build advanced applications for various smart products.

Kaa is very flexible in managing ecosystems and for the end-to-end processing of different IoT devices. One of the major challenges experienced while working on IoT devices is the interaction or interface of different hardware devices with the software applications. Kaa can very smoothly handle such interfaces that integrate all categories of hardware applications, right from smaller to larger ones. We can develop our IoT based applications faster when using Kaa. It supports a wide range of models starting from tiny startups to massive enterprises by providing advanced deployment models for multi-cloud IoT solutions.

Figure 1: Features of Kaa (Image source: googleimages.com)

Different parameters that make Kaa work out-of-the-box

Advertisement

1. Connectivity: This deals with messaging between the cloud and different devices connected to the Kaa platform. That’s how all devices interact with the cloud to perform different operations. The Kaa platform basically supports various lightweight IoT protocols for connecting devices, such as CoAP and MQTT. Kaa can support any open IoT protocol. This platform allows the building of all those applications that work over any network connection, be it persistent or intermittent. We may select one of the existing transport protocols that come with Kaa, or can even create a customised transport protocol and plug it into the system. Kaa uses MQTT as the default protocol, and is built on top of CoAP and MQTT. It defines all the basic rules of communication between devices and the platform. This protocol is open and allows for any arbitrary message formats.

2. Management of devices: Kaa facilitates the registration of digital twins, which represent devices, and other such entities managed by the platform. It also allows the storage of different device attributes, which provide detailed information about any feature of the device. Such attributes can be the MAC address, serial number, location, etc. Apart from simple data types, attributes can also contain more complex and structured objects, like a list of connected peripherals with their respective properties. Besides, we can construct different filters using the device attributes to segment the device population into sets of individually managed groups. Kaa automatically re-evaluates filters whenever the device attributes change. To connect to the Kaa platform, a device just has to present valid credentials, such as tokens, pre-shared keys, login and password combinations, etc. Kaa tracks any connected device throughout its life cycle.

Figure 2: Architecture of Kaa (Image source: googleimages.com)

3. Data collection: Kaa provides an easy-to-use protocol to collect data from different connected devices. This protocol also ensures reliable data delivery along with their respective response codes indicating the outcome of data processing by this platform. Once the data is received by the platform, it can be sent to multiple processing pipelines. In case of any error in the midst of processing, like processor overload or disk crash, the device is notified about it. Hence the device always knows whether the data submitted is safe to delete or is required to be resent. This protocol supports batching to minimise network usage and increase the data throughput. It enables devices to buffer data locally before it is uploaded in a single message. Besides improving the network efficiency, this feature is useful in IoT deployments when connectivity is intermittent and hence helps in preserving the device’s battery life. It allows the collection of both types of data sets—structured and unstructured. It can be categorised into primitive types, like plain numbers, text or compounds like key-value arrays, maps or nested objects.

4. Command execution: The command execution feature of Kaa allows the delivery of messages with arbitrary payload to any of the connected devices, and also permits the receipt of near real-time responses from them. For instance, one can remotely check the present temperature using a home thermostat, simultaneously point a security camera to any defined area, open any vehicle’s trunk, and more. Kaa uses two-way communication that allows different devices connected to it to send responses back to the server. For lightweight commands, one can use the synchronous option, which means that the caller will be put on hold until the results of command execution are delivered. For resource-consuming commands, we may choose the asynchronous option, which enables our platform to notify its caller about the command execution result.

5. Analysis and data processing: Kaa gives a lot of freedom when processing the collected data. This platform supports data collection adapters which allow sending data to different databases and data analytics systems. As Kaa has got a highly modular architecture, any new integration to it requires minimum effort to update or change an existing adapter, or to create a custom one. Raw or unstructured data can also be converted to a well-structured time series that is convenient for pattern analysis, analytics, charting, visualisation, etc. Similarly, the time series can also be pushed into an analytics or processing system of choice for any raw data set.

Working with time series is really very flexible in Kaa. It not only displays the main value for a time series, like temperature, it also allows its users to set up tags, which allow viewing some additional data as well, like light intensity, humidity, etc. Tag values are actually fetched from the set of collected raw data and then attached to each data point in a time series. Also, it is possible to develop multiple time series from one data sample.


Areas where Kaa can be used

Kaa is being widely used across all industries. But there are some among them which use Kaa to a greater extent for different IoT based applications. Here are a few of those verticals:

  • Consumer electronics
  • Automotive
  • Healthcare
  • Smart cities
  • Telecommunications
  • Wearables
  • Logistics
  • Agriculture
  • Sports and fitness

6. Data visualisation: The data visualisation part of Kaa comprises a rich set of widgets, such as charts, gauges, tables, maps, etc. We can use all these widgets to analyse and visualise different types of data, whether statistics, telemetry, geolocation, metadata, or any other type —historical as well as current. All of these widgets are configurable and allow modification of their data sources and visual representation. To address any special use cases, the visualisation component of Kaa allows easy plugging into custom widgets. Apart from data visualisation, widgets allow interaction with various devices by changing configurations and metadata, sending commands, etc. Dashboards allow widgets to be organised into sets of logical groups and to define their layout. Kaa supports dashboard templating, allowing the reuse of one configuration for more than one device’s dashboard. Kaa can also be integrated to any data visualisation tool of choice.

Figure 3: Kaa – middleware that connects hardware and software applications (Image source: googleimages.com)

7. Configuration management: Configuration management is very useful for controlling the behaviour of devices and managing various data processing parameters — feature flagging, edge analytics and other such functions. This platform allows the implementation of all these functionalities by providing configuration management features that work with any arbitrary data structure. Hence we can even apply the configuration data that’s as simple as a key-value set or as complex as nested objects. Kaa constantly tracks already applied configuration data as well as pending delivery, as different IoT devices may not be constantly connected. Kaa supports both push and pull modes as the default configuration management protocol. To ensure reliability, configuration delivery is completely based on the result codes and configuration application confirmations. Kaa generates a config change event whenever the device changes its current configuration. These generated events can be used to trigger different automation processes inside as well as outside the platform. The Kaa platform allows us to manage the configuration of its devices, individually. We can define the configuration for a specific device or even for a group of devices on the basis of their individual characteristics like location, software version, etc.

8. Supports over-the-air updates: Over-the-air updates is a powerful feature that enables devices to continuously evolve over time. We can implement many new features for the devices already in use—for instance, auto pilots for vehicles, face recognition for security cameras, predictive maintenance for industrial machineries, etc. Kaa allows reliable delivery of software updates by making use of the confirmation response codes that are sent by devices once the results are updated. Another significant feature is its ability to define the software update path by using compatibility graphs based semantic versions. Kaa also allows tracking of the current version of software that is installed on the managed devices and helps in defining its potential update vectors. Each software version is represented in Kaa using a flexible descriptor that’s delivered to the device in the form of an instruction to perform an update.

A quick overview of the architecture of Kaa

The Kaa IoT platform has been developed keeping heavy-duty, enterprise-grade IoT solutions in mind. It completely removes the monolithic approach implemented while developing an architecture that supports highly portable microservices, hence allowing flexible customisation and rearrangement even in the midst of the solution’s life cycle. It also enables cloud-native scalability while offering full freedom with regard to the type of deployment. The Kaa IoT platform consists of Kaa extensions, the Kaa server and the endpoint SDKs as the main components.

1. Kaa extensions are nothing but the independent software modules that improve the functionality of the platform.

2. The Kaa server is actually the back-end part of the platform. It manages tenants, users’ applications and devices. It also exposes the integration interfaces and provides administrative capabilities.

3. Endpoint SDKs are the sets of libraries that offer client side APIs for different features of the Kaa platform and handle data marshalling, communication, persistence, etc. Kaa SDKs are designed to facilitate the development of client applications that need to be run on different connected devices. There are various endpoint SDK types that are available in different programming languages.

Security in Kaa

The communication of Kaa with different devices connected to it is secured with TLS or DTLS, by default. Security is of course one of the main parameters for all enterprises when they opt for a platform. In the case of Kaa, various devices connected to it authenticate the server by validating its TLS certificate. The Kaa server supports a couple of methods for device authentication. These vary from different pre-shared keys to validating the client side TLS certificates. Kaa also supports Flexible Credentials Lifecycle Management. This credential management system allows us to provision, suspend or unsuspend, as well as revoke different credentials that are being used by various connected devices.

The advantages

Kaa has a number of critical advantages when it comes to rapid IoT development and deployment. Let’s have a look at some of them.

1. Customisable microservices architecture: As we have already discussed, Kaa has a customisable architecture that fragments the different features of Kaa (like visualisation, messaging, etc) as microservices. This leads to easy customisation and ensures effective separation between different parts of the platform. All these Kaa microservices can be easily integrated with third party systems and can also be rearranged as per individual needs.

2. Freedom of choice regarding technology: Kaa facilitates usage of our favourite DevOps tools while implementing Kaa based solutions in any environment. This is possible because Kaa runs all its microservices in Docker containers and they use well defined REST based interfaces. It allows for the development and deployment of different applications virtually written in any programming language.

3. Scalable and self-healing: Kaa is very scalable by design and can be easily expanded by adding more servers to the Kaa cluster. It can reliably support as many endpoints as needed. It has got its own self-healing capabilities that can even restore the platform in case of any failures.

4. Freedom of deployment: Users have all the freedom to deploy different Kaa services anywhere they prefer. It can be deployed at one’s own data centre or can be hosted on any public cloud infrastructure as well. It is really perfect for hybrid deployments.

5. Open IoT protocols: The Kaa platform supports messaging with connected devices using MQTT and CoAP. Both of these are widely used IoT protocols having wide implementations for all the mainstream languages.

6. Gateway support: Based on the type of device, one can choose among the two available connectivity options — either connect them directly or use an IoT gateway. IoT gateways are handy when the devices don’t support any of the available Kaa protocols, as they can convert the data semantics as well as the contents of the device’s messages into the protocols that are supported by the Kaa platform.

7. Application versioning: Kaa supports flexible application versioning. Different versions of applications allow us to define various functions and capabilities for our endpoints. For instance, as the IoT solution evolves over time, a couple of new capabilities can be introduced, while others get retired. The Kaa platform always maintains support for all of the application versions that are used by the devices in the field.

8. Multi-applications: Kaa helps organise the device ecosystem by isolating the device management functionality and data flows in the platform. One Kaa solution can support multiple Kaa applications, allowing for cross-application interaction.

9. Blueprints: Kaa provides a human-readable and easily understandable blueprint that fully describes the system functionality by defining the necessary microservices along with their configurations. Blueprints empower us with the code approach for managing platform clusters. A blueprint can be easily used to reliably deploy different identical instances of the same solution to various environments—test, development, staging, production, etc.

10. Built on open components: The Kaa platform basically relies upon a variety of popular and well-tested open source components. This helps flatten the learning curve for any new user and helps Kaa to be open and customisable from its very core.

11. Continuous support from vendors: The Kaa IoT platform is supported by the Kaa IoT company. Kaa vendor services include professional as well as engineering assistance to client teams and production support.

Advertisement

LEAVE A REPLY

Please enter your comment!
Please enter your name here