[jdom-interest] Re: EJB Mapper (was Newbie: JDom-Test)

Brett McLaughlin brett.mclaughlin at lutris.com
Sat Oct 7 15:47:42 PDT 2000

> >Directly returning Java bytecode, in the object format that it
> >represents, will always, always, always be simpler and faster than
> >converting to XML.
> Perhaps. However, there's no evidence of that since there's no remote 
> procedure call form that ships byte code over the Net. RMI does not 

Yeah, I amended that earlier ;-)

> in fact ship objects as byte code over the net. What it ships is a 
> custom serialization format that's proven to be extremely inefficient 
> in practice, and very easily surpassed by XML alternatives. I don't 

I'd like to see those numbers. I'm not saying that the serialization
format is any better, I'm saying that the conversion to that format and
from it will beat anything other than a non-validating,
non-well-formedness checking XML parser hands down. The problem, like in
XML-RPC, is that you pay the price for things like ensuring that angle
brackets are set up correctly on both ends of the process, which adds
up. Yes, there is some error checking on the deserialization end of RMI
and JRMP (btw, any vendor worth anything provides a better RMI provider,
which improves on all of this anyway), but it's not extensive as that
nice big XML 1.0 spec (well, it's small for XML, but you get the idea.

> know that object serialization had to use such a slow, inefficient 
> format; but it did.

I agree it's not great - but it beats the process of parsing XML itself.
Also, there was one tangent about passing around a JDOM document - now
you're paying both prices (XML and Java) ;-)

> More importantly, however, is that RMI is Java-to-Java only, and even 
> if you're only doing Java-to-Java today, it's hard to predict what 
> you'll be using tomorrow. Using XMl for the serialization syntax 
> makes your whole system a lot more flexible, debuggable, and 
> upgradeable than using RMI.

I don't know that I buy this - I mean, you're saying don't bet on the
entire programming language that you have chosen! RMI isn't even an
extension, it's the core platform. While it's nice to be flexible,
you're saying, essentially, "don't bet on Java." I can't advocate to
anyone to choose a language for an application, but then don't bet on
the language; it makes all the choices you make virtually lose-lose. So
I agree with you in concept, but in practice, if you choose Java, you've
chosen RMI, for better or worse. I say use it.


Brett McLaughlin, Enhydra Strategist
Lutris Technologies, Inc. 
1200 Pacific Avenue, Suite 300 
Santa Cruz, CA 95060 USA 

More information about the jdom-interest mailing list