C# for low latency applications

There is no argument modern languages  such as Java and C# allow quicker , safer and easier to maintain applications yest there is still a very large amount of C/C++ applications being written.

A lot of use of C++ is simply for 3 reasons
  - A view of better performance
  -  Maintaining an existing application  
  - GC pauses
  - Environment requires it.

Lets look at these issues


In practice with realistic budgets a Java/ C# applications will tend to have better performance due to better and easier to use collections and optomizations.  The main performance difference relates to GC costs though the new Concurrent GC should remove most of these for multi core. The idea its not native is a fallacy cince you can use the Mono AOT compiler to generate x86 compiled code.
 

GC Pauses are quite valid and is a major obstacle for low latency applications.  There are a number of things you can do
- There is nothing stopping you using C# and managing your own memory for key performance critical areas. While unsafe is discouraged  C# with some unsafe code is better than C++.
- The  new Concurrent GC should reduces pauses by 80%
- Use load balancing SOA/EDA services , this solves  the issue for most cases such as Market data . Its worth noting there is a new event which can take the service out of a cluster while it does a collection.

Also Maintaining an existing application ( or staff skill set) is quite valid  though the point comes when you are maintaing a Large C#/Java code base and have a few C++ bit left.

Lastly some environments do require it such as Windows device drivers , though i do question why more embedded systems dont use managed languages like Tiny OS ( which uses Java) . After all even operating systems are being built in C# ( Singularity , Midori , Cosmos , MOSA)
Print | posted on Thursday, October 08, 2009 12:31 PM

Feedback

No comments posted yet.
Title  
Name
Email (never displayed)
Url
Comments   
Please add 5 and 8 and type the answer here: