Quote from wave:
if your project involves capturing streaming times series data, consider that java and C# are not real-time languages.
They run on an underlying virtual machine which controls execution. The java and C# VMs will halt your program for short periods of time while it does things like garbage collecting memory. This is not like using standard 'C' where you have more control over these things. Something to consider.
If you will be dealing with time series, go with Linux and C.
I think there is a Java GC that runs as a background thread and there is work in progress on real time Java.
In any case, for logging tick data, you can still quite successfully use pure Java. If your receive buffers are big enough (a socket option) , there should be enough elasticity to get though a GC pause (maybe 100 - 200 mSecs) without flow controlling the TCP stream. Even if the TCP stream is flow controlled, you are not going to lose data. The only issue is whether a 100 or 200 mSec delay every now and then matters, and in most cases it doesn't - especially since the rest of the pipeline to the exchange is not "real time" in the true sense of the word. If an occasional pause is not tolerable use C.
Having just written that, I just ran JConsole on my Java charting app running on Linux (Java 1.5.0_11 and Ubuntu 6.10). It shows an average time for a "Copy" GC of just 14 mSecs. A "Copy" GC is the normal GC algorithm run in desktop JVM. The other GC algorithm "MarkSweepCompact" is much more expensive and averages at about 250 mSecs. It is my understanding and observation though, that the latter is only run if the heap size approaches -Xmx limit or if System.gc() is explicitly called. I reckon that 14 mSecs is not an issue for most applications.
Edit: These times are on a Sempron, with 2Gbyte memory and a heap size of around 220 Mbyte.