[MOBY-dev] INB Base64 (binary) type proposal

Dmitry Repchevsky dmitry.repchevski at bsc.es
Thu Nov 6 20:58:07 UTC 2008


Hello everybody,

These days there were a technical INB meeting in Malaga (Spain) and I 
like to comment some decisions taken there.

Most interesting to me is the introduction of new Moby primitive type 
"Binary" that will correspond to the xml schema:

********************************************************
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:tns="http://www.biomoby.org/moby" 
xmlns="http://www.biomoby.org/moby" 
xmlns:moby="http://www.biomoby.org/moby" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
attributeFormDefault="qualified" elementFormDefault="qualified" 
version="1.0" targetNamespace="http://www.biomoby.org/moby">

<xs:element name="Binary" type="MobyBinary"></xs:element>

<xs:complexType name="MobyBinary">
<xs:simpleContent>
 <xs:extension
   base="xs:base64Binary"
   ns1:expectedContentTypes="application/octet-stream"
   xmlns:ns1="http://www.w3.org/2005/05/xmlmime">
 </xs:extension>
</xs:simpleContent>
</xs:complexType>

</xs:schema>
********************************************************

The encoding inside a Moby Message will be a standard base64 coded chunk 
of data:
********************************************************
<moby:Binary id="" namespace="">dGVzdA==</moby:Binary>
********************************************************

The need of new type is enough obvious: we need to pass binary data. 
Today, instead of using a primitive type many service developers mess a 
datatype tree with their own solutions (text-base64, b64_encoded_ppm, 
Zip_encoded, Image_PNG, Image_Encoded, glycoPNG ...)
Even we do not expect that service providers will change their services 
to utilize this new type, it would be very useful for many new types.

At the moment the encoding itself is a responsibility of a developer and 
such a type will free them from the need to encode/decode process.
The implementation is pretty easy and as soon as our key Perl developer 
is back from vacation we expect him to introduce it into the perl moby 
code.

So far this is the official INB proposal and we would be happy to here 
comments from other develops.
Any comments or suggestions are welcome.

Warm regards,

Dmitry

P.S. http://inb.bsc.es/documents/base64bit.pdf




More information about the MOBY-dev mailing list