« Rich clients are making a comeback | Main | Choosing a UI Markup Language »
Lightweight RMI
July 27, 2004
Michael Gloegl asked for lightweight RMI alternatives in his blog. It's been about a month so a few people have posted good solutions already. The requirements were:
- Works over HTTP
- OpenSource - should be BSD-ish or LGPL
- Uses Java Serialisation
- Handles all kinds of Java Objects and Method invocations
Surprisingly, XML-RPC is absent from the list of alternatives. I think it meets the requirements well enough. It works over HTTP. An implementation is available under the open source Apache License 1.1. The other two requirements for Java serialization and "all kinds of Java Objects" could be up for some debate. I think XML-RPC supports them as well.
Using the Apache-supplied XmlRpcClient class, method invocation from a Java client is seamless. The library takes care of Java to XML serialization and back on the server side. You can get back Java Objects like Hashtables, Vectors, byte[], String and primitives in this manner. More types may be the limiting factor. Here's a list of the kinds of Java Objects available in Apache's implementation of XML-RPC.
July 27, 2004 at 01:54 PM in Java | Permalink
TrackBack
TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d834205eab53ef00d8342f1ed353ef
Listed below are links to weblogs that reference Lightweight RMI:
Comments
I don't think it qualifies for RMI, not even RPC. a quick look at sample code of XML-RPC, http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-java-client.html
that is not the syntax people normally expect for method invocation, or procedure call.
Posted by: J Yu | Jul 27, 2004 3:17:40 PM
XML-RPC supports bindings in non-Java languages as well, so invocation syntax can't be as clean as RMI. The syntax is more involved, I agree, than RMI but it accomplishes the goal.
Posted by: Vik | Jul 27, 2004 4:00:27 PM
