• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI vs TCP/IP

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More efficient - in terms of what?
development time?
bandwidth?
memory usage?
security?
interoperation?
Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic