steve graham ws-resourceframework modeling stateful resources with web services oasis wsrf tc f2f...

11
Steve Graham [email protected] WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

Upload: julia-bennett

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

© 2004 IBM Corporation 3 Scope of WS-ResourceFramework  How to represent state in a Web services context  How is state referenced and “identified” in Web services  How is state modeled in XML and WSDL  How is state accessed through Web services  How to reason about lifetime of state  How to aggregate/collect stateful resources  How to reason about fault messages

TRANSCRIPT

Page 1: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

Steve Graham [email protected]

WS-ResourceFrameworkModeling Stateful Resources With Web services

OASIS WSRF TC F2F Wednesday, April 28th, 2004

Page 2: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 2

Motivation Stateful entities exist in most systems

• Data in a purchase order• Current usage agreement for resources • Metrics associated with work load on a server

Hitherto: no standard way to deal with state in Web services context• Each system does it in “idiosyncratic way”• Integration impediment

Goal:• Formalize a mechanism to represent “state” in Web services• In order to help unify Grid computing, Systems management

and e-business computing

Page 3: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 3

Scope of WS-ResourceFramework How to represent state in a Web services context How is state referenced and “identified” in Web

services How is state modeled in XML and WSDL How is state accessed through Web services How to reason about lifetime of state How to aggregate/collect stateful resources How to reason about fault messages

Page 4: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 4

What is a Web Service ? An operation execution component made available at an

endpoint address• A service is defined in terms of the operations it implements

– An operation is defined in terms of a message exchange• The supported set of messages exchanges (operations)

implemented by a service may be described as a WSDL portType

• The Web service itself is typically stateless Accessible through use of a WS-Addressing Endpoint

Reference Lifecycle of a Web service typically described in terms of

“deployment”

Page 5: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 5

What do we mean by Stateful Resource ? A specific set of state data expressible as an XML

document; Has a well-defined identity and lifecycle; and Known to, and acted upon, by one or more Web

services. Many possible implementations

• Files, Database tables, EJB Entities, XML documents, Composed from multiple data sources, etc.

Lifecycle expressed in terms of resource creation and destruction• Multiple independent instances may be created and destroyed• Identity is assigned at creation time

Page 6: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 6

WS-Addressing: Referencing Web services Standardizes the representation of the address of a Web service

deployed at a given network endpoint A WS-Addressing endpoint reference is an XML serialization of a

network-wide pointer to a Web service EPRs can be used to pass services to other services by reference Dynamic generation and customization of service endpoint descriptions Identification and description of specific service instances that are

created as the result of stateful interactions An EPR contains:

• Service address (wsa:Address)• Metadata associated with the Web service such as service description

information (WSDL)• Policy information related to the use of the service• Reference properties, which can be used to identify specific stateful

resource instances associated with the Web service at the endpoint address (wsa: ReferenceProperties)

Page 7: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 7

Contents of EndpointReference

Service Requestor

A

B

C

1

5

4

2

<wsa:EndpointReference> <wsa:Address> http://someOrg.com/process </wsa:Address> <wsa:ReferenceProperties> <tns:process> C </tns:process> </wsa:ReferenceProperties> </wsa:EndpointReference> 3

Page 8: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 8

WS-Resource WS-Resource: Web service + associated resource

• In other words:– A resource with an associated Web service

A WS-Resource has:• Identity: Can be uniquely identified/referenced• Lifetime: Often created & destroyed by clients• State: Can be projected as an XML document • Type: Its Web service interface

An EPR “points to” a WS-Resource• WS-Resource Qualified Endpoint Reference• Implied Resource Pattern

Page 9: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 9

The WS-Resource Qualified Endpoint Reference

Service Requestor

<soap:Envelope> <soap:Header> <tns:process> C </tns:process> </soap:Header> <soap:Body> … some message </soap:Body> </soap:Envelope> … </soap:Envelope>

A

B

C 3

2

1 C

4

An endpoint reference containing a WS-Resource identifier is a WS-Resource-qualified endpoint reference.

Page 10: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 10

WS-Resource Identifier The WS-Resource identifier is a “lookup key” the WS-

Resource to be used in the execution of the request message• The set of reference properties

The content of the WS-Resource identifier is opaque to the service requestor• The service requestor’s applications should not examine or attempt

to interpret the contents of the WS-Resource identifier• The WS-Resource identifier is meaningful only to the Web service

From the point of view of the service requestor:• EPR is a pointer to the Web service + WS-Resource • In other words, the EPR represents a pointer to a WS-Resource

accessible through a Web service

Page 11: Steve Graham WS-ResourceFramework Modeling Stateful Resources With Web services OASIS WSRF TC F2F Wednesday, April 28th, 2004

© 2004 IBM Corporation 11

WS-Resource Relationship Cardinality A Web service can execute message exchanges against zero or more

WS-Resources of a given type One Stateful resource can be “associated” with multiple Web services

• Different interfaces, or same interface for redundancy At the type level, a WSDL 1.1 portType, defining the interface to a Web

service, can be associated with at most one “kind” or “type” of WS-Resource

One “kind” or “type” of WS-Resource can be associated with many WSDL 1.1 portTypes

A

CWS1

B

WS2