Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

different between RMI and Socket  RSS feed

 
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: 9406
12
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
Posts: 20893
81
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: 9406
12
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.).
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!