Possible Duplicate:
fastest (low latency) method for Inter Process Communication between Java and C/C++
I want to ask if anyone could suggest me the fastest way to transfer high amounts of data between two processes on the same machine one built in Java and other in C++
I have to build a business application having a client-server architecture over internet which has a structure like this->
Java Client App —( Java Sockets )—– > Java Servlet—- > C++ Business Logic.
It needs to be highly portable as we can’t say beforehand the target environment of the client, so java will be the best choice for it according to me. It will be interacting with the java servelet through java sockets. The servelet should be interacting with the business logic built in C++.
I will be using java just for the communication part and all the rest of the business logic will be there in C++.
I am an amateur programmer in Java and have a good level of experience in C++.
Any kind of suggestion would be welcomed..
I would use a Socket over loopback on the assumption that the volume of data doesn’t need be more than you get from Client App or return to it and latency doesn’t need to be many times smaller.
Using a Socket is the most portable and if you have to run these on different machines you can.
With Java you can get a few Gb/sec with latencies below 10 micro-seconds over a Socket.