© Copyright 2010 Dieter Fensel and Srdjan Komazec

93
1 © Copyright 2010 Dieter Fensel and Srdjan Komazec Semantic Web Services Web Service Execution Environment (WSMX)

Transcript of © Copyright 2010 Dieter Fensel and Srdjan Komazec

Page 1: © Copyright 2010 Dieter Fensel and Srdjan Komazec

1© Copyright 2010 Dieter Fensel and Srdjan Komazec

Semantic Web Services

Web Service Execution Environment (WSMX)

Page 2: © Copyright 2010 Dieter Fensel and Srdjan Komazec

2

Where are we?

# Title

1 Introduction

2 Web Science

3 Service Science

4 Web services

5 Web2.0 services

6 Semantic Web

7 Web Service Modeling Ontology (WSMO)

8 Web Service Modeling Language (WSML)

9 Web Service Execution Environment (WSMX)

10 OWL-S and others

11 Light-weight Annotations

12 Applications

13 Mobile Services

Page 3: © Copyright 2010 Dieter Fensel and Srdjan Komazec

3

Outline

• Motivation• Technical solution

– Overview• Introduction• Relation to the WSMO and WSML• Design principles• Lifecycle

– Conceptual Model• Architecture• Components• System entry points

– Behavioral Model• Execution semantics

• Illustration by larger example• Extensions• Summary• References

Page 4: © Copyright 2010 Dieter Fensel and Srdjan Komazec

4

Motivation

Page 5: © Copyright 2010 Dieter Fensel and Srdjan Komazec

5

MotivationHow SESA emerged?

• Service Orientation in information systems– Service-Oriented Computing (SOC)

• Services as the fundamental elements for the development of rapid, low-cost, and easily integrable enterprise applications,

– Service-Oriented Architecture (SOA)• SOC can be abstractly implemented by SOA,• From function to object to service,• SOA requirements: loose coupling, implementation neutrality, flexible configuration, long lifetime,

granularity and teams.

• Existing technologies and SOA solutions are…– … difficult to scale without a proper degree of automation,– … partial solution to interoperability.

• Semantically Enabled Service Oriented Architecture (SESA) represents SOA empowered by adding semantics as a means to deal with heterogeneity and mechanization of service usage.

Page 6: © Copyright 2010 Dieter Fensel and Srdjan Komazec

6

MotivationWhat is SESA?

• Application of SESA offers a scalable integration, more adaptive to changes

– service offerings and required capabilities are described by semantically rich and formal service models,

– exchanged data is also semantically described, and

– reasoning provides total or partial automation of tasks.

• A SESA implementation should build a layer on top of the existing technologies (e.g. Web Services).

Web Service Execution Environment (WSMX) is an implementation of SESA.

Page 7: © Copyright 2010 Dieter Fensel and Srdjan Komazec

7

MotivationSESA Architecture

Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Page 8: © Copyright 2010 Dieter Fensel and Srdjan Komazec

8

MotivationWSMX Goals

• Middleware for Semantic Web Services– Allows service providers to focus on their business,

• Reference implementation for WSMO– Eat our own cake,

• Environment for goal based discovery and invocation– Run-time binding of service requesters and providers,

• Provide a flexible Service Oriented Architecture– Add, update, remove components at run-time as needed,

• Keep open-source to encourage participation– Developers are free to use in their own code, and

• Define formal execution semantics– Unambiguous model of system behaviour.

Page 9: © Copyright 2010 Dieter Fensel and Srdjan Komazec

9

Technical SolutionOverview

Page 10: © Copyright 2010 Dieter Fensel and Srdjan Komazec

10

OverviewIntroduction

WSMX is…• … is comprehensive software framework for runtime binding

of service requesters and service providers,• … interprets service requester’s goal to

– discover matching services,– select (if desired) the service that best fits,– provide data/process mediation (if required), and– make the service invocation,

• … is reference implementation for WSMO,• … has a formal execution semantics, and• … is service oriented, event-based and has pluggable

architecture – Open source implementation available through Source Forge,– based on microkernel design using technologies such as JMX.

Page 11: © Copyright 2010 Dieter Fensel and Srdjan Komazec

11

OverviewRelation to WSMO and WSML

Conceptual Model & Axiomatization for SWS

Formal Language for WSMO

Ontology & Rule Language for the

Semantic Web

Execution Environment for WSMO

SEE TC

STI2 CMS WG

Page 12: © Copyright 2010 Dieter Fensel and Srdjan Komazec

12

OverviewDesign principles

• Service-oriented principle– Service reusability, loose coupling, abstraction, composability,

autonomy, discoverability,

• Semantic Principle– Rich and formal description of information and behavioral models

enabling automation of certain tasks by means of logical reasoning,

• Problem-solving principle– Goal-based discovery and invocation of services, and

• Distributed principle– Executing process across a number of components/services over

the network, thus promoting scalability and quality of process.

Page 13: © Copyright 2010 Dieter Fensel and Srdjan Komazec

13

OverviewLifecycle

WSMX aims to support the complete Semantic Web Service lifecycle:

1) Discovery - determines usable services for a request,

2) Composition - combine services to achieve a goal,

3) Selection - chooses most appropriate service among the available ones,

4) Mediation- solves mismatches (data, protocol, process) hampering interoperation,

5) Choreography – interactions and processes between the service providers and clients,

6) Grounding – lifting and lowering between the semantic and syntactic data representations, and

7) Invocation - invokes Web service following programmatic conventions.

Page 14: © Copyright 2010 Dieter Fensel and Srdjan Komazec

14

Technical SolutionConceptual Model - Architecture

Page 15: © Copyright 2010 Dieter Fensel and Srdjan Komazec

15

Conceptual ModelArchitecture

Page 16: © Copyright 2010 Dieter Fensel and Srdjan Komazec

