File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes essay exam answers to RMI vs. Serialize Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "essay exam answers to RMI vs. Serialize Object" Watch "essay exam answers to RMI vs. Serialize Object" New topic

essay exam answers to RMI vs. Serialize Object

lambertlee Li
Ranch Hand

Joined: Dec 15, 2005
Posts: 52
Hi there,

I have chose RMI to implement my assignment. But my requirement pose some restriction on RMI usage:
*You must not require the use of an HTTP server.
*You must not require the installation of a security manager.
*You must provide all classes pre-installed so that no dynamic class downloading occurs.

So when I give reasons why I chose RMI? I gave these pros:
(1) RMI handle sockets and communication for me. No protocol needs to be developed for communication between two communicating parties, I just use a predefined protocol for sending and receiving request responses.

(2) Clients don't need to have the class code to run, they can download from RMI server. So changes to server code does not necessarily mean you need to change the client.

(3) No thread management is required as this is being managed by RMI internally.

(4) Handles security for you through RMISecurityManager(I didn't use ).

(5) It is easy to implement.

Should I mention point (2),(4)? As I implement my solution based on the requirement, I didn't require installation of web sever(of course no class downloading), no require of security manager as no policy file presenting. If I mentioned point(2),(4), it seems funny as I never used them in my current assignemnt. What do you guys think?
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
no, you don't mention those.
Of course changes to the server still don't have to mean changes to the client, as you can package the stubs and ship them to the client some other way as a jar. If they change all the client needs to do is replace that jar.
And he should replace it when getting a new one, we ran into a weird problem at work yesterday that had us completely baffled for hours.
In the end I figured it out: some RMI stubs had changed causing 2 machines to no longer understand each other.
Normally both run the exact same software, but we'd decided to upgrade one before the other and the second only after the first was stable.
Of course that didn't work as they communicate through RMI and after the first was upgraded the stubs were out of synch (some method signatures had had to change).

I agree. Here's the link:
subject: essay exam answers to RMI vs. Serialize Object
It's not a secret anymore!