Ivan Jozsef Balazs wrote:RMI still might be used under the hoods between the parts of an application server.
Pat Farrell wrote:
"might" being the operative word here, with "still" being second most important. For legacy applications, I'll believe anything might be there. But RMI has no place in modern software.
surlac surlacovich wrote: I thought that RMI less redundant (for example if we compare RMI call and web-service call) than sending a message to another JVM.
Rather than using distributed objects and remote invocation of methods, modern designs simply pass messages of data (often using REST) and
then process the data, and return response data.
Stefano Rossi wrote:If I don't want or can't use a web application server / container in my client-server application, what viable alternative to RMI(or CORBA) do I have to exchange message as you suggest? Apache River? Apache Thrift? some JMS implementation?
What do you mean, precisely, by client-server application? For the past decade, the general definition of client server is a browser application showing HTML with CSS and Javascript, talking HTTP protocols to a webserver. For these applications you can NOT use RMI or Corba because you can't get anything besides HTTP through corporate firewalls. If you mean something else, please elaborate.
2) what do people use instead of RMI?
Stefano Rossi wrote:If I dont wan't that server to be an http server, so I can't use web services, I think that RMI is still a good solution.
2) what do people use instead of RMI?
Jayesh A Lalwani wrote:For most applications, you don't need these services, which is why web service frameworks (SOAP, REST) do not provide that functionality.
Pat Farrell wrote:
The idea of passing objects and doing remote method invocation has some initial appeal. It could be cool, but the practical implications of it greatly outweigh the cool factor. I have not seen any applications that need those services. I have seen some that thought they needed them. I'd be interested in a real world use case where remote method invocation is actually justified.
Ulf Dittmer wrote:SOAP is simple. What's not simple is all the frameworks and standards that have grown all around it.
Pat Farrell wrote:Now, we are way off topic.
Pat Farrell wrote:
What do you mean by less redundant and why is that good?
surlac surlacovich wrote:I mean size (in bytes) of RMI "call" that pass through network. I suspect SOAP message will be much more verbose that RMI call from network traffic standpoint (thus slower from speed standpoint). Is this true?
Pat Farrell wrote:If you care about message size, you should measure it.
Jayesh A Lalwani wrote:
In distributed computing world, OTH, the idea of having a a RPC that passes Java objects around is not dead. It's alive and well. If you are building a framework that can distribute tasks over a grid of JVMs, you really don;t want to deploy the classes every time you implement a new kind of task. You need to be able to dynamically load classes as they appear on the grid. However, what has happened is that different frameworks have implemented their own RPC rather than use RMI. Hadoop uses it's home grown Hadoop IPC. I believe even Gridgain folks implemented their own thing. I know Gigaspaces uses JINI, but they have their own implementation of a lightweight RMI
RMI might be dead, but the problem that RMI was trying to solve is not. Most developers don't need to worry about it though
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Mr. C Lamont Gilbert wrote:Exactly why is RMI and object passing viewed as dead in an OO world? Or are you suggesting we are pulling back from the OO concept to some degree?
Mr. C Lamont Gilbert wrote:You seem to feel very strongly this way but you haven't really given any reasons.
Dynamic Generation of Stub Classes
This release adds support for the dynamic generation of stub classes at runtime, obviating the need to use the Java(tm) Remote Method Invocation (Java RMI) stub compiler, rmic, to pregenerate stub classes for remote objects. Note that rmic must still be used to pregenerate stub classes for remote objects that need to support clients running on earlier versions.
When an application exports a remote object (using the constructors or static exportObject methods1 of the classes java.rmi.server.UnicastRemoteObject or java.rmi.activation.Activatable) and a pregenerated stub class for the remote object's class cannot be loaded, the remote object's stub will be a java.lang.reflect.Proxy instance (whose class is dynamically generated) with a java.rmi.server.RemoteObjectInvocationHandler as its invocation handler.
Pat Farrell wrote:Oh, its easy to make messages handle different versions.
The problem with RMI is that the objects must be identical. They are compiled with the 'rmic' into stubs.
With a message, all you have to do is pass a version number, say as the first field, and then write your code to read the version number and dispatch to the right code. The cool thing about this is that once you have the version number 1 code, you can ignore changes until you really need version 2. And you can be sure that you will have a version 2.
Jayesh A Lalwani wrote:Whoa! Pat. When did you last read about RMI?
Pat Farrell wrote:
Jayesh A Lalwani wrote:Whoa! Pat. When did you last read about RMI?
Long ago, last century. Its been obsolete at least that long.
Mr. C Lamont Gilbert wrote:I don't know what the industry is doing so I can't argue with you. Still, I have not been given any reason why RMI would be obsolete.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |