Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

different between RMI and Socket

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whe we connecting to remote machine using ,what is the different between using RMI and Socket programming?
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if Socket is basic and RMI is higher level why we use Socket?
why can't we use only RMI ?
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joe Ess
Bartender
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic