[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Pushing all the buttons


floating java
At 8:15 AM +0700 9/21/03, James Clark wrote:


>With Sun's Fast Web Services stuff, they are going directly from a 
>sequence of bytes to application-specific objects, cutting out at 
>least two of the layers in the XML-based implementation.  I am quite 
>willing to believe they can get an order of magnitude improvement.

The problem with this approach is that it's very platform specific, 
as binary approaches have always been. I suspect Sun's approach will 
work well for Java. But will it work well for C? What's the 
performance impact when byte orders need to be flipped when 
deserializing? I doubt very much Sun can get an order of magnitude 
improvement on all platforms of interest, much less with all 
documents of interest. In fact, I wouldn't be surprised if their data 
optimizations for Java actually decrease performance for programs 
written in Perl, C, or other languages.

>To make this practical a little XML subsetting is required.  First, 
>I think you would need to do what the SOAP folks have done and 
>disallow DTDs; handling entities would make this approach very 
>difficult. Second, you really need to fix on a single encoding.  I 
>think UTF-8 is the obvious choice for Web services.  A single 
>encoding allows you to cut out a whole layer of your processing 
>stack.  Instead of converting bytes to characters and then parsing 
>those characters into objects, you can parse the bytes directly into 
>objects.

That runs into the same problem. This works very well when your 
internal representation is UTF-8. However, when the internal 
representation is UTF-16 as it is in Java or something else then 
extra work is involved. You can't just slam binary data from a stream 
into a memory location and expect it to be an object or data 
structure appropriate for the local environment. You can make this 
work for one preferred environment, yes, but you can't do it for all 
the languages and platforms people use.

I very much suspect Sun's proposal would have the "accidental" effect 
of strongly encouraging developers to use Java. Of course, it will 
work if you use C# or Perl, but it will work better with Java. We've 
seen this before. It's not an accident that Java's native floating 
point support fits Sparc chips much better than X86 chips. Binary 
formats are always tied more to some platforms than others. Binary is 
not as interoperable as text.

-- 

   Elliotte Rusty Harold
   elharo@m...
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.