aspose file tools*
The moose likes Distributed Java and the fly likes Is still RMI used ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Is still RMI used ?" Watch "Is still RMI used ?" New topic
Author

Is still RMI used ?

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 468
    
    1

Just a question, is RMI still used in business applications ? I mean, with a lot of remoting framework, "pure java" RMI seems a bit out of date...
What do you think ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
Indeed, these days RESTful web services are much more popular. In addition to being easier to implement, they're also language-agnostic (RMI needs Java on both ends).


Ping & DNS - my free Android networking tools app
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

We're still using RMI in one of our business applications.

But yes, it was written in 2001 and the framework is still functional. You don't need to know anything about RMI to add a new command to the application (at least nothing technical).

As you might imagine, we're still using it because it ain't broken and it would require time and resources to rewrite it using some other technology.
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 468
    
    1

Thanks you both for your answers
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

RMI still has its uses. It's less overhead than a web-based protocol for situations where performance is important.

CORBA, on the other hand, I think is now well and truly dead.


Customer surveys are for companies who didn't pay proper attention to begin with.
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 468
    
    1

RMI still has its uses. It's less overhead than a web-based protocol for situations where performance is important.


Quite interesting, did you make any test ? Times ago I was playing with RMI, and while in a LAN enviroment performance were good, with respect to http, I found it terribly performing in a WAN scenario.

By the way, since we can easily considerate EJB remoting the natural evolution of RMI towards a more stable (imo) implementation, I think that the need of application server-specific jars on client side is really annoying, since usually when you apply fixes to your appserver, you have to distribute update client jars as well, not to mention of application client enviroment distribution.

It would be nice if Java provided a mean to transparently lookup remote ejbs, no matter what appserver you 're using. A similar thing to portable JNDI names introduced with last Java EE version.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

Claude Moore wrote:
RMI still has its uses. It's less overhead than a web-based protocol for situations where performance is important.


Quite interesting, did you make any test ? Times ago I was playing with RMI, and while in a LAN enviroment performance were good, with respect to http, I found it terribly performing in a WAN scenario


I don't have any applicable benchmarks, but RMI is a binary interface with minimal protocol overhead, whereas anything web-based has to deal with working with character-format data plus headers and other trappings. SOAP, of course, adds even more overhead in the form of all that XML. So YMMV, but it's reasonable on average to expect RMI sending and receiving smaller payloads with less data conversion resulting in more efficiency.

Of course the downside to that is that you have to have both client and server not only be Java, but compatible versions of Java, and you had to deal with ports and protocols that often don't fare well over the open Internet. CORBA got rid of the Java limitations, but it was especially unsuited to the Internet, as the original spec was neither secure nor tied to a single firewall-approvable port.

Claude Moore wrote:

By the way, since we can easily considerate EJB remoting the natural evolution of RMI towards a more stable (imo) implementation, I think that the need of application server-specific jars on client side is really annoying, since usually when you apply fixes to your appserver, you have to distribute update client jars as well, not to mention of application client enviroment distribution.

It would be nice if Java provided a mean to transparently lookup remote ejbs, no matter what appserver you 're using. A similar thing to portable JNDI names introduced with last Java EE version.


You've got me confused on that one. I'm virtually certain that JNDI is the way to lookup remote EJBs. Unlike RMI, which requires the rmiregistry.

EJB did originally use RMI for remote EJBs (which were originally the only type you could have). But RMI-IIOP was developed to make the EJB protocol more Internet-friendly.
Henry Mannings
Greenhorn

Joined: Jul 20, 2012
Posts: 4
Hello. I am a student and I am a new member.
Is RMI used in companies today? Is RMI an old product and .NET is RMI's replacement?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16142
    
  21

Welcome to the Ranch, Henry!

No, although RMI has been around awhile, it's not an "old product", it's a Java-specific protocol, and I think in this thread we've established that it's alive and well.

.Net is something altogether different - it's Microsoft's answer to Java after Sun kept Microsoft from taking over Java.

About the closest approximation to RMI in the Windows world is COM/DCOM. Although, unlike RMI, I don't think that a DCOM client or server can be a non-Windows computer. RMI doesn't care what OS(es) the client and server are running, just as long as they run Java.
Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 468
    
    1

Tim wrote:
I don't have any applicable benchmarks, but RMI is a binary interface with minimal protocol overhead, whereas anything web-based has to deal with working with character-format data plus headers and other trappings. SOAP, of course, adds even more overhead in the form of all that XML. So YMMV, but it's reasonable on average to expect RMI sending and receiving smaller payloads with less data conversion resulting in more efficiency.


Yes, that's true, by the way it's even true that you can build client-server protocols relying upon HTTP as transport layer, in which information payload is encoded in some binary form (I'm just thinking about JAX-WS with MTOM enabled). Moreover, I don't know if it's possible to use any form of data compression with RMI.

You've got me confused on that one. I'm virtually certain that JNDI is the way to lookup remote EJBs. Unlike RMI, which requires the rmiregistry.


Well, I was thinking about the fact that you need to distribute appserver client jars with your java clients if you want to lookup (via JNDI of course) a remote EJB, and that those jars are really vendor-specific and differ
greatly in number and size. I never delved into such details, but I think that depends on the fact that ORB or InitialContext or JNDI actual implementations vary between different vendors and each of them have its own approach. I would be nice if JSE provided a "generic way" to access a remote EJB, no matter of Appserver vendor.

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

I agree that Corba seems completely dead. RMI has one foot in the grave. RMI and Corba attempt to solve a problem that people thought was important in the early 1990s: how do you execute methods on objects remotely. While they are "still used" in some specific applications (mostly legacy) they are not considered modern.

Far too many text books and college courses still teach RMI. They should stop. It is no longer a generally used technology, students would be far better off if RMI were no longer mentioned.

For at least 99% of the real world applications, a message passing protocol such as REST is far superior. If your application really needs RMI, you'll know it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is still RMI used ?