Java brewing in embedded with targeted virtual machine

August 1, 2014 OpenSystems Media

Programming languages and environments have always been an important consideration when building embedded systems. Starting with "to the metal" programming versus writing an application using a Real-Time Operating System (RTOS) back in the 1980s, there has always been the performance-versus-convenience trade-off. As embedded systems became more complex and processor technology became faster, RTOSs became mainstream to keep up with development time pressures. The hand-coded assembly days gave way to developers using the C/C++ language with standard C libraries and optimizing compilers to generate more complex, re-usable code faster.

Java's widespread use for enterprise software is well documented. The "write once, run anywhere" mantra is still compelling as is the breadth and depth of various Java classes and libraries that can be used to quickly develop complex applications.

But has Java success reached the embedded markets as well? What people may not be aware of is, in addition to its success in the enterprise space, Java has been widely deployed in the embedded marketplace for more than 15 years. The "write once, run anywhere" promise has been leveraged in proprietary and standards-based solutions for middleware in TV, telephony, and telematics since the late 90s.

Java options

For those embedded engineers with a Linux inclination, perhaps you're likely to simply load up the Java SE from Oracle and move on. If your embedded Linux requires smaller RAM or storage footprints, you may consider Java SE Embedded. But what you might not realize is that Java SE for embedded devices may require a royalty. From Oracle's website:

"Oracle's license for Java SE enables it to be freely used for general purpose desktops or servers. If Java SE is bundled as part of a dedicated solution that involves or controls hardware of some kind, then it's likely an embedded application and is subject to modest royalty payments."

While Java SE has seen some movement beyond Intel Architecture to ARM and PowerPC, Java SE Embedded still is a Linux-oriented environment with limitations for processor support. Embedded systems with real-time requirements can also eliminate the ability to use the Java SE platform.

There are alternatives. And there are companies with technologists experienced in embedded software development that have done significant work with Java to alleviate these problems and bring Java into the embedded mainstream.

Clean room Java

Skelmir is a Massachusetts-based software company with a global reach. Since 1998, Skelmir has been servicing the embedded device market with clean room virtual machine technology (CEE-J) for running Java applications.

Skelmir's initial deployments were for proprietary Java applications in the satellite and IPTV set-top market and standards-based Java solutions in the cable set-top market. Skelmir soon expanded into the multi-function printer market, video conferencing, industrial control, and, most recently, the growing Internet of Things (IoT) markets of building/home automation, security, fleet management, and eHealth. Skelmir currently has more than 65 million deployments worldwide.

Chris Hausner, Vice President of Sales for Skelmir (www.skelmir.com) is a veteran of embedded systems software and Java, having worked at companies like Espial and Microware Systems Corporation. He understands the roots of embedded and has taken that knowledge and applied it to proliferate the use of Java in a variety of embedded applications.

"The set top box market has been our flagship market for many years, but we're seeing a fast growing market in IoT including the home and building automation, fleet management, and eHealth markets," Hausner says.

Hausner also mentioned the Open Service Gateway Initiative (OSGi) standard as an important Java-based application framework in the IoT market, its architecture being well matched for the dynamic loading and unloading of Java services and devices ("things"). Embedded Java-based OSGi is also being used by other markets such as automotive, where companies like Daimler and BMW are using OSGi to manage user functionality within the automobile. OSGi Frameworks are available as open source solutions or from commercial providers like Prosyst and Makewave.

Breadth of processors and CPUs

Another area where embedded Java technology differs from enterprise is operating system and CPU support. Unlike the enterprise world, embedded developers can't depend on everything running on an Intel processor. There is a wide range of processors used in the embedded industry so it's important for an embedded software solution to have some breadth. Skelmir supports x86, ARM, MIPS, and PowerPC. And beyond processors, Skelmir also can provide VM ports for operating systems beyond Linux.

Java for non-graphics applications

While Java may have a reputation as a graphics and multimedia-oriented software environment, Hausner mentioned multiple instances and projects where Java is being used as a core non-graphical application environment. Many of these designs are again in IoT markets where the solution has a centralized hub, or gateway, with varying devices and/or services being dynamically loaded and unloaded as required. These gateway devices are then connected to back office servers for service provisioning and for big data collection, network diagnostics, monitoring and control.

"As the cost of connectivity of devices decreases we see this as a really exciting time for Java in IoT designs," Hausner said. "The object-oriented nature of Java is a perfect fit for the current and future devices being added to the IoT market."

Real-time Java

And yes, real-time Java is a thing. The primary nondeterministic aspect of Java has always been the garbage collection feature. Since Java garbage collects memory as opposed to forcing the application to allocate and return memory, when the garbage collection runs it can dramatically skew the real-time characteristics of the embedded system.

The aicas (www.aicas.com) JamaicaVM features a deterministic garbage collector that is capable of sub-microsecond jitter depending on the underlying processor and hardware.

The aicas product line also includes some vertical market specific packages. For example, the JamaicaCAR product provides software features for development of Java-based auto dashboards. JamaicaMED includes an application layer that provides security with real-time for safety-critical medical applications.

Applying Java benefits to embedded

There are many benefits to Java in both enterprise and embedded designs – reusable object oriented classes, third party support, open source software, and a wide pool of experienced engineers. Developing in Java for embedded designs can be a bit challenging at first. However with experienced embedded Java companies providing VMs developed and supported specifically for running Java on embedded platforms, these challenges can easily be overcome to deliver all of the benefits of Java in an embedded design.

Curt Schwaderer (Editorial Director)
Previous Article
Embedded HMIs evolve to match consumer tech expectations in the factory
Embedded HMIs evolve to match consumer tech expectations in the factory

Through open standards, PC technology and networking advances, and cues from connected consumer devices, em...

Next Article
Conquering concurrency bugs in multicore systems
Conquering concurrency bugs in multicore systems

Concurrency challenges are compounded in multicore architectures due to their complex, parallel nature. New...