New Adventures In Real-Time : An Interview With Greg Bollella
The Java Real Time Specification is bringing Java to new places, including the unsuspecting PLC market. This year at JavaONE, Greg Bollella introduced the Blue Wonder system for industrial automation, built on top of Java Real Time. When you look at the details behind Blue Wonder, it's obvious that the Java Real Time specification is going to bring about a revival for the Java programming language, providing new opportunities in many industries from industrial automation and finance to military applications. I met up with Greg to talk about the real time specification in detail, the challenges in writing time critical applications and to see the infinite possibilities that it provides.
James Sugrue: Could you give us a background into the Java Real Time Specification?
Greg Bollella: Real time Java was JSR-1 and we finished in 2000, became solid with the 1.0 release in 2001. I started JSR-1 while at IBM, and moved to Sun in 2000 to continue working on Real Time Java.
My academic background and PhD was in realtime scheduling. Precisely it’s about how to support Real Time Computing within general purpose Operating Systems and VM’s, although I wasn’t thinking of VMs when I was doing that PhD. I’ve been thinking about how do you do real time within general purpose systems for the last 16 years. The general idea behind this is there’s so much value in what we create in the general purpose side of the computing industry that’s not able to be completely shared with the realtime programming community. So my dissertation, real time Java, and Blue Wonder and the Java Real Time System are all focused on bringing that value to the real time and embedded programmer.
JSR-1 has a new revision JSR-282 that is fixing problems with the first release, adding some stuff and moving forward with the spec. There’s also JSR-302 which is a strict subset of JSR-282 that is crafted in such a way that one would be able build an implementation of it that would be fairly easily certified under DO178B for Safety Critical Systems. (DO178B is the US certification protocol for software systems that would be used in safety critical systems such as flight controls for commercial airliners). That’s really difficult stuff to get right. So it’s not that you couldn’t possibly take regular Java through that certification, it just would be unbelievably expensive and maybe not ever finished. So this is a subset of very strict programming guidelines. So that’s 302.
One of the things about the spec, JSR1 is that the spec states that you have to be compliant to Java first before you can be compliant to JSR1. So you have to be SE, ME or EE compliant first. So our implementation at Sun, The Sun Java Real Time System, is compliant to Java SE. We pass all the test suites that SE does and any program that runs on SE5 also runs on Java RTS – that’s an important piece of the puzzle.
Sugrue: Does having an SE 5 application running on Java RTS make it any more safe?
Bollella: The application is still functionally correct but to get the real time behaviour you do have to do some coding. So if you have an application, say in finance - they think they want them to be realtime but they just can’t throw the application into the Real Time System and have magic happen.You need to think about the architecture and which parts of the application you want to be real time, change the thread types or re-architect it using the APIs from JSR1. There’s no magic unfortunately, but the changes are very straightforward and pretty easy to implement.
Sugrue: Is there a Reference Implementation available from Sun for this JSR?
Bollella: Not from Sun, we’re not the spec leads but there’s a reference implementation from a company called TimeSys. The TimeSys implementation is free. It's a good reference implementation but not optimized for performance and probably not a good choice for production.
There’s product versions available from some companies – IBM has a product implementation of JSR1 and Sun does. There’s a couple of small implementations of systems claiming to be Real Time Java – but they aren’t as they are not compliant to regular Java, or JSR1. They say they are compatable with JSR1 and Java but they officially haven’t passed the test suites. These are companies such as Aonix and Aicas. They claim things that they probably shouldn’t be claiming, but that’s the world.
They are interesting implementations – they don’t support the same kind of model that real JSR1 implementations like IBM and ours do where you can do full blown, non-real time stuff hammering away and be isolated from the real time stuff which still meets it’s deadlines. So you can have your standard Java app running and your real time app running and maintain realtime, safety critical stuff.