I have written trading systems in visual cpp for over ten years, recently I decided to migrate to Java. The coding is simpler, and more maintainable. Possibly I can finish the same trading system in less than 50% lines of code. Cpp is painful when you have to read and reuse other people’s library.I first wrote the system in visual cpp 6., it took me 2 weeks recently to recompile them in visual 2019, while my complex java project written in 2000 is still runnable without any modification. i first chose cpp for my trading system in 2006 because I thought cpp was faster because it could be compiled to native code. Now Java can also compile into native code.
Java is great with both. Only once in my programming career have I had a Java app, developed in Windows, not run in Linux. Reversed two lines of UI code and it worked. So yes, it is very much "write once, run everywhere". My problem is not Linux but the development tools. The ones I use lag behind their Windows versions. Also, my favorite GIT client, Fork, doesn't work with Linux. Because of this, I don't get much experience with Linux. I don't want to have to become an expert on OS and tools, I just want them to work.
Ok, that's fine. For a moment I thought that you were replying to the actual topic of the thread. So you can't really tell why Java on Linux would have any benefit over any other OS or language. You are just familiar with Windows.
You haven't specified what integration and performance etc. objectives you have for your particular situation. There's no good or bad platform without that. If you need to extract every ounce of performance and be readily integrable then Linux/C++ will be your best bet. That being said nothing beats Java's eco-system (probably Python might be now ahead in this regard). With JIT, it's performance is much improved to the point that unless an edge of micro to nano seconds is needed, it's just not worth the trouble writing and maintaining a complex system in C++. However if your strategy is not sensitive to microsecond level timing then Python is as good. Availability of broker/platform APIs is also an issue. C++ may be more prevalent than Java APIs and other languages might be still behind so always check where your end system will land. Same goes for Windows vs.Linux. Linux sips resources and can be highly efficient if tuned and provides the best performance. However if Microsoft development platform is used then there is no other option. I'm also noticing that Windows is always available as a choice for collocated hosting providers but Linux may not be available with everyone. Again if there are no other constraints then Windows is as good as any other platform. For trading - there may be lot more software options on Windows than Linux. Hope this helps.
You don't mention any interaction requirements to your data provider and/or broker. Their API's might only be available in certain languages. You would need to accommodate that. In my case: I have an account with IB. When I started dabbling with automated trading they provided APIs for Excel, C and Java. As I was only familiar with Java did I select that language. Meanwhile they have added Python, which has become a popular choice these days.
@bagholderforever @HobbyTrading Thanks guys, the more I read on this, the more my inclination is toward Java/Kotlin. Regarding API compatibility, since I dont want to learn complexities of C++, and Java is the 2nd most used lang for brokers APIs, I guess not much choice here. If my broker has only C++ API, how easy or hard it would be to write some sort of bridge from Java, could you guys comment on this?
Re Java vs Kotlin - when I did automatic code conversion of my original Java version the lines of code were cut by ~30%. I'd say if you actually write in Kotlin and make an extensive use of language features it's nearly 50% less code than Java on average. I had a great pleasure swapping many ~5 liners of Java code with 1-2 of Kotlin. Kinda addictive. That's a hard one. I wouldn't bother unless they offer something very easy to convert. Like XML / Json as underlying format. This is the kinda stuff that might make you wanna switch brokers. Writing yet another broker bridge is pretty ungrateful job which will distract you from what's important for trading and making money.
That depends a lot on your abilities as a developer. Interfacing a system to your broker for order management using their API is not a big thing. I know many developers who can do that in a couple of days without too many trouble (been there done that!).