[MOBY-dev] data by reference - a request for comments

Martin Senger martin.senger at gmail.com
Mon Aug 4 02:54:36 UTC 2008


Hi all,

Thank you for all comments and suggestions. Here is a summary. Before
we consider it as an RFC we still need to answer few questions.

[So this not yet a call to vote, but it is close to it, I hope. I
would rather prefer Mark to make the call when the time is appropriate
and the RFC clear.]

-------
a) There is one change in the service registration (and, consequently,
in the findService() response): A new property "allowingRefs" that
contains a list of one or more protocols names (e.g. http or ftp). A
service having this property non-empty is able both accepting
references from clients and producing references in its responses.

Commentary: I would leave it to the Mark/Eddie to specify how exactly
this new property appears in the registration and in the findService.

-------
b) A client asks for getting back references by including "acceptRefs"
attribute in mobyData tag. The attribute lists one or more protocol
names that the client can accept. For example: acceptRefs="http,ftp".
A client can also send its input data by reference - but only to the
services that has a non-empty property "allowingRefs".

-------
c) A service can obey a request for references.

Question: A service can obey or should obey?

-------
d) The format of references: The references are expressed as an
XInclude element, with the namespace
http://www.w3.org/2001/XInclude. For example:

      <moby:Simple moby:articleName="sequence" xmlns:xi="
http://www.w3.org/2001/XInclude">
        <moby:FASTA_AA>
          <moby:String moby:articleName="content">
             <xi:include parse="text" href="
http://www.uniprot.org/uniprot/Q25158.fasta"/>
          </moby:String>
        </moby:FASTA_AA>
      </moby:Simple>

Notice that in this example, there is a "text" - meaning that the
references data are non-XML, non-escaped raw data. Such as (notice the
non-escaped "greater-than" sign):

>sp|Q25158|OPSC2_HEMSA Compound eye opsin BCRH2 OS=Hemigrapsus sanguineus
PE=2 SV=1
MTNATGPQMAYYGAASMDFGYPEGVSIVDFVRPEIKPYVHQHWYNYPPVNPMWHYLLGVI
YLFLGTVSIFGNGLVIYLFNKSAALRTPANILVVNLALSDLIMLTTNVPFFTYNCFSGGV
WMFSPQYCEIYACLGAITGVCSIWLLCMISFDRYNIICNGFNGPKLTTGKAVVFALISWV
IAIGCALPPFFGWGNYILEGILDSCSYDYLTQDFNTFSYNIFIFVFDYFLPAAIIVFSYV
FIVKAIFAHEAAMRAQAKKMNVSTLRSNEADAQRAEIRIAKTALVNVSLWFICWTPYALI
SLKGVMGDTSGITPLVSTLPALLAKSCSCYNPFVYAISHPKYRLAITQHLPWFCVHETET
KSNDDSQSNSTVAQDKA

Commentary, questions:

i) I am not sure if we should use XInclude (as
above) or rather XLink. Their differences are blurned for me.

ii) If using XInclude, are we going to allow also the attribute
"xpointer"? I hope not...

-------
e) Location of references: The references may be placed inside any XML
tag within a BioMoby message.

Commentary: God bless those who are going to implement it...

-------
f) Protocol and format of the referenced data: The protocol how to get
data is specified in the "href" attribute of the "xi:include" tag.

The format of referenced data depends where the "xi:include" tag is
used:

If it is used on any other tag than the primitive type, it has
to be an XML complying with the BioMoby message specification, and the
"xi:include" tag should have the parse="xml" attribute (or none at
all). The same for primitive types when parse="xml" is used.

For primitive types with parse="text", the referenced data may be
encoded differently as they would in a regular BioMoby message. The
new encoding can be specified in the "encoding" attribute of the
"xi:include" tag, or - if the HTTP protocol is used - in the HTTP
header "Content-type".

Cheers,
Martin

-- 
Martin Senger
email: martin.senger at gmail.com,m.senger at cgiar.org
skype: martinsenger



More information about the MOBY-dev mailing list