File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes RMI and Socket programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Associate Certification (SCJA,OCAJ 5/6)
Bookmark "RMI and Socket programming" Watch "RMI and Socket programming" New topic
Author

RMI and Socket programming

Arundhati Roy
Greenhorn

Joined: May 24, 2007
Posts: 25
Hi,

Can anybody explain to me this question:

Which of the following statements describes the advantages of RMI over Socket Programmimg?

A. RMI offers better speed than socket programming.

B. RMI is simpler to implement over socket programming.

C. You can pass tramsmit objects across RMI, but not across sockets.

D. RMI offers interactive communication, but sockets do not.

E. Unlike in sockets,no protocol design is required in RMI.


Answer B and E

And also tell me the difference b/w RMI and Socket programming.


Thanks In Advance

Arundhati
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

This might be more technical than what's needed for the SCJA exam, but here's a good reference to skim for details (and you might want to skip to the end summary first): Programming Sockets and RMI: A Java Tutorial.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Arundhati Roy
Greenhorn

Joined: May 24, 2007
Posts: 25
Thanks for the study material...
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
RMI is simpler to implement over socket programming.]RMI is simpler to implement over socket programming.
Because, RMI uses socket behind the scene.

Unlike in sockets,no protocol design is required in RMI.
RMI is higher level than socket. Additionaly RMI is slower because of that.


Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
Tom KIK
Greenhorn

Joined: Feb 10, 2008
Posts: 4
what is the reason why socket is not interactive?
I think it can have no reply, ok?
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
what is the reason why socket is not interactive?
I think it can have no reply, ok?


I think so, you have to create your own protocol to make socket interactive.


Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI and Socket programming