We hava a need for 2 processes, running in seperate Java Virtual Machines, to communcate with each other. These processes will be running on the same physical machine. What is the most efficient way to handle this - Sockets, RMI, Corba, or something else? Also, are there any restrictions on EJBs using any of the above technologies? Ie I know an EJB can't serve as a SocketServer, but it can open a socket to another process that is....
Thanks in advance!
Any idea of the overhead associated with RMI, especially when the processes are on the same machine?
RMI is definitely a lot efficient given that you tune your JVMs.
Thanks. RMI sounds like the way to go. You mention that you need to 'tune your JVMs.' What steps are involved with JVM tuning??
two places can be tuned:
two objects located within the same VM/diff. VM same machine.
Since u have JAVA based requirement, RMI is best deal.
All u have to do is
- create an RMI object
- register that with JNDI
- do JNDI lookup from client process
- use the object in client
Socket based solutions are complex to device compared to RMI based.
In case u need to communicate to non java process, let Corba handle the stuff...
In worst case u would go for Sockets .. if u like system programming this will be best ...