August 29, 2006
Real Time Java
Real time or just "real fast?" WebLogic introduces a new Java VM and application server built on it.
The Real Time Specification for Java (RTSJ) was the very first Java Specification Request (JSR) worked through the Java Community Process (JCP). Sun, working with the community, implemented the specification and created the Java Real-Time System (Java RTS).
The actual definition of real time is often misconstrued. Many people confuse real time with "real fast," yet real time is really all about predictability in terms of latency and response. In order to achieve real-time performance in a software system, you need to control latency, therefore speed is a factor, but still it’s not the only one. The most important factor in real-time Java is guaranteeing predictability, and ensuring that garbage collector activity will not interfere with an application’s ability to respond to real-time events (such as an elevator passing a sensor). See Wikipedia for a good definition of real time.
At JavaOne this year, Sun had many Java RTS demos, but the one that interested me most was the real-time application server. In a nutshell, Sun took their Java EE application server and opened up two ports to requests. In one port they ran the normal Java VM, but in the other port they ran the real-time VM. The results were astonishing, as all requests made to the real-time Java VM were handled within a predictable, consistent, and very short time frame. As load was increased on the server, the real-time VM still responded predictably, yet the normal VM showed great latency.
WebLogic Real Time
But Sun is not the only vendor offering real-time Java; BEA recently announced WebLogic Real Time™. BEA’s real-time Java implementation offers latency in the 30 millisecond range. This is pretty good, but Sun’s real-time Java offers latency in the 10 microsecond range, which is an order of magnitude better, and leads to a much more predictable system.
One factor in the difference in latency may be the underlying operating system requirements imposed by the two vendors. Sun requires a real-time OS environment such as Solaris or, soon to come, carrier-grade Linux. WebLogic Real Time, however, works on Windows or Linux. With Windows and most Linux distributions not being real-time operating systems, this may account for the higher latency in the WebLogic VM.
Regardless, the introduction of new real-time Java VM implementations shows that Java is heading towards new territory. Applications for financial institutions, manufacturing, aircraft control, telecommunications, and the military--once the domain of C/C++--can now be built with Java.
What requirements do you have for real-time Java? Are you willing to accept greater latency for more flexability in OS choice? Let me know by entering your comments in the section below, or email me at eric@ericbruno.com.
-EJB
Posted by Eric Bruno at 09:19 AM Permalink
|