W3C home > Mailing lists > Public > xml-dist-app@w3.org > March 2003

RE: Opaque data, XML, and SOAP

From: John J. Barton <John_Barton@hpl.hp.com>
Date: Fri, 07 Mar 2003 13:58:55 -0800
Message-Id: <>
To: "Anne Thomas Manes" <anne@manes.net>, "Don Box" <dbox@microsoft.com>, <xml-dist-app@w3.org>

At 12:29 PM 3/7/2003 -0500, Anne Thomas Manes wrote:

>I certainly prefer the idea of using XInclude better than SwA or
>WS-Attachments. But why not just use base64? It's really the better way to

Inline binary and base64 is fine for short objects in general purpose machines.
But I think that a lot of XML+binary uses will be small XML messages containing
instructions and large binary data objects sent from or to special purpose 

Using inline storage for the binary has many drawbacks.  Its not robust to 
transmission: you don't have any usable information until all the binary 
has been
transmitted and the end of the XML has been reached.  It is not easy for 
memory devices: you must buffer the input, count it, then reallocate to 
the binary.  It requires more complex sending software to embed the binary: 
probably will shuffle the bits through application  layer code for no 

The main argument against base64 is the pointless 30% increase in bits.  The
CPU cost of encoding is also pointless but then the processor is mostly idle

Consider for example a camera sending an image.  The XML will be a few kbytes
and might be fixed in ROM; the binary  will be a few Mbytes.  If the 
receiver is a
printer inline/base64 vs outline/jpeg could be the difference between 
success and failure.
And here the costs are all in the design: we know that outlined/binary 
solutions are
feasible and efficient.  We just need to pick one.

And of course each individual developer does not care about 30% increase or 
memory requirements.  But systems designers have to consider the aggregate 
of poor protocol decisions.

But if inline/base64 works for you, fine by me and you are all set anyway.

> > -----Original Message-----
> > From: xml-dist-app-request@w3.org [mailto:xml-dist-app-request@w3.org]On
> > Behalf Of Don Box
> > Sent: Thursday, February 27, 2003 1:46 AM
> > To: xml-dist-app@w3.org
> > Subject: Opaque data, XML, and SOAP
> >
> >
> >
> > A few of us have spent some time thinking about the problem space
> > and wrote the down our thoughts in this area:
> >
> > http://www.xml.com/pub/a/2003/02/26/binaryxml.html
> >
> > DB
> >
> >

John J. Barton          email:  John_Barton@hpl.hp.com
MS 1U-17  Hewlett-Packard Labs
1501 Page Mill Road              phone: (650)-236-2888
Palo Alto CA  94304-1126         FAX:   (650)-857-5100
Received on Friday, 7 March 2003 19:13:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:11:55 UTC