• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sharpen Your Pencil, Chapter 18, RMI  RSS feed

 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Fellow Ranchers,

I've just got to chapter 18 of the book where RMI is described and I must admit that I'm puzzled. There's a "Sharpen Your Pencil" excerise that requires you to order the sequence of events in RMI application. I know that it's not allowed to ask for solutions here so I won't. I learnt, however, that it's okay to post your answers here and ask if they're correct.

Here goes:
1) The RMI registry is started.
2) The remote service (remote implementation) is instantiated.
3) The remote service is registered with the RMI registry.
4) The client does a lookup on the RMI registry.
5) The client gets the stub from the RMI registry.
6) The client invokes a method on the stub.
7) The stub sends the method call to the server.

I'm afraid I might have messed it all up. In such case, please bear with me. I'd also be grateful for some instructions on how I could learn more about RMI. I'd rather avoid sources like Wikipedia 'cos they're not a pleasant read.

Thank you in advance.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Not sure, but I think RMI is going out of fashion.
 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that so? That's good to know. I'd rather not focus on learning something that is obsolete... although I probably should anyway, just for the sake of broadening my mind. So, I'll wait for more feedback.

Thank you for a quick reply and warm welcome.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does no harm to learn about RMI, even if you know you won't use it again. If you get RMI to work, you can get other networking things to work.
 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for everyone's contribution. I haven't exactly received the answer I was hoping for, but your tips and advice might be actually far more helpful. I think I can thus mark this topic as resolved.
 
Charles D. Ward
Ranch Hand
Posts: 99
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
As a suggestion, always specify what "the book" is. Others can't read your mind to find out which book you're referring to.
 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right. It's as if I assumed Head First Java was the Classic Book of Java and everyone knew it.

Then again, if you don't know Sharpen Your Pencil excercises, then you obviously don't have the book and can't help me. So, not mentioning the title of the book serves as selection of the target audience of this topic. (I'd lie if I said this was my goal, but it sure is a nice excuse.)
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Matthews wrote:
Then again, if you don't know Sharpen Your Pencil excercises, then you obviously don't have the book and can't help me.


True, but keep in mind that other books in the "Head First" set also have Sharpen Your Pencil exercises, and some of them have an 18th chapter. Could lead to confusion. (Don't forget to mention the edition of any book you tell us about, too. Their contents often change, meaningfully, from one to the next.)

I don't have a position on whether or not RMI is obsolete, but I would predict you'll find it in existing code. Never a bad thing to be able to recognize what your predecessors were doing. And, those chapters are all pretty short. No harm in sharpening your pencil for each one.
 
Mike Matthews
Ranch Hand
Posts: 49
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, darn, you refuted my only argument.

I'll keep in mind to mention both the title and the edition of a book I refer to.

As for RMI, I'll look into it further when I get back to network-related topics. Right now I have so much more basic knowledge to gain that I decided to put RMI away for later. You're right that it's good to learn things that might seem obsolete nowadays. It may be very useful for the understanding of more recent, and perhaps more advanced, subjects.
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Matthews wrote:Ah, darn, you refuted my only argument.

I'm a lawyer. We get that way.

Right now I have so much more basic knowledge to gain that I decided to put RMI away for later.

I salute you!

It's tempting to want to master everything at once, especially when you are making good progress. But a truly solid grip on the basics is always worth more than cursory knowledge of exotic topics.
Keep at it, and remember we're always here to help.
 
Paul Clapham
Sheriff
Posts: 22844
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for RMI, if we're taking a vote then I would vote for "RMI is obsolete".

However... that won't stop people from writing new code using RMI, even though better alternatives exist. People (even programmers) seem to be very resistant to being shown new and better ways to do things. And as already pointed out, you may find yourself having to work with legacy code which uses RMI.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!