IT-centric IoT device management using Java and Eclipse Kura

February 18, 2016

Java-based device application frameworks in the Open Services Gateway initiative (OSGi) model can speed development of Internet of Things (IoT) gatewa...

 

Java-based device application frameworks in the Open Services Gateway initiative (OSGi) model can speed development of Internet of Things (IoT) gateways and applications, as well as offer advanced remote management capabilities not available through traditional embedded agents.

The edge of the Internet of Things (IoT) is where solutions connect, communicate, and interact using sensors, actuators, gateways, agents, and controllers. As technology advances, vendors are touting “advanced management capabilities” for these devices at the edge. These capabilities vary, ranging from the simple ability to turn a device on and off to more complex actions such as updating software, managing Wi-Fi connections, configuring security policies, or changing data parameters.

Some platforms claim to have edge management capabilities, but microcontroller-based solutions using an agent cannot offer sophisticated management features. The following covers the limitations of agents and how to develop an edge system with advanced device management capabilities, in particular through the use of the Eclipse Kura open-source project. By integrating an advanced application development framework with a footprint that fits an intelligent device controller, edge systems can easily communicate with cloud-based management platforms that provide remote monitoring and control to save time and money in IoT deployments.

Agents on gateways for basic device management

Agents come in many shapes and forms, and to some degree can be implemented on different operating systems (OSs), but they do not integrate deeply enough.

Many companies offer device management in the form of an embedded agent on a gateway. This type of agent has been written specifically for the device, and often comes precompiled in a gateway’s development kit. In some instances developers may have access to APIs that permit some small amount of customization, such as the ability to set a few parameters on how much data is sent or when data is reported. Other times the agent is hard coded, usually in C/C++, with a narrow set of functions that cannot be changed.

Agents that reside on microcontrollers, or other constrained hardware, are not typically robust from a management standpoint and can only be modified or upgraded with difficulty. Therefore, if the application changes or the system needs to be updated, developers often have to start from scratch. While many vendors advertise these solutions as flexible for data analytics, what they mean is customers can do anything they want with data after it reaches the cloud. However, such agents do not offer much in the way of control at the edge.

At the gateway level, a more robust and open device application framework is desirable to enable advanced device management features.

A device application framework for advanced device management

There are a wide range of device management solutions that reside between an agent on a gateway and the edge system itself, as more advanced IoT solutions need more remote management capabilities than the traditional agent solution can provide.

Consider a vending machine company with machines distributed worldwide. Parameters change frequently to reflect inventory, price, and preference, and operators can benefit from remote management in order to fix a broken machine, update software, add new product lines or services, and more. This type of advanced remote device management can be achieved with a device application framework.

A device application framework puts a layer between the OS and the business application on the gateway. This collection of cohesive software components lets customers modify, reconfigure, and maintain their application over time, so it evolves as market demands change. Furthermore, the adaptability and flexibility of the architecture provides competitive advantages over static, fixed-function agents. But there are several key considerations before implementing a device application framework for an edge system with advanced management capabilities, notably the modularity, flexibility, and interface of the specific development platform.

Standards-based and modular

Choosing a device application framework that is open, accessible, and modular allows developers to load and write their own applications for management and computational purposes, and selecting a flexible standard ensures robust, well understood, and efficient operation at the edge.

For example, a Java-based IoT device application framework can result in shorter, more deterministic device software development. Using Java’s IT-centric approach to implementing logic in smart edge devices improves both device and application management, as its robust software infrastructure around service delivery is ideal for application code development in connected devices. This enables easy code development through software simulation before porting onto embedded devices, and provides investment protection and reduced time to market through the abstraction of hardware, networking, security, and OS functionality.

The Open Services Gateway initiative (OSGi) is a modular platform for Java that implements a complete component model. OSGi provides a vendor-independent, standards-based approach to modularizing Java software applications and infrastructure, and its proven services model allows components to communicate locally and across a distributed network (Figure 1). The result is a coherent IoT services architecture based on specifications that are highly scalable for long-term remote management and maintenance.

