• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Real world example of RMI

 
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I am just learning about RMI by reading Sun's tutorial (great article!), and I am finding it very fascinating! What I would like to know is, can someone provide a real world example of how this could be used? Why would this be used as opposed to some other distributed computing method, such as servlet, applet, EJB, etc.? Even though I understand how it works, I guess I am not grasping the concept of how it would be used in the real world. What are the pros and cons? If someone could provide a real world scenario, (the simpler the better) I would greatly appreciate it.
Many thanks,
Barry
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many real life examples of RMI.For example in a classroom equipped with PC.When the teacher moves his mouse,the mouse cursor is moved on every computer.This is a very simple rral life example.You can find more @ DevShed
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swordfish
Your name does not conform to JavaRanch's naming policy. Please read the policy and change your name appropriately.
Your comment is, how do I put this nicely, grossly misinformed. RMI makes a lot of things possible, but remote window control is not one of them. And your link to DevShed points to nothing on point with your illustration.
I'm trying to decide if I'm offended or not by your cavalier (and totally wrong) answer. Barry seems curious and enthusiastic; he doesn't deserve to be bs'd like this.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlets, for example, require the use of a servlet engine. This may not be readily available especially if you are invoking a class from one server on your network to another server on your network. Imagine a case where I have a bunch of classes that provide generic services to other classes in my company. I want them to be available to nayone in the company who needs them. I can use RMI so you can invoke them as if they were a class sitting on your server. RMI is free. No servlet engine. No web server. No EJB server. It's very lightweight and simple.
 
Michael Ernest
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Barry -
RMI's uses are indeed all over the place. It's now a new technology of any sort -- what it does is bring to Java the means to write programs that run in a remote or distributed environment. By remote we mean a client program that asks a server program (on another machine) to perform some kind of work. By distributed we mean a program whose entire process relies on the work of two or more processes working together.
Naturally, there's a little overlap in these terms, but RMI is simply a mean of doing this in Java code. Other models for writing this Kind of code exist: for example, Sun's RPC (Remote Procedure Call) protocol follows a very similar architecture and is a widely accepted standard today. CORBA (Common Object Request Broker Architecture) is an alternative to RMI that is designed to accommodate communication between programs on different platforms and even written in different languages.
Applet code, even though isn't written using RMI, is a good illustration of what's possible using RMI. Virtually any time you need a program to connect to a remote program and get data -- and both programs run in Java -- you might think about using RMI to do it.
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the great information guys. You have enlightened me in RMI!
Barry
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Michael - As I understand it, CORBA is not an alternative to RMI, but an underlying protocol that may or may not be used as a communication layer beneath RMI.
Am I wrong? (quite possible) and how does this fit with the JRMP and IIOP protocols? (IIOP has something to do with CORBA I think...). It is all quite confusing, but I am trying to understand...

Originally posted by Michael Ernest:
[QB]Barry -
CORBA (Common Object Request Broker Architecture) is an alternative to RMI that is designed to accommodate communication between programs on different platforms and even written in different languages.

 
Michael Ernest
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The underlying protocol for CORBA is IIOP (Internet Inter-Orb Protocol.
I am wondering if 'alternative' is too strong a word, but at one point it was a 'choice' to make between RMI and CORBA, the underlying idea being you're only going to use one or the other. I know there's been a strong effort to make these technologies compatible, even complementary, to each other but I haven't followed it at all.
I don't hate CORBA or anything, I just drew an arbitrary line at CORBA and said, "ok, until I need to know this, it's whatever it is..."
 
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
interesting overview material to this RMI-Corba topic was for me Apendixes A, B of Ed Romans "Mastering EJBs". You can get as read-only pdf.
http://www.theserverside.com/books/masteringEJB/index.jsp
(you need to register without fee first)
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic