OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Pushing all the buttons

[ Lists Home | Date Index | Thread Index ]

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 

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
   Processing XML with Java (Addison-Wesley, 2002)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS