wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes different between RMI and Socket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "different between RMI and Socket" Watch "different between RMI and Socket" New topic
Author

different between RMI and Socket

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
whe we connecting to remote machine using ,what is the different between using RMI and Socket programming?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

RMI is built on sockets. Sockets are low-level and require one to either use an existing protocol or invent one. RMI wraps sockets with an object-oriented interface so one can concentrate on programming rather than socket details.
Socket tutorial
RMI Tutorial


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
if Socket is basic and RMI is higher level why we use Socket?
why can't we use only RMI ?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19682
    
  20

Because Sockets allow for so much more. HTTP is built on top of sockets. JavaMail is built on top of sockets. Just about every protocol that uses TCP uses sockets.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

Also RMI is a Java-only technology. If you want to communicate with systems written in other languages, you'll have to use a lower level protocol (HTTP, FTP, etc.).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: different between RMI and Socket