RE: Opaque data, XML, and SOAP

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
>go.

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 
machines.

Using inline storage for the binary has many drawbacks.  Its not robust to 
partial
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 
limited
memory devices: you must buffer the input, count it, then reallocate to 
process
the binary.  It requires more complex sending software to embed the binary: 
you
probably will shuffle the bits through application  layer code for no 
purpose.

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
anyway.

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 
doubled
memory requirements.  But systems designers have to consider the aggregate 
impact
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
http://www.hpl.hp.com/personal/John_Barton/index.htm
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