16

• WSMX architectural components are divided into three layers– Execution Management layer

• Responsible for managing all other components and interactions between them,• Components are orchestrated in the form of Execution Semantics (explained in upcoming

slides).

– Broker layer• Represented by a number of broker services each dedicated to accomplish different tasks in

SWS lifecycle.

– Base layer• Provides support to various upper level components by providing storage services, as well as

parsing and reasoning.

• WSMX provides different entry points in order to enable users to consume the offered functionality

Conceptual ModelArchitecture

Page 17: © Copyright 2010 Dieter Fensel and Srdjan Komazec

17

Technical SolutionConceptual Model – WSMX ComponentsCore Management

Page 18: © Copyright 2010 Dieter Fensel and Srdjan Komazec

18

• Core Management is a kernel of WSMX with the following objectives– It realizes the overall operational semantics in order to achieve the functional

semantics of its client-side interface– It orchestrates the functionality of the middleware components into a coherent

process in an orderly and consistent fashion called Execution Semantics (see later)– It ensures the proper inter-component communication through publishing and

subscribing to the data as sets of triples over triple space or directly in the synchronous communication manner

Conceptual Model – WSMX ComponentsCore Management

Page 19: © Copyright 2010 Dieter Fensel and Srdjan Komazec

19

Technical SolutionConceptual Model – WSMX ComponentsCommunication Manager and Invoker

Page 20: © Copyright 2010 Dieter Fensel and Srdjan Komazec

20

WSMX ComponentsCommunication Manager and Invoker

• Responsible for interaction with services and entities that are external to WSMX.

• Should be open to support as many transport and messaging protocols as possible (transparently to WSMX).

• WSMX uses – The SOAP implementation from Apache AXIS, and

– The Apache Web Service Invocation Framework (WSIF) .

• Both RPC and Document style invocations possible

Network

InvokerApacheAXISGroundingMediated

WSML Data

XML WebService

SOAP

Page 21: © Copyright 2010 Dieter Fensel and Srdjan Komazec

21

Technical SolutionConceptual Model – WSMX ComponentsGrounding

Page 22: © Copyright 2010 Dieter Fensel and Srdjan Komazec

22

WSMX ComponentsGrounding

• WSMO service descriptions are grounded to WSDL by the means of XSLT lifting and lowering

Jacek Kopecký et al. D24.2v0.1. WSMO Grounding, WSMO Working Draft 27 April 2007. http://wsmo.org/TR/d24/d24.2/v0.1

Page 23: © Copyright 2010 Dieter Fensel and Srdjan Komazec

23

WSMX ComponentsGrounding - Example

<xsl:stylesheet version="2.0"

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:p="http://www.wsmo.org/sws-challenge/ShipmentOntologyProcess#"

xmlns:muller="http://www.example.org/muller/"

exclude-result-prefixes="#all"

xmlns:helper="java:ie.deri.wsmx.commons.Helper">

<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:template match="/muller:invokePriceResponse">

<xsl:variable name="randomId" select="helper:getRandomId()"/>

<rdf:RDF>

<rdf:Description about="http://example.com/testresponse{$randomId}">

<rdf:type rdf:resource="http://www.wsmo.org/sws-challenge/ShipmentOntologyProcess#PriceQuoteResp"/>

<p:price rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal"><xsl:value-of select="number(./muller:price)"/></p:price>

</rdf:Description>

</rdf:RDF>

</xsl:template>

</xsl:stylesheet>

Lifting transformation

<shipmentOrderResponse xmlns="http://www.example.org/muller/">

<pickupDate>2009-01-03T06:04:31.747+01:00</pickupDate>

<price>65.06</price>

</shipmentOrderResponse>

Web Service Invocation Response

instance http://example.com/testresponse{1234567 memberOf http://www.wsmo.org/sws-challenge/ShipmentOntologyProcess#PriceQuoteResp

price hasValue 65.06

Data represented as ontology and ontology instance

Page 24: © Copyright 2010 Dieter Fensel and Srdjan Komazec

24

Technical SolutionConceptual Model – WSMX ComponentsDiscovery

Page 25: © Copyright 2010 Dieter Fensel and Srdjan Komazec

25

• Responsible for finding appropriate Web Services capable of fulfilling a goal

• Different techniques available – trade-off: ease-of-provision vs. accuracy

– resource descriptions & matchmaking algorithms

Key Word Matching - match natural language key words in resource descriptions,

Controlled Vocabulary- ontology-based key word matching, and

Semantic Matchmaking - what Semantic Web Services aim at.

Ease of provision

Possible A

ccuracy

Conceptual Model – WSMX ComponentsDiscovery

Page 26: © Copyright 2010 Dieter Fensel and Srdjan Komazec

26

• Allows for a fast filtering and ranking of the huge number of available services rather quickly.

