web services over the grid - wsrf -

79
Workflows over Grid-based Web services General framework and a practical case in structural biology Web Services over the Grid - WSRF - Enrique de Andrés Saiz

Upload: joan-nelson

Post on 04-Jan-2016

40 views

Category:

Documents


0 download

DESCRIPTION

Web Services over the Grid - WSRF -. Enrique de Andrés Saiz. Outline. Generic Web Services problem Web Services Resource Framework (WSRF) WS-Addressing Faults Declaring WS-Resource properties Operations over WS-Resource properties WS-Resource lifetime Grouping services - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Web Services over the Grid - WSRF -

Workflows over Grid-based Web servicesGeneral framework and a practical case in structural biology

Web Services over the Grid- WSRF -

Enrique de Andrés Saiz

Page 2: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 2

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 3: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 3

Generic Web Services problem

• Generic Web Services are limited by the timeouts of the servers that hosts them:– It is not possible to run long time operations

• Solution:– Provide asynchronous behavior to the operations of Web Services.

• Requirements:– Any kind of data persistence between invocations to the same instance

of a Web Service.– A way to uniquely identify instances of Web Services.

• Generic Web Services are stateless… they don’t accomplish these requirements.

Page 4: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 4

Example

• Imagine we have a Web Service with operations that:– Require a lot of time to be executed– Require valid credentials to execute them

myOp

OutputsInputs

username

password

……

username

password

username

passwordmyOp_result

Inputs Outputs

…myOp_status

Inputs Outputs

myOp_submit

Inputs

username

password

Outputs

id

Page 5: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 5

Example

username

passwordcreateSession

Inputs Outputs

username

password

username

passwordmyOp_result

Inputs Outputs

…id

username

password

myOp_submit

Inputs Outputs

myOp_result

Inputs Outputs

id

myOp_status

Inputs Outputs

Page 6: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 6

Solving the problem…

• Approach 1:– Your own solution as the previous example.– Problems:

• Using a parameter for identifying the instance of the Web Services.• No very clear how to get data persistence.

• Approach 2:– USING STANDARS.

• WSRF (Web Services Resources Framework) defines a generic framework for modeling and accessing persistent resources using Web Services:– It makes easier the definition and implementation of a service and the

integration and management of multiple services

Page 7: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 7

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 8: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 8

Web Services Resource Framework, WSRF

• WSRF is an OASIS standard that can be used to implement interoperable stateful web-services.

• WSRF is a set specifications that define what is termed the WS-Resource approach to modeling and managing state in a Web services context.

• WSRF uses the W3C standard WS-Addressing to achieve transport-neutral addressing for web-services.

Page 9: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 9

Web Services Resource Framework, WSRF

• The central element of WSRF standard is the concept of WS-Resource.

• A WS-Resource is the logical entity which stores (persistent) information:– A WS-Resource has defined resource properties:

• A resource property is a piece of information defined as part of the state model of a WS-Resource.

– A WS-Resource can be accessed through defined message exchanges or operations for:

• Accessing resource properties.• Interact with the WS-Resource lifetime.

• A WS-Resource is associated to a Web Service instance.– When creating a new service instance, a new WS-Resource is created.– WSRF uses WS-Addressing specification for uniquely identify a WS-Resource

(or a Web Service instance).• A reference to a WS-Resource is represented by an endpoint reference (EPR).

Page 10: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 10

Example

• We have a shopping carts that store one product (WS-Resource) per cart.• A product (WS-Resource) have defined a set of properties (WS-Resource

Properties):– ProductCode– Description– Quantity– ProductPrice

• It is possible to interact with the properties of the product (Operations over WS-Resource Properties).

• It is possible to delete a shopping cart (Operations over WS-Resource Lifetime).

Simple shopping service example

Page 11: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 11

Using WSRF for the Grid

• One WS-Resource corresponds to one job on the Grid

• WS-Resource properties:– Input data/parameters of the job (or the application executed by the job).– Output data of the job.– Any other data required.

• WS-Resource operations:– Operations over the resource properties.– Operations over the resource lifetime.– Other specific operations for the Grid.

• Grid requirements:– All operations over the Grid must be executed as an authenticated user in the User

Interface.– Operation mode must be asynchronous (edg-job-submit, edg-job-status, edg-jog-get-

output).– It is not necessary to create an asynchronous behavior, only move it from the Grid to the

WSRF services.

Page 12: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 12

Simple Hello World Grid WSRF service

username password

stdout

Grid Hello WorldWS-Resource

myName status response

createResource(username, password)

EPR – Resource ID

SetResourceProperty(myName)

submitJob()

GetResourceProperty(status)

collectResults()

GetMultipleResourceProperties(stdout, stderr, response)

Destroy()

stderr

username password

stdout

myName status response

stderr

Page 13: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 13

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 14: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 14

WS-Addressing

• The key concept in WS-Addressing is the Endpoint Reference (EPR):– An EPR is a URL wrapped by some XML elements which represents the location

of a Web Service:– An EPR allows to include additional information in a SOAP request that helps

uniquely identify a Web Service instance– EPR’s are used by WSRF for representing references to WS-Resources.

• EPR’s vs. URL’s. Why EPR’s are necessary?– Appending something like ?resourceID=123 to the URL is not very SOAP-ish.– It’s better to use additional SOAP headers.

• Web Service specific data is not bound to one specific transport protocol.

• Web Service specific data is all inside the SOAP envelope (not in different levels, one at the transport level and other at SOAP level).

Page 15: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 15

WS-Addressing

• Endpoint Reference format:– wsa:Address

• Specifies the URL that should be used when trying to talk to the Web Service.

– wsa:ReferenceProperties• Encapsulates all Web service-specific data (reference properties), such as a

session identifier, an instance identifier or a resource identifier.

<widget:myLocationEPR>

<wsa:Address>http://localhost/WidgetService</wsa:Address>

<wsa:ReferenceProperties> <widget:resourceID>123</widget:resourceID> </wsa:ReferenceProperties>

</widget:myLocationEPR>

Page 16: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 16

WS-Addressing

• An EPR should be returned at some point of a Web Service:– When creating an instance to the Web Service.

– Asking for a pointer to an instance to the Web Service.

<soap:Envelope...> <soap:Body> <widget:createWidgetResponse...>

<widget:widgetReference> <wsa:Address>http://host/WidgetService</wsa:Address> <wsa:ReferenceProperties> <widget:resourceID>123</widget:resourceID> </wsa:ReferenceProperty> </widget:widgetReference>

</widget:createWidgetResponse> </soap:Body></soap:Envelope>

Page 17: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 17

WS-Addressing

• Subsequent invocations to the instance of a Web Service referred by an EPR must integrate the information of that EPR in the SOAP header:

• wsa:To– SOAP message information header which indicates the target Web Service’s

URL.– It should be the same value as the wsa:Address element of the associated EPR.

<soap:Envelope...>

<soap:Header> <wsa:To> http://host/WidgetService </wsa:To> <widget:resourceID>123</widget:resourceID> </soap:Header>

<soap:Body> ... </soap:Body></soap:Envelope>

Page 18: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 18

WS-Addressing

• Other SOAP message information headers:– wsa:From

• Indicates the EPR of the message's sender.• If the message's receiver needs to send a message back to the endpoint

that sent the message, then it should use this EPR.

– wsa:ReplyTo• Indicates the EPR to where the response message should go.

<wsa:From> <wsa:Address> http://client/myClient </wsa:Address></wsa:From>

<wsa:ReplyTo> <wsa:Address> http://client/myReceiver </wsa:Address></wsa:ReplyTo>

Page 19: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 19

WS-Addressing

• …other SOAP message information headers:– wsa:FaultTo:

• Indicates the EPR to where a fault should go if the response to a message is a SOAP fault.

– wsa:MessageID:• Is a URI that uniquely identifies a message.

– wsa:Action:• Makes reference to the operation that must be carried out.

<wsa:FaultTo> <wsa:Address> http://client/FaultCatcher </wsa:Address></wsa:FaultTo>

<wsa:MessageID>uuid:098765</wsa:MessageID>

<wsa:Action> http://host/widgetOp </wsa:Action>

Page 20: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 20

WS-Addressing

• …other SOAP message information headers:– wsa:RelatesTo:

• Is used on response messages to indicate that it is related to a previously-known message and to define that relationship.

• In all of the headers that either contain an Address element or are, like the To header, an address themselves, you can use a special anonymous URI:– http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous

– Indicates that there is no real endpoint available for this address.

<wsa:RelatesTo RelationshipType="wsa:Response"> uuid:098765</wsa:RelatesTo>

Page 21: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 21

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 22: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 22

Base faults

• WSRF defines a set of rules for exchanging faults messages through WS-BaseFaults specification.

• WS-BaseFaults defines a XML schema type for a base fault.

• The base fault has the following syntax:

<BaseFault> {any}* <Timestamp>xsd:dateTime</Timestamp> <OriginatorReference> wsa:EndpointReferenceType </OriginatorReference> ? <ErrorCode dialect="anyURI">xsd:anyType</ErrorCode> ? <Description>xsd:string</Description> * <FaultCause>{any}</FaultCause> ?</BaseFault>

Page 23: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 23

Faults

• All faults must use the following URI inside the wsa:Action – http://docs.oasis-open.org/wsrf/fault

• A WSRF service supports the following base faults:– ResourceUnknownFault

• The resource identified in the message is not known to the Web service.

– ResourceUnavailableFault • The resource identified in the message is unavailable.

Page 24: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 24

Faults

Example SOAP 1.1 Encoding of a Base Fault

Page 25: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 25

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 26: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 26

Declaring WS-Resource Properties

• One characteristic of a WS-Resource is the set of properties associated with the resource.

• The definition of the properties of a WS-Resource MAY be declared as part of a Web Service interface:– The declaration of the WS-Resource’s properties represents a

projection of a view of the WS-Resource’s state.

– This projection is defined in terms of a resource properties document:

• The resource properties document definition is associated with a Web service WSDL portType in the following manner:<wsdl:defintions …> <wsdl:portType … wsrf-rp:ResourceProperties=”xsd:QName”? … > …</wsdl:portType>

Page 27: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 27

Declaring Resource Properties

WSDL example

Page 28: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 28

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 29: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 29

Operations over WS-Resource Properties

• WSFR defines a standard set of message exchanges or operations that allow a requestor to query or update the property values of a WS-Resource:– GetResourcePropertyDocument (optional)

– GetResourceProperty (mandatory)

– GetMultipleResourceProperties (optional)

– QueryResourceProperties (optional)

– PutResourcePropertyDocument (optional)

– SetResourceProperties (optional)

– InsertResourceProperties (optional)

– UpdateResourceProperties (optional)

– DeleteResourceProperties (optional)

Page 30: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 30

GetResourcePropertyDocument

• Allows a requestor to retrieve the values of all resource properties associated with the WS-Resource.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

GetResourcePropertyDocument/GetResourcePropertyDocumentRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

GetResourcePropertyDocument/GetResourcePropertyDocumentResponse

• Faults:– Generic WS-Resource faults.

<wsrf-rp:GetResourcePropertyDocument />

<wsrf-rp:GetResourcePropertyDocumentResponse> {any}</wsrf-rp:GetResourcePropertyDocumentResponse>

Page 31: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 31

GetResourcePropertyDocument

ResponseResource properties document

Request

Page 32: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 32

GetResourceProperty

• Allows a requestor to retrieve the value of a single resource property of a WS-Resource.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/

GetResourcePropertyRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/

GetResourcePropertyResponse

<wsrf-rp:GetResourceProperty> QName</wsrf-rp:GetResourceProperty>

<wsrf-rp:GetResourcePropertyResponse> {any}*</wsrf-rp:GetResourcePropertyResponse>

Page 33: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 33

GetResourceProperty

• Faults:– Generic WS-Resource faults.

– InvalidResourcePropertyQNameFault:• The QName in the request message did not correspond to a resource

property element of the WS-Resource referred to in the request message.

Page 34: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 34

GetResourceProperty

Request

Response

Page 35: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 35

GetMultipleResourceProperties

• Allows a requestor to retrieve the values of multiple resource properties of a WS-Resource.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

GetMultipleResourceProperties/GetMultipleResourcePropertiesResponse

<wsrf-rp:GetMultipleResourceProperties> <wsrf-rp:ResourceProperty>QName <wsrf-rp:ResourceProperty>+</wsrf-rp:GetMultipleResourceProperties>

<wsrf-rp:GetMultipleResourcePropertiesResponse> {any}*</wsrf-rp:GetMultipleResourcePropertiesResponse>

Page 36: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 36

GetMultipleResourceProperties

• Faults:– Generic WS-Resource faults.

– InvalidResourcePropertyQNameFault:• One or more of the QNames in the request message did not correspond to a

resource property element of the WS-Resource referred to in the request message.

Page 37: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 37

GetMultipleResourceProperties

ResponseRequest

Page 38: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 38

QueryResourceProperties

• Allows a requestor to query the resource properties document of a WS-Resource using a query expression such as XPath.

– Supporting XPath dialect is mandatory:• http://www.w3.org/TR/1999/REC-xpath-19991116

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/

QueryResourcePropertiesRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/

QueryResourcePropertiesResponse

<wsrf-rp:QueryResourceProperties> <wsrf-rp:QueryExpression Dialect=”xsd:anyURI”> xsd:any </wsrf-rp:QueryExpression></wsrf-rp:QueryResourceProperties>

<wsrf-rp:QueryResourcePropertiesResponse> {any}</wsrf-rp:QueryResourcePropertiesResponse>

Page 39: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 39

QueryResourceProperties

• Faults:– Generic WS-Resource faults.

– UnknownQueryExpressionDialectFault• The given QueryExpression has a dialect that is unknown to the Web

service.

– InvalidQueryExpressionFault• The given QueryExpression is not valid within the QueryExpression

language identified by the dialect attribute.

Page 40: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 40

QueryResourceProperties

Request

Response

Page 41: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 41

PutResourcePropertyDocument

• Allows a requestor to completely replace the values of a WS-Resource’s properties with an entirely new resource property document.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

PutResourcePropertyDocument/PutResourcePropertyDocumentRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/

PutResourcePropertyDocument/PutResourcePropertyDocumentResponse

<wsrf-rp:PutResourcePropertyDocument> {any}</wsrf-rp:PutResourcePropertyDocument>

<wsrf-rp:PutResourcePropertyDocumentResponse> {any} ?</wsrf-rp:PutResourcePropertyDocumentResponse>

Page 42: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 42

PutResourcePropertyDocument

• Faults:– Generic WS-Resource faults.

– UnableToPutResourcePropertyDocumentFault• The WS-Resource was unable to complete the processing of the

PutResourcePropertyDocument for some reason.

Page 43: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 43

PutResourcePropertyDocument

Response

Request

Page 44: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 44

SetResourceProperties

• Allows the processing of a single request message to make multiple changes to the resource properties document.

• Types of changes:

– Insert:• wherein a new resource property element is inserted into the resource

properties document

– Update:• wherein existing resource property element(s) are modified

– Delete:• wherein existing resource property element(s) are removed

Page 45: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 45

SetResourceProperties

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/

SetResourcePropertiesRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/

SetResourcePropertiesResponse

<wsrf-rp:SetResourceProperties>[ <wsrf-rp:Insert > {any}* </wsrf-rp:Insert> |

<wsrf-rp:Update > {any}* </wsrf-rp:Update> | <wsrf-rp:Delete ResourceProperty=”QName” /> ]+</wsrf-rp:SetResourceProperties>

<wsrf-rp:SetResourcePropertiesResponse></wsrf-rp:SetResourcePropertiesResponse>

Page 46: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 46

SetResourceProperties

• Faults:– Generic WS-Resource faults.

– InvalidModificationFault• The contents of the SetResourceProperties request component cause the

resource properties document to no longer be able to validate.

– UnableToModifyResourcePropertyFault• A resource property identified by one of the SetResourceProperties request

components is read-only.

– InvalidResourcePropertyQNameFault• A resource property QName does not identify a resource property.

– SetResourcePropertyRequestFailedFault• One or more components of the SetResourceProperties request failed.

Page 47: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 47

SetResourceProperties

• Any fault message indicating a failure during the update of the resource properties document must also indicate whether the document was restored or not by using the ResourcePropertyChangeFailure element of the fault:– Indicates the resource property element change associated with the

fault.

– Indicates if the resource property document as a whole was restored

<wsrf-rp:ResourcePropertyChangeFailure Restored=xsd:boolean?> <wsrf-rp:CurrentValue>{any}*</wsrf-rp:CurrentValue> ? <wsrf-rp:RequestedValue>{any}*</wsrf-rp:RequestedValue> ?</wsrf-rp:ResourcePropertyChangeFailure>

Page 48: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 48

SetResourceProperties

Request

Change failure

Response

Page 49: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 49

InsertResourceProperties

• Request the insertion of one or more element values of a single resource property into the resource properties document of a WS-Resource.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/InsertResourceProperties/

InsertResourcePropertiesRequest.

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/InsertResourceProperties/

InsertResourcePropertiesResponse.

<wsrf-rp:InsertResourceProperties> <wsrf-rp:Insert> {any}* </wsrf-rp:Insert></wsrf-rp:InsertResourceProperties>

<wsrf-rp:InsertResourcePropertiesResponse></wsrf-rp:InsertResourcePropertiesResponse>

Page 50: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 50

InsertResourceProperties

• Faults:– Generic WS-Resource faults.– InvalidModificationFault

• The contents of the InsertResourceProperties request component cause the resource properties document to no longer be able to validate.

– UnableToModifyResourcePropertyFault• A resource property identified by the InsertResourceProperties request is not

modifiable.

– InvalidResourcePropertyQNameFault• A resource property QName does not identify a resource property.

– InsertResourcePropertiesRequestFailedFault• The InsertResourceProperties request failed for some reason.

– Use the ResourcePropertyChangeFailure element of the fault if failure during the update.

Page 51: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 51

InsertResourceProperties

Request

Response

Page 52: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 52

UpdateResourceProperties

• It requests the replacement of all the element values of a single resource property in the resource properties document of a WS-Resource with a new set of values.

• Request:– wsa:action=http://docs.oasis-open.org/wsrf/rpw-2/UpdateResourceProperties/

UpdateResourcePropertiesRequest

• Response:– wsa:action=http://docs.oasis-open.org/wsrf/rpw-2/UpdateResourceProperties/

UpdateResourcePropertiesResponse

<wsrf-rp:UpdateResourceProperties> <wsrf-rp:Update> {any}* </wsrf-rp:Update></wsrf-rp:UpdateResourceProperties>

<wsrf-rp:UpdateResourcePropertiesResponse></wsrf-rp:UpdateResourcePropertiesResponse>

Page 53: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 53

UpdateResourceProperties

• Faults:– Generic WS-Resource faults.– InvalidModificationFault

• The contents of the UpdateResourceProperties request component cause the resource properties document to no longer be able to validate.

– UnableToModifyResourcePropertyFault• A resource property identified by the updateResourceProperties request is

not modifiable.

– InvalidResourcePropertyQNameFault• A resource property QName does not identify a resource property.

– UpdateResourcePropertiesRequestFailedFault• The UpdateResourceProperties request failed for some reason.

– Use the ResourcePropertyChangeFailure element of the fault if failure during the update.

Page 54: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 54

UpdateResourceProperties

RequestResponse

Page 55: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 55

DeleteResourceProperties

• Allows a requestor to remove all values of a resource property of a WS-Resource.

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/DeleteResourceProperties/

DeleteResourcePropertiesRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rpw-2/DeleteResourceProperties/

DeleteResourcePropertiesResponse

<wsrf-rp:DeleteResourceProperties> <wsrf-rp:Delete ResourceProperty=”QName” /></wsrf-rp:DeleteResourceProperties>

<wsrf-rp:DeleteResourcePropertiesResponse></wsrf-rp:DeleteResourcePropertiesResponse>

Page 56: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 56

DeleteResourceProperties

• Faults:– Generic WS-Resource faults.– InvalidModificationFault:

• The contents of the DeleteResourceProperties request component cause the resource properties document to no longer be able to validate.

– UnableToModifyResourcePropertyFault:• A resource property identified by the DeleteResourceProperties request is

not modifiable.

– InvalidResourcePropertyQNameFault:• A resource property QName does not identify a resource property.

– DeleteResourcePropertiesRequestFailedFault:• One or more components of the DeleteResourceProperties request failed.

– Use the ResourcePropertyChangeFailure element of the fault if failure during the update.

Page 57: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 57

DeleteResourceProperties

RequestResponse

Page 58: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 58

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 59: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 59

WS-Resource Lifetime

• WS-Resource lifetime defines the message exchanges needed for destroying a WS-Resource.– Normally, a service requestor’s interest in a WS-Resource is for some

period of time - rarely is it indefinite.

• WS-Resource lifetime also defines the required resource properties that may be used to inspect and monitor the lifetime of a WS-Resource.

• WS-Resources support:– Immediate destruction.

– Scheduled destruction after a period of time.

Page 60: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 60

WS-Resource immediate destruction

• Immediate destruction of a resource may be provided by the Destroy operation:

– Request:• wsa:Action=http://docs.oasis-open.org/wsrf/rlw-2

/ImmediateResourceTermination/DestroyRequest

– Response:• wsa:Action=http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/

DestroyResponse

• Faults:– Generic WS-Resource faults.– ResourceNotDestroyedFault

• The WS-Resource could not be destroyed for some reason.

<wsrf-rl:Destroy/>

<wsrf-rl:DestroyResponse />

Page 61: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 61

WS-Resource immediate destruction example

Request Response

Page 62: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 62

WS-Resource scheduled destruction

• It may be provided the destruction of a WS-Resource after a period of time (scheduled destruction):– WS-Resource has associated a termination time.

• Scheduled destruction requires:– TerminationTime resource property.

– CurrentTime resource property.

– SetTerminationTime operation.

Page 63: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 63

SetTerminationTime

• Request:– wsa:Action=http://docs.oasis-open.org/wsrf/rlw-2/

ScheduledResourceTermination/SetTerminationTimeRequest

• Response:– wsa:Action=http://docs.oasis-open.org/wsrf/rlw-2/

ScheduledResourceTermination/SetTerminationTimeResponse

<wsrf-rl:SetTerminationTime> [<wsrf-rl:RequestedTerminationTime xsi:nil=”xsd:boolean”?> xsd:dateTime </wsrf-rl:RequestedTerminationTime>] | [<wsrf-rl:RequestedLifetimeDuration> xsd:duration </wsrf-rl:RequestedLifetimeDuration>] </wsrf-rl:SetTerminationTime>

<wsrf-rl:SetTerminationTimeResponse> <wsrf-rl:NewTerminationTime xsi:nil=”xsd:boolean”?> xsd:dateTime </wsrf-rl:NewTerminationTime> <wsrf-rl:CurrentTime> xsd:dateTime </wsrf-rl:CurrentTime> <wsrf-rl:SetTerminationTimeResponse>

Page 64: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 64

SetTerminationTime

• Faults:– Generic WS-Resource faults.

– UnableToSetTerminationTimeFault • The request for termination time could not be changed for some reason.

– TerminationTimeChangeRejectedFault • In the case where a WS-Resource is willing to update its TerminationTime.

Page 65: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 65

SetTerminationTime example

RequestResponse

Page 66: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 66

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 67: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 67

Grouping services

• WSRF allows creating groups of services (WSRF services or not WSRF services).

• A group of services could be interpreted as:– A collection of services.– A directory of services.– A registry of services.– …

• Concepts about group of services:– Member: is a web service that belongs to a group of services.– ServiceGroup: is a web service that is a collection of web services.– ServiceGroupEntry: is an entry in a ServiceGroup that associates a

Member with that ServiceGroup.

Page 68: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 68

Grouping services

• A ServiceGroup service may be extended as a ServiceGroupRegistration service, which allows adding new entries (associated to members) to the group of services.

