Java preps dive into real-time role
Keywords:david lammers? ee times? spotlight? java? industrial control?
For several years now, real-time versions of Java from smaller companies such as Aonix and Aicas have jousted for market share. Now, large companies such as Sun Microsystems Inc. and IBM Corp. are starting to field technology aimed at the real-time Java market, often working with large customers in the military-aerospace arena.
To date, real-time Java often has been "soft" real-time. As Anders Flodin, director of strategic alliances at Aneas, said, "Java is not going to be used anytime soon for projects that could crash the space shuttle."
In robots, industrial control, fiber-optic switches, telematics and STBs, Java is beginning to inch its way into markets that were traditionally dominated by C-based code. "Whether it is real-time or not is open to debate, but Java's percentage in embedded has been increasing slightly year over year," said Steve Balacco, a senior analyst at market research firm Venture Development Corp. "From my understanding, the folks in the military are among the early adopters of real-time Java."
Earlier this year, Venture Development surveyed about 500 embedded developers, and only 9 percent said that their current project would include a Java Virtual Machine (JVM). Among those who would include Java, slightly less than half (46 percent) said the effort involved real-time aspects.
In military projects now under way, Java may play a role in real-time applications. Data must be captured and delivered, and decisions must be communicated rapidly.
Telematics bright spot
Kelvin Nilsen, CTO at Aonix, said that real-time Java is seeing strong growth overall. "I would say about half of our new business at Aonix is in the military sector," he said. "There is a strong upsurge in the military, in unmanned aircraft and other newly deployed systems. There is activity in telematics, both in the commercial and military sectors."
Greg Bollella, a distinguished engineer at Sun, has been heading Sun's real-time Java project. Bollella said Sun's first implementation of Java Real-time System (RTS) is based on the Solaris 10 OS, with latencies in the 10-20?s range for dual-processor, Sparc-based workstations. Response times are slower for single-processor systems and depend on the number and type of device drivers, how many PCI slots are filled and other factors, he noted.
Asked which processors Sun management would support next, Bollella said ports to either the X86 or PowerPC platforms are under active consideration.
"Inside Sun, the first question is whether the hot-spot JVM is ported to that OS and hardware combination," he said, adding that some 32 combinations have been ported. Sun plans to support a family of development platforms with various hardware footprints and different "temporability" demandsi.e. latency and jitter times.
Bollella said Java RTS is an "advanced, unified," real-time application development platform, meaning "it has real-time scheduling techniques instead of hit-and-miss. It also means it is using object-oriented methodologies for design instead of procedural coding."
Java RTS supports a mix of non-real-time and real-time threads, and it will be supported by a modern tool set, using both Netbeans and Eclipse-based development tools, he said. The product includes features that exert control over asynchronous events and support asynchronous transfer of control.
Unified, Bollella said, means that engineers could do all of their programming in Java, instead of "splitting up projects among C, C++ and Ada." Programmers could use regular Java for non-real-time coding, implement real-time threads for the soft real-time portion and then use "no heap" real-time threads that do not resort to garbage collection, thus guaranteeing deterministic behavior.
James Hunt, CEO of Aicas, said Sun's Java RTS announcement is "not bad news for us because it raises the interest in real-time Java. We have many more programs going on now than we did last year."
IBM, a leader in using Java for enterprise applications, is working closely with Apogee to deploy Java in the embedded markets. Steve Gruber, director of embedded-software business development at IBM, said the two companies have been working on custom development projects with "several" customers requiring some real-time responsiveness.
Flodin at Aneas said that Sun, IBM and others are working to improve the performance of Java with some new garbage-collection algorithms.
"I think real-time Java will be used in systems where we can live with failure," Flodin said, referring to the softer forms of real-time systems.
But Bollella said Sun's Java RTS product includes major advances in garbage-collection improvements that allow programmers adept at real-time programming to tackle hard real-time applications within Java.
He also noted that "real-time programming is hard," demanding "fundamental engineering trade-offs when thinking about real-time garbage collection and predictability of the execution of logic with respect to time."
Because Java RTS mixes real-time and non-real-time code, developers can use regular Java for maximum-throughput portions and move to "low pause time" with garbage-collection techniques that "break work into smaller bits" so the garbage collection isn't noticeable, Bollella said.
In Java RTS, there comes a point where the garbage collector ceases to operate, reducing overhead due to collection to zero, but requiring more analysis.
"The real-time collectors have tuning knobs to tell collectors when to run and how much to run. To tune them, the programmer must have values to tune," Bollella said. "To do that, the programmer has to know how an application program is behaving with garbage collection over time."
As predictability improves, "what increases is the complexity of the programming model. You have to do more analysis, some extra things to make the analysis more tractable. When the programmer hops over to the scoped-memory side, you have to think more. It's truereal-time programming is hard," he concluded.
Visit Asia Webinars to learn about the latest in technology and get practical design tips.