• Nonfunctional properties from the Dublin Core namespace (e.g. dc#description) are candidates for indexing and querying.

• Dictionaries of synonyms (WordNet) can be used to discover more services.

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-rule"

namespace {_"http://www.wsmo.org/sws-challenge/WSMuller#", dc _"http://purl.org/dc/elements/1.1#"}

webService WSMuller nfp dc#title hasValue "Muller Web Service" dc#description hasValue "We ship to Africa, North America, Europe, Asia (all countries)." dc#contributor hasValue "Maciej Zaremba, Matt Moran, Tomas Vitvar, Thomas Haselwanter" endnfp

capability WSMullerCapability...

Conceptual Model – WSMX ComponentsDiscovery – Key Word Matching

Page 27: © Copyright 2010 Dieter Fensel and Srdjan Komazec

27

Exact Match: G, WS, O, M ╞ x. (G(x) <=> WS(x) )

PlugIn Match: G, WS, O, M ╞ x. (G(x) => WS(x) )

Subsumption Match: G, WS, O, M ╞ x. (G(x) <= WS(x) )

Intersection Match: G, WS, O, M ╞ x. (G(x) WS(x) )

Non Match: G, WS, O, M ╞ ¬x. (G(x) WS(x) )

= G = WS

X

Keller, U.; Lara, R.; Polleres, A. (Eds): WSMO Web Service Discovery. WSML Working Draft D5.1, 12 Nov 2004.

Conceptual Model – WSMX ComponentsDiscovery – Simple Semantic Descriptions

Page 28: © Copyright 2010 Dieter Fensel and Srdjan Komazec

28

Domain knowledge

Generic goals

Specific goals

Web services

Lara, R., Lausen, H (Eds): WSMO Discovery Engine. WSML Working Draft D5.2, 26 Nov 2004.

Conceptual Model – WSMX ComponentsDiscovery – Simple Semantic Descriptions - Example

Page 29: © Copyright 2010 Dieter Fensel and Srdjan Komazec

29

• Exact match

• Plug-in match

• Subsumption match

• Intersection match

Conceptual Model – WSMX ComponentsDiscovery – Simple Semantic Descriptions - Example

Page 30: © Copyright 2010 Dieter Fensel and Srdjan Komazec

30

Technical SolutionConceptual Model – WSMX ComponentsRanking and Selection

Page 31: © Copyright 2010 Dieter Fensel and Srdjan Komazec

31

• One service which best satisfies the user preferences is selected from the candidate services returned by the service discovery.

• Selection – determines best candidate out of discovered WS,

• Ranking– determines a priority list of discovered WS.

• The process is run after “functional” discovery • Criteria:

– Quality of Service (security, robustness, availability),– Context (regional, business / social communities),– Preferences and policies,– Financial criteria,– …

Conceptual Model – WSMX ComponentsRanking and Selection

Page 32: © Copyright 2010 Dieter Fensel and Srdjan Komazec

32

Conceptual Model – WSMX ComponentsRanking and Selection

• Ontologies for specifying QoS (http://www.wsmo.org/ontologies/nfp)– set of 17 ontologies (i.e. locative, temporal, availability, price, trust, security, etc.)– provide the terminology needed to specify QoS aspects of services

• The data required for ranking and selection can be attached through the non-functional aspects of SWS

• The example defines the value of price for the Web Service consumption as a WSML logical expression which needs to be evaluated. • If the client is older than 60 or less than 100 years old the predefined absolute price is taken which must be less or equal to 10.

Page 33: © Copyright 2010 Dieter Fensel and Srdjan Komazec

33

• Service Ranking– Based on order theory which defines notions of total order, partial order and ranking.– WSMX uses Multicriteria ranking – considers multiple nonfunctional properties

• Service Selection– User specifies selection criteria in terms of nonfunctional properties such as SLA,

QoS, etc. Those can be obtained from goal description.– Service defines nonfunctional property values are directly provided or

computed/collected by a monitoring tool.

Conceptual Model – WSMX ComponentsRanking and Selection

Page 34: © Copyright 2010 Dieter Fensel and Srdjan Komazec

34

Conceptual Model – WSMX ComponentsRanking and Selection – Example

namespace {pref _"http://www.wsmo.org/ontologies/nfp/preferenceOntology#"}webService TestService1 nfp pref#Obligation hasValue 10 pref#Discount hasValue 120 pref#AverageInvocationTime hasValue 230 endnfp

namespace {pref _"http://www.wsmo.org/ontologies/nfp/preferenceOntology#"}webService TestService2 nfp pref#Obligation hasValue 12 pref#Discount hasValue 130 pref#AverageInvocationTime hasValue 150 endnfp

namespace {pref _"http://www.wsmo.org/ontologies/nfp/preferenceOntology#"}goal TestGoal nfp dc#title hasValue "TestGoal” pref#order hasValue pref#descending pref#preferencesNFPs hasValue {prefObligation, prefDiscount, prefAverageInvocationTime} endnfp

instance prefObligation memberOf pref#Preference pref#nonFunctionalProperty hasValue pref#Obligation pref#interestValue hasValue 0.1

instance prefDiscount memberOf pref#Preference pref#nonFunctionalProperty hasValue pref#Discount pref#interestValue hasValue 0.6

instance prefAverageInvocationTime memberOf pref#Preference pref#nonFunctionalProperty hasValue pref#AverageInvocationTime pref#interestValue hasValue 0.3

WS1WS1

WS2WS2

GoalGoal

Page 35: © Copyright 2010 Dieter Fensel and Srdjan Komazec

35

Technical SolutionConceptual Model – WSMX ComponentsData Mediation

Page 36: © Copyright 2010 Dieter Fensel and Srdjan Komazec

36

• Ontology-to-ontology mediation• A set of mapping rules are defined and then executed

– Ontology Mapping Language

• Initially rules are defined semi-automatic• Create for each source instance the target instance(s)

Target Ontology

Source Ontology

Storage

Mappings

Mappings

Source Instance

Target Instance

Run-time ComponentDesign-time Component

Data Mediation

Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Conceptual Model – WSMX ComponentsData Mediation

Page 37: © Copyright 2010 Dieter Fensel and Srdjan Komazec

37

Design-time

– Inputs• Source Ontology and Target

Ontology

– Features• Graphical interface• Set of mechanism towards semi-

automatic creation of mappings• Capturing the semantic

relationships identified in the process

• Storing these mappings in a persistent storage

– Output• Abstract representation of the

mappings

Run-time– Main Mediation Scenario:

Instance Transformation – Inputs

• Incoming data– Source ontology instances

– Features• Completely automatic process• Grounding of the abstract

mappings to a concrete language– WSML

• Uses reasoner to evaluate the mapping rules

– Outputs• Mediated data

– Target ontology instances

Conceptual Model – WSMX ComponentsData Mediation

Page 38: © Copyright 2010 Dieter Fensel and Srdjan Komazec

38

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

namespace { _"http://deri.org/iswc2005tutorial/ontologies/travel1#"}

ontology travel1

concept ticket

type ofType _string

departure_city ofType _string

departure_code ofType _string

arrival_city ofType _string

arrival_code ofType _string

departure_date ofType date

arrival_date ofType date

departure_time ofType time

arrival_time ofType time

issuing_terms ofType terms

firstName ofType _string

lastName ofType _string

...

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

namespace { _"http://deri.org/iswc2005tutorial/ontologies/travel2#"}

ontology travel2

concept travelVoucher

type ofType _string

bearer ofType name

toFrom ofType tripPoints

departureDate ofType date

arrivalDate ofType date

departureTime ofType time

arrivalTime ofType time

terms ofType payment

deliveryDate ofType date

...

Source ontology Destination ontology

Conceptual Model – WSMX ComponentsData Mediation - Example

Page 39: © Copyright 2010 Dieter Fensel and Srdjan Komazec

39

Conceptual Model – WSMX ComponentsData Mediation – Example – WSMT Mappings

Page 40: © Copyright 2010 Dieter Fensel and Srdjan Komazec

40

<Alignment>

<dc:identifier rdf:resource="m2"/>

<onto1>

<formalism name="WSML" uri="http://www.wsmo.org/wsml"/><uri>http://deri.org/iswc2005tutorial/ontologies/travel1#travel1</uri>

</onto1>

<onto2>

<formalism name="WSML" uri="http://www.wsmo.org/wsml"/><uri>http://deri.org/iswc2005tutorial/ontologies/travel2#travel2</uri>

</onto2>

<map>

<Cell id="http://deri.org/iswc2005tutorial/ontologies/travel1#tickethttp://deri.org/iswc2005tutorial/ontologies/travel2#travelVoucher">

<entity1>

<Class rdf:about="http://deri.org/iswc2005tutorial/ontologies/travel1#ticket"></Class>

</entity1>

<entity2>

<Class rdf:about="http://deri.org/iswc2005tutorial/ontologies/travel2#travelVoucher"></Class>

</entity2>

<measure>1.0</measure>

<relation>ClassMapping</relation>

</Cell>

</map>

</Alignment>

Mapping between two concepts

Conceptual Model – WSMX ComponentsData Mediation - Example

Page 41: © Copyright 2010 Dieter Fensel and Srdjan Komazec

41

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

namespace { _"http://deri.org/iswc2005tutorial/ontologies/travel1#”}

ontology travel1

instance my_ticket_input memberOf ticket

type hasValue "flight"

firstName hasValue "Adrian"

lastName hasValue "Mocan"

arrival_date hasValue my_arrival_date

departure_date hasValue my_departure_date

arrival_time hasValue my_arrival_time

departure_time hasValue my_departure_time

departure_city hasValue "Innsbruck"

departure_code hasValue "INN"

arrival_city hasValue "Rome"

arrival_code hasValue "RO"

issuing_terms hasValue my_terms

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

namespace { _"http://deri.org/iswc2005tutorial/ontologies/travel2#"}

ontology travel2

instance expected_travelVoucher memberOf travelVoucher

departureDate hasValue expected_departureDate

terms hasValue expected_payment

arrivalDate hasValue expected_arrivalDate

bearer hasValue expected_name

departureTime hasValue expected_departureTime

arrivalTime hasValue expected_arrivalTime

type hasValue "flight"

Source instances Destination instances

Conceptual Model – WSMX ComponentsData Mediation - Example

Page 42: © Copyright 2010 Dieter Fensel and Srdjan Komazec

42

Technical SolutionConceptual Model – WSMX ComponentsProcess Mediation

Page 43: © Copyright 2010 Dieter Fensel and Srdjan Komazec

43

• Requester and provider have their own communication patterns • Only if the two match precisely, a direct communication may take

place• At design time equivalences between the choreographies’

conceptual descriptions is determined and stored as set of rules• The Process Mediator provides the means for runtime analyses of

two choreography instances and uses mediators to compensate possible mismatches

Conceptual Model – WSMX ComponentsProcess Mediation*

* Not implemented yet!

Page 44: © Copyright 2010 Dieter Fensel and Srdjan Komazec

44

Business Partner1Business Partner1

Business Partner2Business A

B B

Business Partner1Business Partner1

Business Partner2Business Partner2

A B

B A

Business Partner1Business Partner1

Business Partner2Business Partner2

A and BA

B

Business Partner1Business Partner1

Business Partner2Business Partner2

A

BA and B

PM

PM

PM

PM

Business Partner1Business Partner1

Business Partner2Business Partner2

A

AckA

APM

Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Conceptual Model – WSMX ComponentsProcess Mediation

Page 45: © Copyright 2010 Dieter Fensel and Srdjan Komazec

45

• Not a priori compatible behavior interfaces for communication & information interchange

• Partially resolvable by “process mediation patterns”

Figure taken from Emilia Cimpian, D13.7 v0.1 Process Mediation in WSMX, WSMX Working Draft 08 July 2005

Conceptual Model – WSMX ComponentsProcess Mediation - Example

Page 46: © Copyright 2010 Dieter Fensel and Srdjan Komazec

46

Conceptual Model – WSMX ComponentsProcess Mediation - Example

Page 47: © Copyright 2010 Dieter Fensel and Srdjan Komazec

47

Technical SolutionConceptual Model – WSMX ComponentsChoreography

Page 48: © Copyright 2010 Dieter Fensel and Srdjan Komazec

48

• Requester and provider have their own observable communication patterns– Choreography part of WSMO

• Choreography instances are loaded for the requester and provider– Both requester and provider have their own WSMO descriptions

• Abstract State Machines (ASM)-based Choreography Engine– Evaluation of transition rules

• prepares the available data

– Sends data to the Process Mediator• filters, changes or replaces data

– Receives data from PM and forwards it to the Communication manager• data to be finally sent to the communication partner

Conceptual Model – WSMX ComponentsChoreography

Page 49: © Copyright 2010 Dieter Fensel and Srdjan Komazec

49

• The model used to express typical characteristics of a choreography must be compliant to the following features:

– Abstract – hides away any details regarding the underlying message exchange protocols and message formats,

– State-based – the interactions are described in the form of updates on a state of the choreography,

– Expressive – allows describing features such as sequences of message interactions and branching, and

– Ontology Reliance – ontologies are used as the underlying data model for message exchanges.

• The abstract state model chosen to address the requirements is inspired by the Abstract State Machines (ASM) methodology.

Conceptual Model – WSMX ComponentsChoreography – Abstract State Machines

Page 50: © Copyright 2010 Dieter Fensel and Srdjan Komazec

50

• The choreography model consists primarily of– state signature – defines ontology which is used by the choreography,– set of transition rules – express the interaction steps in the choreography and also the updates

over the state.

• State signature allows to define– Set of imported ontologies– Set of modes which are associated with the concepts and/or relations.

• Modes can be of the following types:– static – extension of the concept/relation cannot be changed,– in - extension of the concept/relation can only be changed by the client and read by the

choreography instance; grounding mechanism must be provided.– out - extension of the concept/relation can only be changed by the the choreography instance and

read by the client; grounding mechanism must be provided.– shared - extension of the concept/relation can be changed and read by both choreography

instance and client; grounding mechanism must be provided, and– controlled - extension of the concept/relation is changed and read only by the choreography

instance.

Conceptual Model – WSMX ComponentsChoreography – Abstract State Machines

Page 51: © Copyright 2010 Dieter Fensel and Srdjan Komazec

51

• Transition rules define actual behavior of the choreography.

• The rules can take the form of– if Condition then Rules endIf – if the condition holds executes the updates.– forall Variables with Condition do Rules endForall - simultaneous execution of

updates for each binding of a variable satisfying a given condition.– choose Variables with Condition do Rules endChoose - executes an update with an

arbitrary binding of a variable chosen among those satisfying the selection condition.

, where– condition (guard) - is an arbitrary logical expression as defined by WSML,– rules - may take the form of Updates, whose execution is to be understood as

changing (or defining, if there was none) instances in an ontology• add – adds new instances in the state ontology,• delete – deletes instances from the state ontology, and• update – updates instances in the state ontology.

Conceptual Model – WSMX ComponentsChoreography – Abstract State Machines

Page 52: © Copyright 2010 Dieter Fensel and Srdjan Komazec

52

WSMX ComponentsChoreography - Example

choreography WSMullerShipmentOrderChoreography

stateSignature WSMullerShipmentOrderStateSignature

in sop#ShipmentOrderReq withGrounding { _"http://sws-challenge.org/shipper/v2/muller.wsdl#wsdl.interfaceMessageReference(muller/ShipmentOrder/in0)"}

in so#ContactInfo

in so#ShipmentDate

in so#Package

in so#Address

out sop#ShipmentOrderResp

transitionRules WSMullerShipmentOrderTransitionRules

forall {?request} with

(?request memberOf sop#ShipmentOrderReq)

do

add(_#1 memberOf sop#ShipmentOrderResp)

delete(?request memberOf sop#ShipmentOrderReq)

endForall

<shipmentOrderReq(soi#MoonContactInfo, soi#shipmentDate1, package, soi#SzyslakContactInfo), package(1, 7.0, 6.0, 4.0, 1.0), shipmentDate1(“2009-01-21T13:00:00.046Z”, "2009-01-22T13:00:00.046Z")>

<shipmentOrderResp(“2009-01-21T15:00:00.046Z”, 65.03), package(1, 7.0, 6.0, 4.0, 1.0), shipmentDate1(“2009-01-21T13:00:00.046Z”, "2009-01-22T13:00:00.046Z")>

S1

S2

Page 53: © Copyright 2010 Dieter Fensel and Srdjan Komazec

53

Technical SolutionConceptual Model – WSMX ComponentsResource Manager

Page 54: © Copyright 2010 Dieter Fensel and Srdjan Komazec

54

• Stores internal memory model to a data store• Decouples storage mechanism from the rest of WSMX• Data model is compliant to WSMO API• Independent of any specific data store implementation i.e. database

and storage mechanism• Maintains six repositories to store

– WSMO top level entities, i.e. • Goals,• Web Service descriptions,• Mediators, and• Ontologies.

– Event data and intermediate messages

– WSDL descriptions

Conceptual Model – WSMX ComponentsResource Manager

Page 55: © Copyright 2010 Dieter Fensel and Srdjan Komazec

55

Technical SolutionConceptual Model – WSMX ComponentsReasoners

Page 56: © Copyright 2010 Dieter Fensel and Srdjan Komazec

56

• Different components within WSMX necessitate efficient and different reasoning functionality:

– Discovery• Simple ontological reasoning and query answering as well as logical entailment between

preconditions and postconditions of SWS and Goals

• Both description logic-based and logic programming–based reasoning is required.

– Selection• Evaluation of the logical rules that are used to model the non-functional properties of services

• Logic programming–based reasoning is required.

– Data mediation• Ontology mapping rules, source instances and source and target schema information are loaded into

the reasoning space where rules are evaluated in order to produce target instances.

• Logic programming–based reasoning is required.

– Process Mediation• Reasoning is used to check whether messages are expected at the certain phase of the

communication.

• Evaluation of transition rules is required.

• Different reasoning functionality is provided to WSMX through WSML2Reasoning framework.

Conceptual Model – WSMX ComponentsReasoners

Page 57: © Copyright 2010 Dieter Fensel and Srdjan Komazec

57

• Represents a generic, flexible architecture for reasoning with the different variants of the WSML family.

• Instead of implementing new reasoners it uses existing reasoner implementations for WSML through a wrapper that

1) maps WSML expressions into a common (shared) knowledge representation format (different formats for the rule-based and description logic based WSML variants), and

2) maps the expressions via specific adapters into the appropriate syntaxes of concrete reasoning engines.

• People can use their specific existing reasoner of choice and can exploit already developed, proven and tested reasoning systems.

Conceptual Model – WSMX ComponentsReasoners - WSML2Reasoner Framework

Page 58: © Copyright 2010 Dieter Fensel and Srdjan Komazec

58Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Conceptual Model – WSMX ComponentsReasoners - WSML2Reasoner Framework

Page 59: © Copyright 2010 Dieter Fensel and Srdjan Komazec

59

• Reasoning with rule-Based WSML– Covers WSML-Core, WSML-Flight, and WSML-Rule

• Supported through semantics-preserving syntactic transformation of WSML ontologies to Datalog programs with (in)equality and integrity constrains.

– Axiomatization – conversion of conceptual elements into appropriate axioms,– Normalization – reduction of complexity by bringing the expressions closer to the

simple syntactic form of literals in Datalog rules– Lloyd-Topor transformation – flattening of the remaining complex WSML logical

expressions in order to produce simple rules (single head and conjunctive – possibly negated - body literals).

– Datalog rule generation – All WSML logical expressions are transformed into a Datalog program

• Supported reasoning tasks– Query answering, ontology consistency, entailment, retrieval

Conceptual Model – WSMX ComponentsReasoners - WSML2Reasoner Framework

Page 60: © Copyright 2010 Dieter Fensel and Srdjan Komazec

60

Conceptual Model – WSMX ComponentsReasoners - WSML2Reasoner Framework

• Reasoning WSML-DL

• Supported through semantics-preserving syntactic transformation of WSML-DL ontologies to OWL-DL ontologies.

– Relations to attributes – replacing relations, subrelations, and relation instances by attributes and axioms,

– Axiomatization - conversion of conceptual elements into appropriate axioms,– Implication reduction rules – replacing equivalences and right implications in logical

expressions by left implications,– Inverse implication reduction rules – replace conjunctions on the left side and

disjunctions on the right side of an inverse implication by left implications,– Molecule decomposition rules – replace complex molecules inside logical expressions

by conjunctions of cimple ones, and – OWL API transformation – each logical expression is translated into the

corresponding OWL descriptions

• Supported reasoning tasks– Knowledge base consistency, concept satisfiability, concept subsumption, instance

checking, realization, instance retrieval

Page 61: © Copyright 2010 Dieter Fensel and Srdjan Komazec

61

Technical SolutionConceptual Model – Entry Points

Page 62: © Copyright 2010 Dieter Fensel and Srdjan Komazec

62

• Represent input ports to which messages can be sent for initiating specific execution semantics.

• Published as SOAP Endpoints

– getWebServices(WSMLDocument): Web Services• A service requester wishes to discover a list of SWS fulfilling its requirements provided by as a

goal description using WSML.• A set of WSML Web Service descriptions whose capability matches the goal is returned.

– invokeWebService(WSMLDocument, Context): Context• Used to invoke already known Semantic Web Service by relying on data provided in the form

of WSML ontology and conversation context.

– achieveGoal(WSMLDocument): Context• A service requester wishes to use WSMX for all aspects of goal-based service invocation

(discovery, mediation, invocation) by providing both goal and data in the single WSML document.

• Processing of the message is identified by the conversation context .

Conceptual Model – Entry Points

Page 63: © Copyright 2010 Dieter Fensel and Srdjan Komazec

63

Technical SolutionBehavioral Model

Page 64: © Copyright 2010 Dieter Fensel and Srdjan Komazec

64

Behavioral ModelExecution Semantics

• Execution Semantics is a formal description of the operational behavior of the system in terms of computational steps

• The benefits of having behavioral models are in– Greater flexibility in SESA implementations,– Foundations for model testing,– Executable representation, and – Improved model understanding among humans.

• Mandatory execution semantics– Goal-Based Web Service Discovery– Web Service Invocation– Goal-Based Service Execution

Page 65: © Copyright 2010 Dieter Fensel and Srdjan Komazec

65Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Behavioral ModelExecution Semantics – Goal-based discovery

Page 66: © Copyright 2010 Dieter Fensel and Srdjan Komazec

66

• Input– Service requester wishes to discover a list of SWS fulfilling its requirements provides

them as a goal description using WSML.

• Output– A set of WSML Web Service description whose capability matches the goal is

returned.

• Process1. Message containing WSML goal is received and passed to the communication

manager, which takes care of message persistence.

2. The goal is sent to discovery activity which evaluates whether a WSML Web service from the repository is capable of fulfilling the goal. It may need data mediation as its internal step.

3. The selection activity may be triggered to determine which of the discovered services to return to the service requester.

4. WSML Web service description is returned in a form of message to the requester by relying on the Communication Manager facilities.

Behavioral ModelExecution Semantics – Goal-based discovery

Page 67: © Copyright 2010 Dieter Fensel and Srdjan Komazec

67Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Behavioral ModelExecution Semantics – Web Service Invocation

Page 68: © Copyright 2010 Dieter Fensel and Srdjan Komazec

68

• Input– As input the requester is providing WSML content (Web service + data) and conversation

context (if known!!! The first message is sent without it, but it is returned as output of the invocation).

• Output– Results of the Web Service invocation (and possibly conversational context)

• Process 1. Communication Manager unpacks the content and retrieves Web service and data.

2. Data mediation may be required in cases where heterogeneities exists (this step can internally use reasoner)

3. Process mediation has all the required data to commence (matching the message patterns and data types offered by SWS and required by the goal). This is a process of aligning of input data instances so that they can be understood by the Choreography.

4. The choreography activity is commencing (determines which messages to send on the basis of choreography descriptions - ASM).

5. Grounding is taking place in order to transform those instances to the format required by the invoked service.

6. Invocation takes place

Behavioral ModelExecution Semantics – Web Service Invocation

Page 69: © Copyright 2010 Dieter Fensel and Srdjan Komazec

69Fensel, D.; Kerrigan, M.; Zaremba, M. (Eds): Implementing Semantic Web Services: The SESA Framework. Springer 2008.

Behavioral ModelExecution Semantics – Goal-based Service Execution

Page 70: © Copyright 2010 Dieter Fensel and Srdjan Komazec

70

• Service requester wishes to employ the complete SWS lifecycle, i.e., all aspects of goal-based service invocation (discovery, mediation, invocation)

• Input– Requester provides both the goal and the input data descriptions in a single WSML

document.

• Output– Results of the Web Service invocation (if any).

• Operation1. Execute the Goal-based Web Service discovery execution semantics

2. In case of more than one result run the selection process in order to determine the Web Service which is the most appropriate for the execution (based on non-functional properties and employed selection mechanisms)

3. Execute the Web Service Invocation execution semantics

Behavioral ModelExecution Semantics – Goal-based Service Execution

Page 71: © Copyright 2010 Dieter Fensel and Srdjan Komazec

71

Illustration by a Larger Example

Page 72: © Copyright 2010 Dieter Fensel and Srdjan Komazec

72

Illustration by larger exampleScenario description

• The goal is to discover a suitable solution for the transportation of a package with defined size and weight

• Candidate Web Services have different constraints regarding the transportation destinations, package size and weight acceptance, as well as pricing schemas

• For more information visit:– http://sws-challenge.org/wiki/index.php/Scenario:_Shipment_Discovery

Page 73: © Copyright 2010 Dieter Fensel and Srdjan Komazec

73

Illustration by larger exampleGoal description

wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"

goal GoalA1

capability GoalA1Capability postcondition definedBy ( ?x[sop#price hasValue ?price] memberOf sop#PriceQuoteResp and sop#isShipped(shipmentOrderReq) ). interface GoalA1Interface choreography GoalA1Choreography stateSignature GoalA1StateSignature

in sop#ShipmentOrderReq out sop#ShipmentOrderResp

transitionRules GoalA1TransitionRules

forall {?request} with (?request memberOf sop#ShipmentOrderReq) do add(_#1 memberOf sop#ShipmentOrderResp) endForall

ontology GoalRequest

instance shipmentOrderReq memberOf sop#ShipmentOrderReq sop#from hasValue soi#MoonContactInfo sop#shipmentDate hasValue soi#shipmentDate1 sop#package hasValue package sop#to hasValue soi#SzyslakContactInfo

instance package memberOf so#Package so#quantity hasValue 1 so#length hasValue 7.0 so#width hasValue 6.0 so#height hasValue 4.0 so#weight hasValue 1.0

instance shipmentDate1 memberOf so#ShipmentDate so#earliest hasValue "2009-01-21T13:00:00.046Z" so#latest hasValue "2009-01-22T13:00:00.046Z"

I want to have my package shipped from CA, USA to Tunis, Africa size (7/6/4), weight 1 lbs, the cheaper the better.

Page 74: © Copyright 2010 Dieter Fensel and Srdjan Komazec

74

Illustration by larger exampleAchieveGoal execution semantics

Page 75: © Copyright 2010 Dieter Fensel and Srdjan Komazec

75

Illustration by larger exampleAchieveGoal execution semantics

Goal expressedin WSML is sent to theWSMX Entry Point

Page 76: © Copyright 2010 Dieter Fensel and Srdjan Komazec

76

Illustration by larger exampleAchieveGoal execution semantics

Communication Manager instantiates AchieveGoalExecution Semantics

Page 77: © Copyright 2010 Dieter Fensel and Srdjan Komazec

77

Illustration by larger exampleAchieveGoal execution semantics

Discovery is employedin order to find suitableWeb Service

Discovery consults appropriateontologies and Web Service descriptions

Web Service may be invoked in order to discover serviceavailability

Africa ($85.03/13 lbs), ...

Max 50 lbs. Price = $85.03

Africa, ... Max 50 lbs.

Price on request only.

Ships only to US ($10/1.5 lb).

Cannot be used for Africa.

PriceReq

Price ($65.03)

Page 78: © Copyright 2010 Dieter Fensel and Srdjan Komazec

78

Illustration by larger exampleAchieveGoal execution semantics

List of candidate WebServices is ranked and best” solution is selected

Page 79: © Copyright 2010 Dieter Fensel and Srdjan Komazec

79

Illustration by larger exampleAchieveGoal execution semantics

Requester and provider choreographies areinstantiated and processed

Invocation of WebService occurs

Page 80: © Copyright 2010 Dieter Fensel and Srdjan Komazec

80

Illustration by larger exampleAchieveGoal execution semantics – choreography exec

choreography WSMullerShipmentOrderChoreography

stateSignature WSMullerShipmentOrderStateSignature

in sop#ShipmentOrderReq withGrounding { _"http://sws-challenge.org/shipper/v2/muller.wsdl#wsdl.interfaceMessageReference(muller/ShipmentOrder/in0)"}

in so#ContactInfo

in so#ShipmentDate

in so#Package

in so#Address

out sop#ShipmentOrderResp

transitionRules WSMullerShipmentOrderTransitionRules

forall {?request} with

(?request memberOf sop#ShipmentOrderReq)

do

add(_#1 memberOf sop#ShipmentOrderResp)

delete(?request memberOf sop#ShipmentOrderReq)

endForall

<shipmentOrderReq(soi#MoonContactInfo, soi#shipmentDate1, package, soi#SzyslakContactInfo), package(1, 7.0, 6.0, 4.0, 1.0), shipmentDate1(“2009-01-21T13:00:00.046Z”, "2009-01-22T13:00:00.046Z")>

<shipmentOrderResp(“2009-01-21T15:00:00.046Z”, 65.03), package(1, 7.0, 6.0, 4.0, 1.0), shipmentDate1(“2009-01-21T13:00:00.046Z”, "2009-01-22T13:00:00.046Z")>

S1

S2

Page 81: © Copyright 2010 Dieter Fensel and Srdjan Komazec

81

Illustration by larger exampleAchieveGoal execution semantics

Result is returned to the client in the form ofWSML message

Page 82: © Copyright 2010 Dieter Fensel and Srdjan Komazec

82

Possible Extensions

Page 83: © Copyright 2010 Dieter Fensel and Srdjan Komazec

83

Possible Extensions

Extensions under current development are marked with yellow boxes.

Page 84: © Copyright 2010 Dieter Fensel and Srdjan Komazec

84

Possible ExtensionsDiscovery

• Discovery component has undergone a set of smaller improvements:– Instead of full Semantic Web Service descriptions the results are returned in the form

of WG mediators.– Caching of the discovery results, i.e., WG mediators.

• WG mediators are allowing us to– Connect Goal descriptions with the Semantic Web Service descriptions,– Attach discovery (e.g., type of match) and ranking results (e.g., fitness of the service).

• Caching of the results enables reductions of the computational time required for discovery when the same Goal is issues multiple times over the same set of SWS descriptions.

Page 85: © Copyright 2010 Dieter Fensel and Srdjan Komazec

85

• WSMX can be viewed as a vibrant events producer– events related to the broker services execution,– events related to the external Web Service invocations,– events related to the progress of processed execution semantics.

• The events represent a rich source of knowledge which can facilitate profiling, optimization and reliability of the environment.

• The monitoring and complex event processing subsystem exhibits following behavior

– WSMX components have been instrumented to emit appropriate semantically-described events in regard to the computational process progress,

– RDF-based CEP engine detects occurrences of specified event patterns and executes the appropriate actions de- fined for the detected event (e.g. update of the aggregated statistical measures, notification of the administrator about the successive operation failures)

Possible ExtensionsMonitoring and Complex Event Processing

Page 86: © Copyright 2010 Dieter Fensel and Srdjan Komazec

86

• Notification Broker enables asynchronous communication within WSMX• The broker provides following functionality

– registering and storing user goal-descriptions and related results, and– notifying subscribed users of the related results.

• The broker currently supports the subscription to the goal-based Web Service discovery through a new entry point which fires the execution semantics responsible for

– checking for the existing (and not expired) user subscriptions,– executing for each subscribed goal the discovery process, and– once new services have been matched with respect to the previous subscriptions

these newly discovered services are notified to the users.

• The notification can employ two communication channels– Email notification, and– Web Service invocation.

Possible ExtensionsNotification Broker

Page 87: © Copyright 2010 Dieter Fensel and Srdjan Komazec

87

• Orchestration Engine features are– support of the dataflow in a manner consistent with WSMO/L, and– Adoption of the explicit concept of performance, and introduction of a new type of

mediator to mediate between performances.

• Orchestration Engine solves following issues– mediation in any connection, including dataflow, between heterogeneous

components;– extraction and aggregation in the consumption and production of messages according

to the WSML grounding approach– execution of service discovery and service invocation within composed services.

Possible ExtensionsOrchestration

Page 88: © Copyright 2010 Dieter Fensel and Srdjan Komazec

88

Summary

Page 89: © Copyright 2010 Dieter Fensel and Srdjan Komazec

89

Summary

• Clear separation of SWS, SESA, SEE and WSMX notions.• WSMX is reference implementation of WSMO.• WSMX contributes to solving scalability issues by automating various

service-related tasks.• WSMX consists of various components dedicated to solving particular

steps in the overall service life cycle orchestrated by Core Management.• Execution semantics is a formal description of the operational behavior

of the system in terms of computational steps

Page 90: © Copyright 2010 Dieter Fensel and Srdjan Komazec

90

References

Page 91: © Copyright 2010 Dieter Fensel and Srdjan Komazec

91

References

• Mandatory reading– Dieter Fensel, Mick Kerrigan, Michal Zaremba (Eds.), Implementing Semantic Web

Services: The SESA Framework. Springer-Verlag, 2008.• Chapters 4,5, and 6.

• Optional reading– Charles Petrie, Tiziana Margaria, Holger Lausen, Michal Zaremba (Eds.), Semantic

Web Services Challenge: Results from the First Year. Springer-Verlag, 2008

• Online resources:– http://see.sti-innsbruck.at– http://sws-challenge.org

Page 92: © Copyright 2010 Dieter Fensel and Srdjan Komazec

92

Next Lecture

# Title

1 Introduction

2 Web Science

3 Service Science

4 Web services

5 Web2.0 services

6 Semantic Web

7 Web Service Modeling Ontology (WSMO)

8 Web Service Modeling Language (WSML)

9 Web Service Execution Environment (WSMX)

10 OWL-S and others

11 Light-weight Annotations

12 Applications

13 Mobile Services

Page 93: © Copyright 2010 Dieter Fensel and Srdjan Komazec

93

Questions?