Your browser is not supported. Please update it.

27 March 2015

Java seeks to win IoT to make up for its mobile mistake

Before the advent of smartphones and app stores, it looked certain that Java would be the standard language for mobile devices, offering a small footprint and multi-platform approach that was missing from the established PC environment. But after Google adopted a fork of Java for Android, the older language was left languishing on inexpensive feature-phone applications.

Java began life as a language for embedded computing, targeting early set-top box interfaces, and its designer James Gosling envisaged it supporting device-to-device communications from the start. It lost its way in the embedded world when alternatives like C, Assembler and Python became more adept at using systems with constrained memory or CPU, but the average size of the embedded environment has grown significantly even as Java has become more resource efficient. But now its supporters have high hopes that Java may have a second coming in the IoT.

On mobile, Java was a victim of fragmentation, and by owner Sun Microsystem’s failure to create a unified framework. Now that Oracle owns both Sun and Java, alongside the IBM-drive Eclipse Foundation and various open source initiatives, Java seems to be enjoying a renaissance, as it is pushed by its adopters to fill in the gaps in the embedded Java platform in order to take a leading role in the IoT.

It will have to compete against numerous embedded software environments, including Android and Windows, but Java does have the advantage of an existing major presence in M2M markets and an extensive developer base. This could enable it, like the C language, to counteract the effects of power struggles between individual vendors or would-be standards – something that should see it happily exists alongside the shifting power blocs and alliances that have come to permeate the IoT.

This is the aim of the open Kona Project, which aims to define and implement Java APIs which could work across various protocols and bring some unity to the IoT for developers. The APIs, initially for Java Standard Edition and later for Java Micro Edition, would be optimized for embedded devices.

The project’s first protocol will be CoAP, with MQTT and others likely to follow. CoAP will be contributed by ARM, which has been working intensively with the Java community as it builds up its IoT platform, mBed OS. It will support connectors like UDP and TCP, and technologies like Bluetooth could be added later.

However, while open projects like Kona show the way forward, they often take place outside the official Java Community Process, which controls standard Java specs, and they can create fragmentation within the Java platform even while they seek to paper over cracks in the IoT communications framework. The lack of firm control over the process, and Java’s semi-standard status, created major fragmentation problems in the mobile world long before Google wreaked havoc with its Dalvik implementation, and Oracle or Eclipse need to drive a more united effort this time.

Controlling this unifying layer would give Oracle a new power base (and explains the initial desire to buy up Sun and Java), which will be valuable for its core business of creating big data platforms – which will increasingly be used to handle the massive amounts of data associated with the IoT.

However, some of the community is angry that Oracle is reportedly trying to squeeze more direct revenues out of Java, potentially damaging its appeal and its potential as a broad open source platform like Android. Azul Systems, provider of the Zulu Embedded alternative Java environment, told The Register that Oracle has been using strict Java distribution policies, and an aggressive end-of-life schedule for Java SE, to insist on new and more costly Java licensing contracts. While this opens up an opportunity for other implementations like Zulu, based on the same OpenJDK code as Oracle’s, it is another potential source of conflict and disunity in the Java IoT effort.

Its pricing policies may be controversial, but Oracle’s ambition to create a platform to unify diverse real time OSs and protocols is clear. It has unveiled a Java-based service delivery platform and is running Java on microcontrollers from Freescale, Qualcomm, STMicro and Imagination/MIPS – for IoT applications that need to be low in power and footprint, but not in functionality.

Java has also enjoyed a resurgence in real time computation, and in February the Real Time Specification for Java (RTSJ) was reinstated. And then there is the Eclipse Foundation and its instigator IBM, who have done more to give Java the enterprise position it enjoys than Sun ever did, and will look to do the same in the embedded world. Here, IBM has the same motivations as Oracle to harness a huge new source of business for its cloud and analytics technologies, and it has already shown itself keen to control underlying IoT frameworks too, as with its MQTT protocol and its active role in bodies like the Industrial Internet Consortium.

Eclipse IoT is a subset of the Foundation and has 15 open source projects that implement IoT technologies like MQTT, Lightweight M2M and CoAP. In September, this group delivered its Open IoT Stack for Java, helping Java developers to connect and manage embedded devices with reusable frameworks and services.

Mike Milinkovich, executive director of Eclipse, previously announced that the foundation was working on creating a Java platform for device connection and management. “Our goal with this is to ensure that Java developers have a free and open source platform for building IoT solutions.”

With nine million Java developers, Milinkovich believes Java is best placed to address a little-discussed challenge for the IoT – a shortage of programmers. “When you hear about the IoT opportunity, the focus is always on the number of billions of devices and the number of trillions of dollars … but one of the things that barely gets mentioned is that in the next 6-7 years, something in the order of four million developers need to be recruited and enabled to start working with IoT software,” he said in an interview.

This is the kind of attitude and language which could put Java in particular, and open source efforts in general, at the heart of the IoT, rather than semi-open solutions controlled by a single vendor, like Android and, indeed, Oracle’s own Java implementations. The owner of Java needs to stop thinking in the old-fashioned terms of licensing revenues and embrace the bigger opportunity of dominating the IoT programming base.