| 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: 8265
|
|
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: 19216
|
|
|
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
How To Ask Questions How To Answer Questions
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8265
|
|
|
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.).
|
 |
 |
|
|
subject: different between RMI and Socket
|
|
|