Difference between revisions of "Database Interop Hackathon/Implementations"

From Evolutionary Informatics Working Group
Jump to: navigation, search
(Corrected Hackathon date.)
(Current implementations)
Line 13: Line 13:
<td>[http://gmod.org/ GMOD]</td>
<td>[http://gmod.org/ GMOD]</td>
<td>[[ConceptGlossary#Natural Variation]], [[ConceptGlossary#Polymorphism]], Syntenic regions</td>
<td>Java, Perl, C, ActionScript</td>
<td>Java, Perl, C, ActionScript</td>

Revision as of 20:07, 19 February 2009


This page discusses potential target implementations that demonstrate the goals for the Evolutionary Database Interop Hackathon, to be held at NESCent in March 2009. The overall goal is to expose evolutionary data resource on the web in a machine readable architecture so that they can be integrated in complex work flows and mash-ups. To this end, we suggest their implementing of the stack produced by the evolutionary informatics working group:

  • Syntax - the NeXML data exchange standard
  • Interface/transport - the PhyloWS API for web services
  • Semantics - the CDAO character data analysis ontology

By combining these three components into a single, integrated stack, online data resources will produce output that is easy to parse and validate, whose semantics are well-defined, and whose interface is uniform across data resources.

Current implementations

Some of the online data resources the hackathon seeks to invite for an implementation drive are listed in the table below. The semantics of the output produced by these resources is diverse, including species trees, taxonomies, gene trees, character state matrices and alignments. Also, the programming languages used to implement these services are diverse, including Java, PHP, Python and Perl. This situation goes a long way to explain why standard industry practices (write a WSDL, generate client and server bindings, implement service) have not seen wide adoption in the evolutionary informatics community: different resources have, semantically and syntactically, different inputs and outputs, and are implemented in languages whose support for web services (especially WS-*) is sometimes incomplete.

ResourceExportable objectsImplementation language
GMOD ConceptGlossary#Natural Variation, ConceptGlossary#Polymorphism, Syntenic regions Java, Perl, C, ActionScript
Tree of Life ConceptGlossary#Species_Tree Java
pPOD ?? Java
PhyTome ConceptGlossary#Family_alignment,ConceptGlossary#Phylogenetic_Tree PHP
uBio ConceptGlossary#Taxon, ConceptGlossary#Taxonomic_Rank, ConceptGlossary#Organismal_Taxonomy PHP
TimeTree ConceptGlossary#Species_Tree PHP
PhyloFacts ConceptGlossary#Transition_Model, ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment PHP
MorphBank ConceptGlossary#Character-State_Data_Matrix PHP, Java, JavaScript
MorphoBank ConceptGlossary#Character-State_Data_Matrix PHP, Flash/ActionScript
PhylomeDB ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment JavaScript, Python
PhyloTA ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment Perl
TreeFam ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment Perl
Pandit ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment Perl
MicrobesOnline ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment CGI (=Perl?)
HoVerGen ConceptGlossary#Phylogenetic_Tree, ConceptGlossary#Family_alignment CGI (=Perl?), PHP

Suggested hackathon deliverables

Data retrieval, based on an identifier

This simple reference service returns phylogenetic data that is identifiable by some GUID, such as a ToLWeb accession number. The service is implemented following the PhyloWS/REST proposal, has a CDAO annotated service description and emits NeXML.

Describing the interface

The first step is to formally describe the interface. In general terms, PhyloWS/REST proposes that data retrieval services are exposed using a URL API like this: /phylows/${dataType}/${nameSpace}:${identifier}, where ${dataType} is something like "Tree", "Matrix", etc. ${nameSpace} is a naming authority such as ToLWeb, and ${identifier} is unique within ${nameSpace} (and consequently globally unique). This implies URLs such as /phylows/Tree/ToLWeb:16299, which, when accessed using the GET HTTP method returns a representation of tree 16299.

A standard way to describe this behaviour is to express it in WSDL2.0 - there's a nifty example of wsdl generation and annotation here. At the time of writing, the best free editor for wsdl files comes with the WTP extension for eclipse. The end result is a file such as this one


Graphical representation of this service description.

Implementing the service

A service for the interface described in the previous section can be implemented as an MVC-like application. The controller part of the service needs to find out what the requested Tree ID is. Depending on the implementation language (and whether some advanced web application programming framework is used) the Tree ID is either part of the ${PATH_INFO} environment variable, or encapsulated in some kind of request object. However the Tree ID is retrieved from the request, the next step is to look up the record that the ID refers to. Typically this would be done in a database query. The goal here is to collect all information needed to populate a model object (in this case a tree) that can be serialized to the right return format. Assuming that the return format is NeXML, libraries for perl, python, java and c++ are available that supply model objects.

Once populated, the controller object creates a view using the model objects. In the simplest case, for web applications, this boils down to printing out the XML string representations of the model objects, preceded by the correct response code, e.g. 200 OK, and mime-type, e.g. application/xml. In more complex web application architectures, the string representations of the model objects may be passed to a response object (which in turn is serialized and returned to the client), or the objects may be passed into a template (jsp, Template Toolkit, php) where they are stringified.

Outstanding issues

  • Dearth of support for PHP
  • How to deal with errors (e.g. response codes)
  • Query interface
  • CDAO integration