| Author |
RMI vs TCP/IP
|
Phani Kumar
Greenhorn
Joined: Feb 15, 2002
Posts: 22
|
|
|
What are the benefits of using RMI over TCP/IP? I mean, if I want to merely pass some data to a server(it is not a web application) and get the response back, should I go for RMI with remote calls? Or it is more efficient to stick to TCP/IP sockets? Please advice.
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
RMI provides a standardized, "object"-ized way to communicate over TCP/IP. It is (mostly) only for Java, though. So - if you need 2 or more Java programs to communicate, it's probably better to choose RMI (or a technology built on RMI that is appropriate to the needs of your project - such as EJB, Jini, etc.) - if you're going to be communicating with non-Java programs you'd need something else - straight TCP/IP socket communication, CORBA, or Web Services. RMI makes it a lot easier to expand or change the network communication layer of your program - there may be slightly better efficiency using TCP/IP, since there are fewer objects (at least it sounds like the starting implementation would have fewer), but it's a lot easier to modify things when they need changed later.
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
More efficient - in terms of what? development time? bandwidth? memory usage? security? interoperation? Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: RMI vs TCP/IP
|
|
|