File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes What is the difference between RMI and Socket programming? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "What is the difference between RMI and Socket programming?" Watch "What is the difference between RMI and Socket programming?" New topic
Author

What is the difference between RMI and Socket programming?

Rajesh Varma
Greenhorn

Joined: Aug 07, 2006
Posts: 7
What are the main differences between RMI and Socket Programming?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Socket programming - you have to handle exactly which sockets are being used, you specify TCP or UDP, you handle all the formatting of messages travelling between client and server. However, if you have an existing program that talks over sockets that you want to interface to, it doesn't matter what language it's written in, as long as message formats match.

RMI - hides much of the network specific code, you don't have to worry about specific ports used (but you can if you want), RMI handles the formatting of messages between client and server. However, this option is really only for communication between Java programs. (You *could* interface Java RMI programs with programs written in other languages, but there are probably easier ways to go about it...)


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between RMI and Socket programming?
 
Similar Threads
is there any connection between secket and RMI
do i have to supply a port number when start server?
Socket vs RMI vs Servlets
different between RMI and Socket
Socket and serversocket difference?