C++ like Java for low latency

About Peter Lawrey

Overview

Previously I wrote an article on C like Java.  This is term I had come across before. However, on reflection I thought C++ like Java is a better term as you still use OOP practices, (which not C-like) but you put more work into managing and recycling memory yourself.

The term I favour now is “low level” Java programming.

Low latency and “natural” Java

Many low latency systems are still programmed in what I call natural Java.  In most cases, this is the simplest and most productive.  The problems really start when you have large heap sizes and low latency requirements as these don’t work well together.

If you have an established program and a rewrite is not reasonable, you need something like Zing which has a truly concurrent collector. Although you may see worst pauses of 1-4 ms this as about as good as a non real time system will get.  RedHat is rumoured to be producing a concurrent collector but as Oracle have found with G1, writing an effective low latency is very difficult. G1 works fine, it just isn’t suitable for low latency trading (e.g. with 1 ms pause times) and I am not sure it ever will be.


Source : http://www.javacodegeeks.com/2013/07/c-like-java-for-low-latency.html

Back to Top