Description and Discovery of Type Adaptors for Web Services Workflow
-
Upload
martin-szomszor -
Category
Technology
-
view
422 -
download
1
Transcript of Description and Discovery of Type Adaptors for Web Services Workflow
Description and Discovery of Type Adaptors for Web
Services Workflow
Martin Szomszor ([email protected])
Presentation Outline
• Contemporary workflow Design Discovery of services using semantics
• Problem description Type conversion requirements
• Describing Type Adaptor capabilities Using WSDL
• Discovering Type Adaptors
• Implementation Example Using bespoke mapping language FXML-M GRIMOIRES Registry
In Silico Experimentation
• Computational experimentation
• Access to resources provided by Web Services
• Users map experimental process to workflow
• Tasks are realised by service instances
Service Discovery
• Users need to find services to fulfill given tasks e.g. Retrieve sequence data Sequence alignment (Blast)
• There are lots of services !• Interface definitions can be terse, often un-
documented and sometimes cryptic • Limited semantic value• Manual discovery not ideal
Semantic Discovery
• Support users in the discovery of services according to domain specific terminology
• Annotate service descriptions with concepts from an ontology (PEDRO) Input and output types assigned a semantic type by a
reference to an ontology concept
• Discover services by: Task performed Resources used Input and output semantic types
Semantically Driven Workflow Design
• When building workflows, users connect services because they are deemed semantically compatible: Output semantic type equivalent to input
semantic type
Syntactic Compatibility• However, semantically compatible service
interfaces may not be syntactically compatible (i.e. different data formats)
Syntactic Mediation• When a mismatch in data formats occurs within a
workflow, a translation component is required• These Type Adaptors come in a variety of guises
Translation Scripts (e.g. XSLT) Bespoke Code (JAVA and PERL) Web Services
• Current solutions are manual Identify when mismatch occurs How to resolve it What translation components are suitable Create new translation components if necessary
• How can we describe Type Adaptors?
WSDL Overview
• WSDL is a declarative language used to specify program capabilities through the definition of end-points Programs expose operations Operations are specified in terms of messages Messages contain parts (each with syntactic type) XML Schema can be used to describe data formats
• Abstract definition separated from concrete implementation
• Binding defines invocation method and data encoding
WSDL Examples:<definitions> <message name='getEntryIn'> <part name='accession_id' element='DDBJ:ACCESSION'/> </message> <message name='getEntryOut'> <part name='record' element='DDBJ:DDBJXML'/> </message>
<portType name='DDBJPortType'> <operation name='GetEntry'> <input name='getEntryIn' message='tns:getEntryIn'/> <output name='getEntryOut' message='tns:getEntryOut'/> </operation> </portType>
SOAP
<binding name='DDBJBinding' type='tns:DDBJPortType'> <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/> <operation name='GetEntry'> <soap:operation soapAction='GetEntry'/> <input name='getEntryIn'> <soap:body use='literal'/> </input> <output name='getEntryOut'> <soap:body use='literal'/> </output> </operation> </binding></definitions>
JAVA
<binding name="JavaBinding" type="tns:DDBJPortType"> <java:binding/> <format:typeMapping encoding="Java" style="Java"> <format:typeMap typeName=”DDBJ:DDBJXML" formatType=”DDBJXML.SequenceData"/> <format:typeMap typeName=”DDBJ:ACCESSION" formatType="java.lang.String"/> </format:typeMapping> <operation name=”GetEntry"> <java:operation methodName=”GetEntry” methodType="instance"/> <input name="getEntryIn"/> <output name=“getEntryOut”/> </operation> </binding></definitions> http://ws.apache.org/wsif/providers/wsdl_extensions/
java_extension.html
WSDL Conclusions
• Can be used to describe many implementations Transport not necessarily SOAP over HTTP Data encoding does not have to be XML
• Java Objects• String formats (e.g. csv)• Binary Files
• Other WSDL Bindings: XQuery [Onose and Simeon 2004]
EJB, JMS, J2EE Connector Architecture (e.g. Cobol): from Apache WSIF
• Anything you like…
Type Adaptors• Type Adaptors are components that:
consume an input (source type) produce an output (destination type)
• Functionality can be described at an abstract level: what goes in what comes out
• Actual implementation can be described using a binding, e.g. XSLT script location Java Class used
• Hence, we use WSDL to describe Type Adaptors
WSDL for Type Adaptors
Discovery of Type Adaptors
• Simple solution: Adaptor for each compatible data format O(n2) Poor Scalability
• Alternative: Introduce intermediate representation O(n) Less effort introducing new formats
Type Adaptor Approaches
fc
e
b
d
a
fc
e
b
d
a
Intermediate Representation
• Use OWL ontologies to capture semantics and structure of data formats
• Proven technique TAMBIS Project [Stevens et al 2003]
• Complex query formulation over diverse information sources
SEEK Project [Bowers and Ludascher 2004]
• An ontology-driven framework for data transformation in scientific workflows
Implementation
• Type Adaptor approach: Using OWL as intermediate representation
• Transformation Technology: Using bespoke mapping language FXML-M
• Registry Technology: GRIMOIRES
• Advertise• Discover
Mapping Mechanics
<S> <X>foo</X> <X>bar</X></S>
<D> <Y>foo</Y> <Y>bar</Y></D>
Source Document Destination Document
m1: S/X -> D/Y
m2: X/$ -> Y/$
Mappings
Mapping Mechanics
S
X
“foo”
S/* S/*
xsd:string xsd:string
X
“bar”
D
Y
“foo”
D/* D/*
xsd:string xsd:string
Y
“bar”
m1: S/X -> D/Ym2: X/$ -> Y/$
Example M-Binding<binding xmlns="http://www.ecs.soton.ac.uk/~mns03r/mapping/example" xmlns:sns="http://jaco.ecs.soton.ac.uk/schema/source" xmlns:dns="http://jaco.ecs.soton.ac.uk/schema/destination">
<mapping id="1"> <source match="sns:S/sns:X"/> <destination create="dns:D[join]/dns:Y[branch]"/> </mapping>
<mapping id=”2"> <source match="sns:X/$"/> <destination create="dns:Y[join]/$"/> </mapping>
</binding>
Transformation Technology
• Bespoke Mapping Language (FXML-M) Declarative
• Statements map schema elements from source to destination• Mappings are combined in an M-Binding Document
Composable• M-Bindings can include statements from other M-Bindings
Predicate support (for complex relations) Asymmetric relations (one-to-many, many-to-one)
• Implementation (FXML-T) Consumes M-Bindings, schemas and source
document Produces destination document
Mappings with OWL
• Our Type Adaptor approach uses OWL for an intermediate representation But our transformation technology is XML to XML
• Solution, use canonical XML representation for OWL concept instances
• OWL Instance Schema Automatically generated from OWL ontology Concept hierarchies calculated Elements for each concept and property
Bio Example<ddbj:DDBJXML> <ddbj:ACCESSION>AB000059</ddbj:ACCESSION> <ddbj:FEATURES> <ddbj:source> <ddbj:location>1..1755</ddbj:location> <ddbj:qualifiers name="isolate">Som1</ddbj:qualifiers> <ddbj:qualifiers name="lab_host">Felis domesticus</ddbj:qualifiers> </ddbj:source> </ddbj:FEATURES></ddbj:DDBJXML>
<ont:Sequence_Data_Record> <ont:accession_id>AB000059</ont:accession_id> <ont:has_feature> <ont:Feature_Source> <ont:isolate>Som1</ont:isolate> <ont:lab_host>Felis domesticus</ont:lab_host> <ont:location> <ont:Feature_Location> <ont:start>1</ont:start> <ont:end>1755</ont:end> </ont:Feature_Location> </ont:location> </ont:Feature_source> </ont:has_feature></ont:Sequence_Data_Record>
Simple One-to-OneElement and literalMany-to-ManySplit literal valuePredicate evaluation
Example M-Binding<binding xmlns="http://www.ecs.soton.ac.uk/~mns03r/mapping/ddbj-to-ont-mapping" xmlns:sns="http://jaco.ecs.soton.ac.uk/schema/DDBJ" xmlns:dns="http://jaco.ecs.soton.ac.uk/ont/sequencedata">
<mapping id="1"> <source match="sns:DDBJXML/sns:ACCESSION"/> <destination create="dns:Sequence_Data_Record[join]/dns:accession_id[branch]/"/> </mapping>
<mapping id=“2”> <source match="sns:ACCESSION/$"/> <destination create="dns:accession_id[join]/$"/> </mapping>
<mapping id=”3"> <source match="sns:DDBJXML/sns:FEATURES/sns:source"/> <destination create="dns:Sequence_Data_Record[join]/dns:has_feature[branch]/ dns:Feature_Source[branch]"/> </mapping> <mapping id=”4"> <source match='sns:source/sns:qualifiers[sns:qualifiers/sns:name/$ = "lab_host"]'/> <destination create="dns:Feature_Source[join]/dns:lab-host[branch]"/> <mapping> <source match="sns:qualifiers/$"/> <destination create="dns:lab-host[join]/$"/> </mapping> </mapping>
<mapping id=”5"> <source match="sns:location/$^[^.]+"/> <destination create="dns:Location[join]/dns:start[branch]/$"/> </mapping></binding>
Configurable Mediator
Discovery of M-Bindings
Example WSDL<?xml version='1.0' encoding='UTF-8'?><definitions name='DDBJ-to-sequencedata' targetNamespace='http://jaco.ecs.soton.ac.uk:8080/Bindings/DDBJ-to-sequencedata' ... xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types> <xsd:schema targetNamespace='http://jaco.ecs.soton.ac.uk:8080/Bindings/DDBJ-to-sequencedata'> <xsd:import namespace='http://jaco.ecs.soton.ac.uk/schema/DDBJ'/> <xsd:import namespace='http://jaco.ecs.soton.ac.uk/ont/sequencedata'/> </xsd:schema> </types> <message name='sns#DDBJXML-to-dns#Sequence_Data_Record-IN'> <part name='in' element='sns:DDBJXML'/> </message>
<message name='sns#DDBJXML-to-dns#Sequence_Data_Record-OUT'> <part name='in' element='dns:Sequence_Data_Record'/> </message> <portType name='TranslationPortType'> <operation name='sns#DDBJXML-to-dns#Sequence_Data_Record'> <input name='sns#DDBJXML-to-dns#Sequence_Data_Record-IN'/> <output name='sns#DDBJXML-to-dns#Sequence_Data_Record-OUT'/> </operation> </portType>
<binding name='TranslationBinding' type='tns:TranslationPortType'> <operation name='sns#DDBJXML-to-dns#Sequence_Data_Record'> <input name='sns#DDBJXML-to-dns#Sequence_Data_Record-IN'/> <output name='sns#DDBJXML-to-dns#Sequence_Data_Record-OUT'/> </operation> </binding>
<service name='TranslationService'> <port name='TranslationPort' binding='tns:TranslationBinding'> <fxml:binding location='http://jaco.ecs.soton.ac.uk/binding/DDBJ-to-sequencedata.xml'/> </port> </service></definitions>
Conclusions
• Type Adaptors come in many flavours, all can be described using WSDL
• GRIMOIRES can be used to advertise and discover WSDL Type Adaptors
• We have shown this to work with our own Mapping Language (FXML-M) Practical Scalable
Questions and Comments?
FXML-T Performance
FXML-T Performance
FXML-T Performance
GRIMOIRES Performance
Activity Average Time (S)
DDBJ Execution 2.50
RealisationDiscovery 0.22
Realisation Translation 0.47
Jena Mediation 0.62
Serialisation Discovery 0.23
Serialisation Translation 0.27
Total Mediation 1.81