• A service group has associated ServiceGroupEntry’s, one for each member in the group of services.

Page 69: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 69

ServiceGroup

• MembershipContentRule optional property:

– Specifies rules that members of the ServiceGroup must accomplish.

– MemberInterface: interface (portType) that a member must be available.

– ContentElements: property QNames that a ServiceGroupEntry must provide to be part of the ServiceGroup.

• Entry property:– ServiceGroupEntryEPR– MemberServiceEPR– Content: resource property

document of the member

Page 70: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 70

ServiceGroupRegistration

• Extends Service Group with the Add operation for including new members to a group of services:

Request Response

Page 71: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 71

ServiceGroupRegistration

• Add faults:– Generic WS-Resource.

– ContentCreationFailedFault:• The operation was unable to create a valid Content element.

– UnsupportedMemberInterfaceFault:• The member service referred to by the MemberEPR argument is not

conformant with the MembershipContentRule.

– AddRefusedFault:• The ServiceGroupRegistration refused to create a new entry for the member

service based the semantics of the ServiceGroupRegistration.

Page 72: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 72

ServiceGroupEntry

• There is one ServiceGroupEntry for each member of the group of services.

• Resource properties:– ServiceGroupEPR

– MemerEPR

– Content

– The same values as the elements inside Add operation of ServiceGroupRegistration.

– The same values as the elements available into the Content of the Entry property of ServiceGroup.

Page 73: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 73

Outline

• Generic Web Services problem• Web Services Resource Framework (WSRF)

– WS-Addressing

– Faults

– Declaring WS-Resource properties

– Operations over WS-Resource properties

– WS-Resource lifetime

– Grouping services

• Developing WSRF services– WSRF::Lite

– wsrf4egee

Page 74: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 74

Developing WSRF services

• Apache WSRF (Java)• WSRF.NET• WSRF::Lite (Perl)• Globus Java WS Core• Globus Python Core

Page 75: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 75

WSRF::Lite

• Open source Perl implementation of WSRF.

• Successor of OGSI::Lite, a Perl implementation of OGSI.

• WSRF::Lite provides support for the following Web Service Specifications:

– WS-Addressing.– WS-ResourceProperties.– WS-ResourceLifetimes.– WS-BaseFaults.– WS-ServiceGroups.– WS-Security.

Page 76: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 76

WSRF::Lite

• Based on SOAP::Lite, the Web services module for Perl.

• The state of a WS-Resource can be managed in the following ways:– A process to manage the state of a WS-Resource.– A process to manage the state of several WS-Resources– A file to store the state between calls to the WS-Resource.

• fault-tolerant

• Provides:– Container scripts:

• Plain HTTP container• HTTP over Secure Sockets Layer container

– Uses X.509 certificates for mutual authentication between client and server.(it is possible to user a Web server, such as Apache, as container)

– Perl classes for developing WSRF services– Client scripts:

• Invoke standard WSRF operations.

Page 77: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 77

wsrf4egee

• Tool that provides server and client utilities for deploying WSRF compliant services which send jobs to the EGEE Grid.

• Provides:– a base Perl class that can be easily extended for deploying this kind of

services

– a set of client scripts for invoking that services.

• Based on WSRF::Lite Perl module.

• Not yet publicly available

Page 78: Web Services over the Grid - WSRF -

Workflows over Grid-based Web servicesGeneral framework and a practical case in structural biology

References

Page 79: Web Services over the Grid - WSRF -

2/22/2007 Web Services over the Grid 79

References

• OASIS Web Services Resource Framework (WSRF) TC – http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrf

• The hidden impact of WS-Addressing on SOAP– http://www-128.ibm.com/developerworks/webservices/library/ws-

address.html

• Globus WSRF– http://www.globus.org/wsrf/

• WSRF::Lite– http://www.sve.man.ac.uk/Research/AtoZ/ILCT

• Apache WebServices - Apache WSRF– http://ws.apache.org/wsrf/index.html

• WSRF.NET– http://www.cs.virginia.edu/~gsw2c/wsrf.net.html