views:

791

answers:

9
+7  Q: 

Java RMI Resources

Hi everyone I am currently undertaking a project that involves extensive use of Java RMI and I was wondering if anyone is aware of any good resources about it.

The problem I am having with the material I am finding currently is that its usually quite out of date (like Java 1.3) and / or half complete. I would even be happy to buy a book on it but looking on Amazon all the books are like 7 years old.

So if anyone is aware of any good resources, books or good example implementations I would be very interested to hear about them. Thanks in advance for your help.

+2  A: 

RMI hasn't changed that much. I think 1.3 era books will be just fine.

Yoni Roit
I tend to agree.
Adeel Ansari
+1  A: 

The O'Reilly RMI book is pretty good. Go for it.

duffymo
+4  A: 

The Java.RMI has changed very little over the years, so most of the old documentation can still be referenced. Note that one significant change is the need to compile the RMI stubs if you are using a version of Java 5.0. Most people have moved away from RMI and have embraced JINI for distributed systems. You can find more information at http://www.jini.org.

If you are still thinking of moving forward with RMI then I would suggest reading the Sun documentation located on their site http://java.sun.com/docs/books/tutorial/rmi/index.html or posting your questions on their forums http://forums.sun.com/forum.jspa?forumID=58.

As for books… Java RMI by William Grosso or Java Network Programming by Elliotte Harold.

Aaron
Jini and RMI are compltely different layers. Jini usually uses RMI as its communications protocol, and AFAIK it's anything but widely adopted.
Michael Borgwardt
JINI doesn't specify _anything_ about a communications protocol. that is it's best feature. Using JINI over RMI would work, but is a lot less interesting than over run-time networks.
Tim Williscroft
+2  A: 

Have you tried Sun't RMI tutorial? The Sun tutorials are all very good, and they're usually the first place I start for learning anything about Java.

A book that we used in school that has good example code is J2EE Developer's Handbook. Bear in mind that this is a huge reference book of about 1500 pages with only one chapter (about 50 pages) on RMI.

Bill the Lizard
+2  A: 

Thank you all for your answers I think what people said about RMI not having changed much is correct, however the tutorials could still be a bit better they gloss over some important points.

In the end the best book by far that I found, that covers some of the really good bits of RMI such as Activation was Java Network Programming and Distributed Computing.

I did look at the other O'reilly Java RMI book and in my opnion its not very good at all, for anything bigger than the smallest of RMI projects.

Mark Davidson
+2  A: 

If you are going to make heavy use of RMI, I would suggest having a look at Spring Remoting. It helps a lot in abstracting the remoting protocol, help you switch remoting implementation later if you need to (for example switch to Hessian, or SOAP).

One thing to keep in mind if you use RMI or any other remote object protocol, is that you can generate a lot of traffic by calling methods on remote objects. It might not be obvious in your code that those objects are remote. It might generate performances problems.

If you can, I would advise you to have a architecture more or less service oriented, where you call remote services to get data object, but not to have too much behaviour on those objects ...

Guillaume
+6  A: 

RMI Hello World looks nice for a start. Of course it's still a simple example, so maybe tips on RMI performance/scalability will be useful since you're already familiar with RMI.

macbirdie
Cheers for this one tips on RMI performance/scalability looks very promising.
Mark Davidson
A: 

In addition to the ones already mentioned, the article Understanding Java RMI Internals was quite decent IMHO, going a little bit through the internals.

Touko
+1  A: 

Absolutely invaluable article on multi homed RMI (hosts with multiple IPs) Explains RMI is a very easy to understand way and goes into the issues of hosting registries on machines with more than a single IP address and how private IPs can be dealt with too. Saved my bacon.

Paul Whelan