I'm developing a server application, and would like to harness the flexibility and (possible) speed increases C++ has to offer, by implementing the network code in C++. However, the base application has to be written in Java.
I'm aware of the possible reliability and debugging impact implementing JNI-code might have on the JVM. So I would like to know, would it be worth implementing such behavior in C++, or would the overhead caused simply not make it worth it?
Restriction: writing the application entirely in C++ is not an option.
Edit: I am a skilled (not very, but I can solve most tasks) C++ programmer, and I plan to use a library, do you have any suggestions?
Main criteria:
No, it will not be worth it for the reasons you mentioned (related to overhead) and without getting into any c++/java wars about performance, there wouldn't be enough of it (performance) to impact the throughput of client/server type of calls.
In most client/server type of applications, the movement of data across the network itself and the application level processing will constitute the vast majority of your time. Basically the amount of time spent in the servers network layer will be such a small percentage of the total time that performance benefits won't make enough of a difference.
Whether this balance holds true in your particular case, I cannot say since I don't know the nature of your application, but I would say it is the typical case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With