SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
victor123
Topic Author
Posts: 71
Joined: August 26th, 2006, 8:42 pm

Low Latency - C++ or Java - Current Trends

February 26th, 2012, 7:08 pm

Hi, I have an interest in the current trends in quant & trading systems developemnt. It seems low latency is where most of the demand is (not sure how long this would last though). I made some interesting observations. - Not many of these are advertised in Wilmott Jobs Board. The few that are seems to be requiring c++.- However, when I looked for similar jobs in Jobserve.co.uk, Java seems to be clearly dominating the market (the difference is stark in the Contracting market)Just interested to know what's the truth ?- Is Java taking over the low latency field from C++ quite fast ? - Has technology advances made the difference in performance mimimal, bear in mind latency has a lot to do with OS, Middleware & other things than just the language ?- Are IT managers worried about investing in C++ and then struggling to finding resources to support them in the near future ?- Is it 2 different stories in 2 sides of the Atlantic ?- Or are the jobserve stats lying and in reality C++ is and will remain the clear market leader in the low latency field? Would be interested to know your views...
Last edited by victor123 on February 27th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
JT77
Posts: 38
Joined: November 27th, 2011, 7:07 pm

Low Latency - C++ or Java - Current Trends

February 28th, 2012, 10:29 pm

Great questions- I also would love to know this!
 
User avatar
capafan2
Posts: 924
Joined: June 20th, 2009, 11:26 am

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 12:37 am

This a very C++ centric forum. A question like this leads to a flame war. I do not know about high frequency trading but Java and .NEt are platforms of choice for most IT work. Also their performance is not bad compared to C++ unless you need to squeeze out the last drop where you need to be close to the metal.
 
User avatar
DominicConnor
Posts: 11684
Joined: July 14th, 2002, 3:00 am

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 12:50 pm

I'll try not to start a flame war...Job ads reflect the difference between the staff a firm has and the ones it needs.In this context it means there are far more people doing C# and Java than C++, but that it is harder to get C++ skills.Choice of language is partly a function of the cost to write a line of code divded by the time to execute it. Most code in most firms is not very performance critical and even when it is the % of the system that contributes to the response time is actually quite small. Short version of that : choose the language that gets the system working soon rather than fast. C++ is faster than most other languages for most things but at the price that it is harder to program. Low latency work is often low level, changing the operating system itself and that is almost wholly the domain of C and C++, very little operating system code is written in Java or C#,Unix and Windows are C/C++ based systems, if you want to go deep and hard the only other option is machine code.It's easier to get FPGAs working with C++ than Java or C# butconversely if the heavy lifting is being done in GPU or FPGA, it may be the case that it simply does not matter what the other code is in.Also, it is the case that Java & C# skills have a lower market value, so it is rational to avoid paying C++ rates for Java work.Jobserve is sort of truthful, the jobs are not always real but the agencies would not be paying for adverts if they didn't think they would get people they could sell.But Jobserve and any other board is the spot market, it is a decent reflection of your value today, it says nothing about next year.My view is that for HFT C++ will remain the top dog for a long time, but HFT is not the same as algorithmic trading, a lot of which requires that systems are fast enough to do the trades whilst the oportunity exists but aren't trying to win many races.Those can be written in whatever mix of Java, C#, VBA, Matlab or Mathematica works for you, maybe with a bit of C++ for the most critical part.The "most critical part" varies but my view on life is that being the guy who writes this bit of code is a better position than the one who writes more code that is less critical.That doesn't always apply of course, some of the code I've got most kudos for was little more than a front end to someone else's work.
 
User avatar
MattF
Posts: 925
Joined: March 14th, 2003, 7:15 pm

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 1:37 pm

QuoteOriginally posted by: capafan2This a very C++ centric forum. A question like this leads to a flame war. I do not know about high frequency trading but Java and .NEt are platforms of choice for most IT work. Also their performance is not bad compared to C++ unless you need to squeeze out the last drop where you need to be close to the metal.capa you've made similar posts before and I've refrained from 'flaming' you, partly out of respect for José Raúl but you really are mistaken here. As Samuel Johnson might have said, "Java is the language for boys; C# for men; but he who aspires to be a hero must code in C++."
Last edited by MattF on February 28th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 62941
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 2:25 pm

QuoteOriginally posted by: MattFQuoteOriginally posted by: capafan2This a very C++ centric forum. A question like this leads to a flame war. I do not know about high frequency trading but Java and .NEt are platforms of choice for most IT work. Also their performance is not bad compared to C++ unless you need to squeeze out the last drop where you need to be close to the metal.capa you've made similar posts before and I've refrained from 'flaming' you, partly out of respect for José Raúl but you really are mistaken here. As Samuel Johnson might have said, "Java is the language for boys; C# for men; but he who aspires to be a hero must code in C++."capafan2 seems to have made a number of factual remarks.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
capafan2
Posts: 924
Joined: June 20th, 2009, 11:26 am

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 2:35 pm

Quoteout of respect for José Raúl You sir have my deepest respect for knowing who is José Raúl. So do you play like him or are you more in the mould of his arch enemy called Alexander who died from choking from a bone in his throat.
 
User avatar
MattF
Posts: 925
Joined: March 14th, 2003, 7:15 pm

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 2:46 pm

Well there's some evidence that Alekhine was murdered but we're getting off topic. My own play is closer to Capa's but closer in the sense that standing on a box makes you closer to the top of Everest.
 
User avatar
capafan2
Posts: 924
Joined: June 20th, 2009, 11:26 am

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 2:59 pm

