ramchand
asked on
Java RMI
What is the advantage/disadvantage of using Java RMI for communication b/w multiple server/clients over socket communication.
Also, how does Java Beans come into play for communication.
Also, how does Java Beans come into play for communication.
We have legacy systems that uses TCP/IP. Our java clients could run TCP/IP but
we chose RMI due to the fact that the legacy systems are behind a firewall and
our clients can be anywhere. Therefore I have put together a second tier
server that talks to the clients in RMI and to our legacy servers in TCP. I am
still relatively new to RMI, but from what I understand TCP/IP communications
from our clients would not get through the firewall without serious security
concerns, whereas with RMI this would not be a problem. Now how do I know
that? I have taken that as truth when one of our network guys said it. Since I
have had to come up to speed fast on Java and RMI for other reasons, I haven't
had enough time to fully investigate this matter. If what the network guy says
is true, I would think if you had a firewall in your architecture, this would
be a compelling reason to use RMI over TCP.
we chose RMI due to the fact that the legacy systems are behind a firewall and
our clients can be anywhere. Therefore I have put together a second tier
server that talks to the clients in RMI and to our legacy servers in TCP. I am
still relatively new to RMI, but from what I understand TCP/IP communications
from our clients would not get through the firewall without serious security
concerns, whereas with RMI this would not be a problem. Now how do I know
that? I have taken that as truth when one of our network guys said it. Since I
have had to come up to speed fast on Java and RMI for other reasons, I haven't
had enough time to fully investigate this matter. If what the network guy says
is true, I would think if you had a firewall in your architecture, this would
be a compelling reason to use RMI over TCP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Java beans are for reusabl code componenets.
Minaly they will play the ROLE in GUI intesive projects.
http://java.sun.com/beans/ is a good site to know about beans
ASKER
Hi ravindra76 and thockit, Thanks for your response. I would like to give equal points to both of you.
ramchand
ramchand
ASKER
Would like to give half points to thockit too.
As for RMI vs sockets, RMI is a specific protocol that allows you to invoke functions on remote objects just like you would invoke them in local object space. The stub and skeleton objects are responsiible for doing the transfer of objects across the network etc. When you do socket communication, communication is not always Object based unless you develop your own protocol, but then why not use some one else's already done work. Well one reason for developing your own object method invocation protocol might be if you think that you can improve on RMI !!
But then you have CORBA. So although RMI may be a bit slow when the VM is first loaded in the server, it works fine after that, so go ahead by all means and use RMI.
see ya
thockit.