This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI Vs Sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI Vs Sockets" Watch "RMI Vs Sockets" New topic

RMI Vs Sockets

Vrinda Werdel
Ranch Hand

Joined: Jan 03, 2004
Posts: 75
Hello Pals,
I was just reading Kathy's book. I read something to the effect that while implementing something, do not reinvent the wheel. That would ensure losing some marks.
w.r.t to implementing the networking part of the assignment, I am certainly for a socket implementation as I have worked with them before. Would I lose marks for making that choice as opposed to RMI?
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Hi Vrinda,
As the instructions said that:

You have a choice regarding the network connection protocol. You must use either serialized objects over a simple socket connection, or RMI. Both options are equally acceptable.

So, I dont think using Sockets instead of RMI results in mark deduction.
However, you must well-written the decision option in your documentation that why you choose Sockets over RMI, and the reason for familiar one over another one may not be a good reason.
You can find out those arguments from Max's book and Kathy's book.
[ January 11, 2004: Message edited by: Nicholas Cheung ]

SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi Nicholas,
Originally posted by Nicholas Cheung:
However, you must well-written the decision option in your documentation that why you choose Sockets over RMI, and the reason for familiar one over another one may not be a good reason.

Actually that can be a very good reason. If you look at what RMI can offer you, and compare that with the time required to learn it, you might very well choose to stay with what you know - your project will possibly be completed earlier, and you will have greater confidence in your implementation. Yes, once you know RMI, you will undoubtably build a solution faster than the equivalent Sockets solution, but there is quite a lot to learn to get a good RMI solution working.
A sockets solution will also be faster, and use less network traffic than an RMI solution, which can be very good reasons for using it.
In their book, Kathy and Bert make the following comment about the choice between Sockets and RMI: "it depends on your goal and need (or in some cases, all things being equal, just which you prefer)".
Regards, Andrew

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
james airey
Ranch Hand

Joined: Dec 15, 2003
Posts: 41
In the real world, using a technique you know over one you don't is definitely a valid approach, and I would happily use it for justification. I might phrase it slightly more professionally than that though. If someone took a team of Java programmers and told them to write their next application using PERL, you wouldn't expect a top quality piece of software to be delivered on time. Either the dealine or the quality would suffer.
For the purpose of the exam, I guess it depends on what you want out of it. Would you rather
1). get the assignment done 2 weeks sooner using X which you already know
2). have to work harder, but end up knowing Y, which you currently don't
That is less valid as justification for the exam, but I think could be a significant motivation for you.
I agree. Here's the link:
subject: RMI Vs Sockets
It's not a secret anymore!