Quote but you really are mistaken here. As Samuel Johnson might have said, "Java is the language for boys; C# for men; but he who aspires to be a hero must code in C++."Now that I have paid homage to you, can you answer the OP's question. What you said is more like a Hollywood riposte. It is impressive but not very useful.
 
User avatar
MattF
Posts: 925
Joined: March 14th, 2003, 7:15 pm

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 5:30 pm

I just searched for Latency on jobserve in Finance with a location London and it was split evenly between C++/C# and Java. OK just one day's sample but I don't see Java clearly dominating.
 
User avatar
capafan2
Posts: 924
Joined: June 20th, 2009, 11:26 am

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 5:35 pm

QuoteOriginally posted by: MattFI just searched for Latency on jobserve in Finance with a location London and it was split evenly between C++/C# and Java. OK just one day's sample but I don't see Java clearly dominating.It is interesting you count C# and C++ in the same bucket and Java in a separate bucket and declare "I don't see Java dominating". Kudos - You should be a sales guy.Don't mind Sir - but this thread is going too follow a familiar pattern. DC made valid factual points. But you Sir, have an agenda.
 
User avatar
quantmeh
Posts: 5974
Joined: April 6th, 2007, 1:39 pm

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 6:10 pm

C# and Java are in the same league, but Java is obviously better for server side apps due to better platform availability, i.e. Lunix/BSD implementations. C++/C is a stupid choice these days. you can flame as long as you want but it's true. C++ is a terrible language and all people should stop coding in it. C is fine for drivers, but not for applications.
 
User avatar
Cuchulainn
Posts: 62941
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Low Latency - C++ or Java - Current Trends

February 29th, 2012, 7:23 pm

QuoteOriginally posted by: quantmehC# and Java are in the same league, but Java is obviously better for server side apps due to better platform availability, i.e. Lunix/BSD implementations. C++/C is a stupid choice these days. you can flame as long as you want but it's true. C++ is a terrible language and all people should stop coding in it. C is fine for drivers, but not for applications.This is a bit too populist. Let us strip these three languages of their libraries and we can concentrate on the essential language functionality then C++ wins hands-down(disclaimer: I use all 3 languages). C++ is infinitely extendible. Take an example and we can work through through it. A good one is *generics* and Java is just dreadful. Another one is the support of FP and procedural programming.But you should look at the problem first, and then choose the language. At the end of the day, they are only languages and a small part of the software lifecycle.
Last edited by Cuchulainn on February 28th, 2012, 11:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
capafan2
Posts: 924
Joined: June 20th, 2009, 11:26 am

Low Latency - C++ or Java - Current Trends

March 1st, 2012, 1:34 am

Cuch,I can understand not using Java if you need FP capabilities. Scala does have a JVM based implementation but I have not used it and unless Oracle supports it, it is probably is not a great idea to use it.But why not use F# and .NET environment in that case. F# is a first class .NET language. From your posts I understand that Function Overloading is a big deal in your line of business. You obviously prefer code likeMatrix a=...Matrix b=...Matrix c=a*b (instead of c=a.Multiply(b))I use those computations too infrequently to care.Everything I need I get from Java and Python. If I need to handle massive amounts of data (terabyte to petabyte scale) I just use Amazon AWS and Hadoop on it. But my applications are different. I do not care so much about absolute accuracy and can compromise it for performance. When Facebook says it runs real time queries on Big Data it does not mean that the queries return the most consistent results as it may reflect data as of 10 seconds back and it is okay for queries like - who many people tagged a posting with #C++ in the last 1 hour, or Amazon returns how many items in stock for a C++ book.But Realtime HFt is another story. You do need accuracy and performance. These applications are almost surely not distributed as you cannot have all three (CAP Theorem). Plus "real" real time apps needs a real time operating system. And if you need that level of speed and predictability Java or C# is obviously a bad choice. C or C++ takes the cake there. A lot of Big Data work is around NoSQL databases based on the google's "Big Table" paper. In the Java world we have HBase and Cassandra which are mix of Google Big Table and Amazon Dynamo. They work great and the biggest users are Facebook and Twitter. In the C++ world there is Hypertable which according to some benchmarks beats Hbase and Cassandra. But that is splitting hairs. The type of use-cases these apps are used for (called "eventually consistent" apps) do not care about such differences. The choice boils down to what are the other systems which interface with these products written in. In the C++ environment you would use Hypertable and Java world you would either HBase or Cassandra.A lot of these C++ vs Java discussions strip away the context in the first few postings. DC said what he said in context of HFT. Out of context this is a pointless religious argument. There are plenty of Algorithmic trading shops using Java , C# or Python. If you are not in "Flash Trading" or very HFT business it probably does not matter whether you steal that nano-second from your real-time clock. And if you are a predominantly C++ shop why learn another language. But if you are setting up shop then why focus on "being a man". A lot more parameters go into this decision making. Use-case is one and the other most important one is the skill set of your team and yet another one is what are your other systems written in.
Last edited by capafan2 on February 29th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
traderjoe1976
Posts: 1544
Joined: May 19th, 2006, 9:50 am

Low Latency - C++ or Java - Current Trends

March 1st, 2012, 9:41 pm

I have seen ONE of these implementations in Java.Everything must be in core Java.No frameworks like Spring, Hibernate, Struts are used.They implement Lists, Maps, Sets collection objects using Arrays.Heavy use multi-threading.Heavy use of web services, SOAP, WSDL, UDDI.It looks quite different from a normal Java application, but is ideal for someone who is very strong in Core Java.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On