[MOBY-l] Quick survey of opinions on query structure

Mark Wilkinson markw at illuminae.com
Wed Feb 5 15:12:39 UTC 2003


Hi all, 

Off-list Lukas and I have been having a friendly argument about how MOBY
collection objects should be structured.  

<moby:background>To date, all existing services have been "simple", in
that they take only one copy of one object type as their input, and
generate one copy of one object type as their output.  Arguments about
passing parameters aside for another day, this is obviously too
simplistic for some services, which might require e.g. a GO id and a
taxonomy object, together, to execute the
transformation.</moby:background>

So, the most simple query is currently structured this way:

<MOBY>
	<Object namespace="foo" id="bar"/>
</MOBY>

A series of simple queries is currently structured in this way:

<MOBY>
	<Object namespace="foo" id="bar1"/>
	<Object namespace="foo" id="bar2"/>
	<Object namespace="oof" id="rab"/>
	...
</MOBY>


When Damian and I originally discussed the idea of multi-component
queries in Bethesda we had tossed around the idea that we would have a
special "Collection" XML tag to group together objects that were
components of a single query.  Since then, Lukas and I have been going
back and forth about whether or not this is the most sensible idea.

Here is what the SOAP payload looks like under the two proposals (as I
understand them - Lukas, please correct me if I am misrepresenting your
view):

1)  'MOBY' element used to group the objects by query:
	
	<MOBY>
		<Object id="namespace1" id="123"/>
		<Object id="namespace2" id="456"/>
	</MOBY>
	<MOBY>
		<Object id="namespace1" id="147"/>
		<Object id="namespace2" id="988"/>
	</MOBY>
	...

2)  'Collection' element used to group the objects by query:

	<MOBY>
		<Collection>
			<Object id="namespace1" id="123"/>
			<Object id="namespace2" id="456"/>
		</Collection>

		<Collection>
			<Object id="namespace1" id="147"/>
			<Object id="namespace2" id="988"/>
		</Collection>
	</MOBY>



Keeping in mind that we are not yet married to any given structure, I'd
like to get others opinions on the matter.

Arguments for model 1:  <MOBY> tags are used for what they were intended
- that is, to define the input to a query.  (As such, the current
structure for multiple queries is incorrect and should be modified such
that each query in the list has its own <MOBY> tag).  This reduces the
complexity of the query structure, and ensures that the query structure
is consistent from one query to another (versus model 2 where the
<Collection> tags are only used if the query is a complex one). Lukas,
do you want to add more arguments here?

Arguments against model 1:  There is no document root in the SOAP
payload, thus a "fake" one would have to be added before the payload is
passed to an XML parser.

Arguments for model 2:  There is a document root, and all MOBY
transactions are enclosed in a single MOBY element.  Thus the SOAP
payload can be passed verbatim to an XML parser.  

There is also a straw-man I can throw out at you all - that being the
following case:


	<MOBY>
		<Collection>
			<Object id="namespace1" id="123"/>
			<Object id="namespace2" id="456"/>
		</Collection>

		<Object id="namespace1" id="147"/>

		<Collection>
			<Object id="namespace1" id="123"/>
			<Object id="namespace2" id="455"/>
		</Collection>

	</MOBY>

where there is a mixture of Collection-queries and simple queries in teh
same message.  This should never be the case, because the service
signatures are sufficiently different that a single MOBY service could
not be registered to deal with both of these query formats... hence it
is a straw man (at the moment).

Anyway, I'd like to get others opinions on this before I do much more
coding, as it is ~functionally irrelevant which one we chose, but we
need to nail it down in the spec so that people can code their services
properly.

Mark


-- 
=======================================================================
                                    |--==\
Mark Wilkinson                       \==-|       
Bioinformatics Consultant             \=/        0010010010100101110010
Illuminae Media                       /-\        
727 6th Ave. N.                      /-==|       0010100100111101010010
Saskatoon, SK, Canada               |==-/        
S7K 2S8                              \=/         0100100100010010010101
+1 (306) 373 3841                     /\         
markw at illuminae.com                  /=-\        1101001010100101010101
                                    |--==\
=======================================================================



More information about the moby-l mailing list