[Figure 1 | The OSGi layered service model allows Java-based IoT applications to communicate locally and across distributed networks.]

Java-based applications or components come as an OSGi deployment bundle, and can be remotely installed, started, discovered, stopped, updated, and uninstalled. Configuration is simple, as developers can write other application bundles directly into the application management layer that do something completely different with acquired data, or simply extend the layer or use another bundle.

Flexible

The ability to easily change and modify functionality is a must-have for device application frameworks today, but traditional agent solutions are not future-proof since they have to be rebuilt if applications evolve significantly. A device application framework built on open standards enables communication with multiple management systems, and any platform based on the Java/OSGi deployment model can manage various parts of the device from an application standpoint.

Similar interface

Developers do not want to have to perform device management differently on different systems; whether the device at the edge is a Raspberry Pi, Intel Edison, or purpose-built hardware, it should be managed the same way. Using an OSGi-based container on top of a Java Virtual Machine (JVM) simplifies application development and optimizes portability across systems and hardware architectures.

In short, by beginning with a proven architecture and software building blocks that would require many years to develop, the use of a device application framework can result in shorter, more deterministic device software development. Once this standard software platform is in place, acting on valuable data becomes easier than it has ever been before.

Eclipse Kura, an open-source application development and management platform

Eclipse Kura is an open-source project that provides a platform for building IoT gateways through the use of a smart application container that enables remote management and provides a wide range of developer APIs (Figure 2). The goals of the Eclipse Kura project can be summarized as:

• Provide an OSGi-based container for IoT applications running in service gateways – Kura complements the Java and OSGi platforms with APIs and services covering the most common requirements of IoT applications. These extensions include, but are not limited to, I/O access, data services, watchdog, network configuration, and remote management.

• Kura adopts existing javax.* APIs when available – When possible, Kura will select an open-source implementation of APIs that are compatible with the Eclipse license and package it in an OSGi bundle to be included in the Kura default build (for example, javax.comm, javax.usb, and javax.bluetooth).

• Design a build environment – The Kura build environment isolates native code components and makes it simple to add ports of these components for new platforms in the Kura build and distribution.

• Provide an emulation environment for IoT applications within the Eclipse IDE – From the Eclipse IDE, applications can then be deployed on a target gateway and remotely provisioned to Kura-enabled devices in the field.

[Figure 2 | Eclipse Kura is equipped with many services for application development and remote device management.]

Eclipse Kura provides a foundation on top of which other contributions for field bus protocols and sensor integration can reside, allowing Java developers to control behavior at the edge Built-in functionalities include turning the serial port on or off, Wi-Fi management, remote data processing, and more. These remote management services also allow IoT applications installed in Kura to be continuously configured, upgraded, and deployed.

Commercial versions of the Kura device application framework are also available on the market, such as the Eurotech Everyware Software Framework (ESF) that provides extensions in the areas of security, field protocol support, and native integration with the Everyware Cloud IoT service and application enablement platform. Through ESF, Eurotech provides a set of common device, network, and service abstraction tools for Java developers building IoT applications, including I/O access, data services, network configuration, and remote management.

Conclusion

Remote management saves time and money by enabling updates, configuration, and troubleshooting without physically touching the device. In the medical field, for instance, remote management means a network of thousands of devices can be updated remotely at once, so patients can access the most up-to-date care available. In the industrial market, managing devices remotely saves money by eliminating the need for technicians to service devices in the field.

Advanced Java-based device application frameworks that abstract the complexity of hardware and networking subsystems simplify the development, reuse, and remote management of cross-platform IoT applications. Open-source and commercial variants of this IT-centric approach to device management are available today.

Walt Bowers is an IoT Technical Solutions Architect at Eurotech.

Eurotech

www.eurotech.com

@EurotechFan

LinkedIn: www.linkedin.com/company/38780

Facebook: www.facebook.com/Eurotech-300969971064

Google +: plus.google.com/109070752122324620778/posts

YouTube: www.youtube.com/user/eurotechchannel

 

 
Walt Bowers, Eurotech