In "Real-Time Java: An Introduction," Peter Mikhalenko discusses the obstacles and advantages to real-time Java.
Real-time Java offers a much more reliable and predictable scheduling mechanism, memory handling methods, different memory models, a more predictable threading and synchronization model, asynchronous event handling, and high-resolution time handling. It makes predictable execution the first priority in all trade-off decisions, sometimes at the expense of typical general-purpose computing performance measures.Mikhalenko also discusses some issues that must first be addressed before deploying real-time Java, among them GC semantics, synchronization, thread scheduling and high-resolution time management.
Real-time application development requires an API set and semantics that allow developers to correctly control the temporal behavior of application, i.e., how it will behave in real-world time. A real-time edition of Java must therefore provide some semantic JVM enhancements and a new API set appropriate for real-time applications. It is not surprising that the main obstacle in achieving real-time characteristics for Java is its garbage collector. A real-time garbage collector became a revolutionary and central component of Sun's recently-released Java real-time edition RTS 1.0, although its first implementation does not include one (it is expected in the next release). Java RTS addresses other issues, making strong deterministic guarantees for thread scheduling, synchronization overhead, lock queuing order, class initialization, and maximum interrupt response latency. Java RTS is intended only for suitable underlying operating systems, which means that only a real-time operating system, such as QNX, is appropriate for implementing the JVM.Mikhalenko goes on to explore some of the new features of Sun Java RTS 1.0, including:
- Direct memory access
- Asynchronous communications
- Memory management
- Real-time threads
Do you think real-time Java programming has an effect on the enterprise programmer? Why or why not?