Thursday, August 5, 2010

RTSJ or Standard Java with Fast JVM for Low Latency Applicaitons?

For low latency applications as often required by financial services and telecommunication industries, there seems to be 2 trends. One is to use Real Time Specification for Java (JTSJ); the other is to stick with standard Java helped with some fast JVM.

My problem with RTSJ is it is not transparent to standard Java due to its extensions such as RealTimeThread, NoHeapRealTimeThread, Scoped and ImmortalHeap that are required in order to achieve Soft or Hard real time goal. It also require you to have a real time OS.
Because standard Java has a much larger user base than RTSJ does, RTSJ's incompatibility is the biggest showstopper for its wide application.
RTSJ mainly fixes 3 problems that make traditional Java indeterministic:
  GC's pause;
  JVM's adaptive optimization;
  JVM's dynamic class loading.

On the other hand, JVM has being improved a lot each year. JIT compilers also become more and more powerful with such features as dynamic and adaptive optimizations, concurrent and parallel GC algorithms and dynamic instruction scheduling.

For example, you can improve both throughput and response time with the concurrent and parallel GC in Oracle/Sun's hotspot JVM compared to the traditional serial GC.
With its latest G1 which is available in Java 6 update 14 and later,  you can even achieve soft real-time latency.

Oracle / Bea's JVM JRockit is especially exciting. Oracle claims it is the industry’s fastest JVM with its average response time in microseconds for most well-managed applications and low, single-digit, millisecond response with a five nines reliability guarantee.

I am just wondering which one has more momentum and which one has more applications in the finance services industries.

No comments:

Post a Comment