Download - WS-Resource Framework
![Page 1: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/1.jpg)
WS-Resource Framework
Adam Belloum
Computer Architecture & Parallel Systems group
University of Amsterdam
![Page 2: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/2.jpg)
Grid and Web Services: Convergence?Grid and Web Services: Convergence?
Grid
Web
However, despite enthusiasm for OGSI, adoption within Web community turned out to be problematic
Started far apart in apps & tech
OGSI
GT2
GT1
HTTPWSDL,
WS-*
WSDL 2,
WSDM
Have beenconverging ?
“WS-Resource Framework: Globus Alliance Perspectives” I. Foster
![Page 3: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/3.jpg)
Grid and Web Services:Grid and Web Services:Convergence: Yes!Convergence: Yes!
Grid
Web
The definition of WSRF means that Grid and Web communities can move forward on a common base
WSRF
Started far apart in apps & tech
OGSI
GT2
GT1
HTTPWSDL,
WS-*
WSDL 2,
WSDM
Have beenconverging
“WS-Resource Framework: Globus Alliance Perspectives” I. Foster
![Page 4: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/4.jpg)
Web Service and State
• Web service interfaces frequently provide a user with the ability to access and manipulate state
– Message exchanges that Web services implement are frequently intended to enable access to stateful resources.
• However, the notion of stateful resources acted upon by the Web
service implementation is not explicit in the interface definition.
![Page 5: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/5.jpg)
Web Service and State
• It is desirable to define Web service conventions to enable:– the discovery of, introspection on, and interaction with
stateful resources in standard and interoperable ways.
• WS-Resource is approach to modeling state in a Web services context
![Page 6: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/6.jpg)
Web Service and State
• A WS-Resource is defined as the composition of a Web service and a S-Resource – Expressed as an association of an XML document with defined type
with a Web services portType
– Addressed and accessed according to the implied resource pattern, • a conventional use of WS-Addressing endpoint references
• In the implied resource pattern, a S-Resource identifier is encapsulated in an endpoint reference
• to identify the S-Resource to be used in the execution of a Web service message exchange.
![Page 7: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/7.jpg)
WS-Resource Framework
• WS-Resource framework allows WS-Resources to be– declared, created, accessed, monitored for change, and
destroyed via conventional Web services mechanisms,
• but – does not require that the WS component of the WS-Resource
to be implemented as a stateful message processor.
![Page 8: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/8.jpg)
The five specification composing the WSRF
![Page 9: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/9.jpg)
Service Composition
Transports
Messaging
Description
Quality ofExperience(QoX)
HTTP/HTTPS SMTP RMI / IIOP
XSD WSDL
SOAPXML WS-Addressing WS-Renewable References
WS-Metadata ExchangeWS-Policy
WS-Service Group
WS-Resource Properties
JMS
WS-Security
WS-Reliable Messaging WS-Transaction
WS-Resource Lifetime
WS-Base Faults
WS-Notification BPEL4WS
How these proposals relates to other Web services standards:
![Page 10: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/10.jpg)
Renewable References
• The WS-RenewableReferences work defines mechanisms that can be used to renew an endpoint reference that has become invalid.
• These mechanisms can be applied to any endpoint reference, but are particularly useful – For endpoint reference that refers to a WS-Resource, – as it can provide a persistent and stable reference to the WS-Resource
that can allow the same state to be accessed repeatedly over time.
![Page 11: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/11.jpg)
Renewable References
• A WS-Addressing endpoint reference may contain – not only addressing – policy information concerning interactions with the service.
• Typically, endpoint references are constructed by an authoritative source of the addressing and policy information.
• An endpoint reference made available to a client represents a copy of that information– at some point, become incoherent due to changes introduced by the
authoritative source that effects the endpoint location and/or the policy
![Page 12: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/12.jpg)
Service Groups
• The WS-ServiceGroup specification defines a means of representing and managing heterogeneous by-reference collections of Web services.
– organize collections of WS-Resources, for example to build registries
– build services that can perform collective operations on a collection of WS-Resources.
![Page 13: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/13.jpg)
Service Groups
• The ServiceGroup specification express ServiceGroup:– membership rules, – Membership constraints – classifications.
• Groups can be defined.
• using the resource property model from WS-ResourceProperties
• as a collection of members that meet the constraints of the group as expressed through resource properties
![Page 14: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/14.jpg)
Base Faults
• The WS-BaseFaults specification defines a base fault type for use when returning faults in a Web services message exchange.
• Used by all of the other WS-Resource framework specifications to bring consistency to the faults returned by the operations including– consistent reporting of faults relating to WS-Resource definition
and use.
![Page 15: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/15.jpg)
Notification
• WS-Notification, defines a general, topic based WS system for (pub/sub) interactions that builds on the WS-Resource framework.
• From the perspective of WS-Notification – WS-Resource framework provides useful building blocks for
representing and structuring notifications.
• From the perspective of the WS-Resource framework, – WS-Notification specifications extends WS-Resources by allowing
requestors to ask to be asynchronously notified of changes to resource property value
![Page 16: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/16.jpg)
Modeling Stateful Resources with Web Services
![Page 17: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/17.jpg)
Possible association between State and
Services• A stateless service implements
– message exchanges with no access or use of information not contained in the input message
• A conversational service implements– a series of operations such that the result of one operation depends on
a prior operation and/or prepares for a subsequent operation
• A service that acts upon stateful resources– access to, or manipulates a set of logical stateful resources based on
messages it sends and receives.
![Page 18: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/18.jpg)
Stateless Implementations, Stateful
Interfaces• A Service that acts upon stateful resources may be
described “stateless”
– if it delegates responsibility for the management of the state to another component.
• The service is responsible for the state of the resource between message exchanges
![Page 19: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/19.jpg)
A consequence of statelessness
• Any dynamic state needed for a given message-exchange execution must be:
– provided explicitly within the request message, whether
• directly by-value • indirectly by-reference maintained implicitly within other system
components with which the WS can interact.
![Page 20: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/20.jpg)
Modeling State in Web Services (WS-Resource)
• WS-Resource is composed of a Web service and a S-Resource
• S-Resource is used in the execution of Web service message exchanges
• WS-Resources can be created and destroyed
• S-Resource is associated with the interface of a WS to enable: well-formed queries against the state of a WS-Resource
![Page 21: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/21.jpg)
Modeling State: Stateful Resources
• A S-Resource is defined as having:
– specific set of state data expressible in XML format
– a well-defined lifecycle known to, and acted upon, by one or more Web services.
![Page 22: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/22.jpg)
How stateful resource is referred to by Web
services? The implied resource pattern refers to the mechanisms used to associate
– a S-Resource
– with the execution of message exchanges implemented by a Web Service.
![Page 23: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/23.jpg)
The Implied Resource Pattern
• Implied is used because the S-Resource associated with a message exchange is treated as implicit input for the execution of the message request.
– The Association of WS and S-Resource is either static or a dynamic. • Static if the association is made when the WS is deployed.• Dynamic if the association is made at time of message exchange
(S-Resource is encapsulated in the WS-Addressing endpoint reference).
• Pattern indicates that the relationship between WS and S-resources is
– codified by a set of conventions on existing WS technologies, in particular XML, WSDL, and WS-Addressing.
![Page 24: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/24.jpg)
WS-Addressing
• WS-Addressing standardizes – The endpoint reference used to represent the address of a WS.– endpoint contain metadata associated with the WS
• service description information• reference properties
• A WS-Addressing endpoint reference is an XML serialization of a network-wide pointer to a WS
![Page 25: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/25.jpg)
WS-Resource and WS-Addressing
• SW (2) returns an Endpoint reference to the requestor
• “C” is S-resource created
• SW (2) represents an explicit WS-Resource factory.
• The endpoint reference (3)
contains– Wsa:Address (4)
• refers to the network transport-specific address of the WS (URL).
• same address that would appear within a port element in a WSDL of the WS
– wsa:ReferencePropertie• contain an XML serialization
of a S-Resource identifier.
![Page 26: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/26.jpg)
WS-Resource and WS-Addressing
• S-Resource identifier– is meaningful only to the SW,
– used by the WS in an implementation-specific to identify the WS-Resource related S-Resource needed for the execution.
– should not be examined or interpreted by the service requestor’s applications
– Is represented using a service-specific XML element by XML serialization of the S-Resource
![Page 27: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/27.jpg)
WS-Resource and WS-Addressing
• S-Resource identifier – must identify a unique S-
Resource to be used the execution of the request message.
– the scope of the S-Resource identifier must be unique within the scope of the WS.
– multiple identifiers within the scope of a WS may refer to the same WS-Resource.
![Page 28: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/28.jpg)
WS-Resource-qualified endpoint reference
• the endpoint reference represents a pointer to the WS-Resource
• service requestor – must understand that the
endpoint reference refers to a WS-Resource.
– must recognize that the endpoint reference is a WS-Resource qualified endpoint reference.
![Page 29: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/29.jpg)
WS-Resource-qualified endpoint reference
• requestor use the endpoint reference (1) to send messages (2) to the identified SW(3)
• WS-Resource’s endpoint
reference contains a S-Resource identifier in its ReferenceProperties
• request message directed to the WS using that endpoint reference must include the S-Resource identifier.
![Page 30: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/30.jpg)
WS-Resource Relationship Cardinality
• A WS can execute message exchanges against:– zero – more S-Resources defined as instances of the resource property
document.
• A single WS at a particular endpoint is associated with several individual S-Resources
![Page 31: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/31.jpg)
WS-Resource Relationship Cardinality (At the type level)
• WSDL 1.1 portType, defining the interface to a WS: – can be associated with at most one S-Resource property
document.
– S-Resource property document can be associated with many portTypes.
– Any WS that implements a portType is by definition a WS associated with a S-Resource
![Page 32: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/32.jpg)
WS-Resource Encapsulation
• Strict encapsulation guarantees that encapsulated data can only be accessed through well defined operations.
• Data encapsulation facilitates the use of data without the user having to understand the details of the data implementation
• The implied resource pattern facilitates varying degrees of WS encapsulation of S-Resources.
![Page 33: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/33.jpg)
WS-Resource Lifecycle
The lifetime of a WS-Resource is defined as the period between its creation and its destruction.
1. WS-Resource creation using a WS-Resource factory
2. Assignment & use of the S-Resource identifier
3. destruction of a WS-Resource.
![Page 34: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/34.jpg)
WS-Resource Creation
• WS-Resource factory is any WS capable of creating a WS-Resource– creating a new S-Resource– assigning the new S-Resource an identity,– associating the new S-Resource and its WS.
• The response message of a WS-Resource factory operation contains– WS-Resource-qualified endpoint reference containing a S-
Resource identifier that refers to the new S-Resource
![Page 35: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/35.jpg)
WS-Resource Identity
• S-Resource has at least one form of identity that identifies S-Resource component within the WS-Resource composition.
• To a WS with a S-Resource is associated: – the S-Resource identifier carried within a request message is
meaningful.
![Page 36: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/36.jpg)
WS-Resource Identity
• A service requestor that obtains access to a WS-Resource-qualified endpoint reference – should not examine or attempt to interpret the value of the S-
Resource identifier.– even comparing the contents of two S-Resource identifiers is
considered invalid.
• From the perspective of the service requestor, the content of the S-Resource identifier within the endpoint reference is opaque.
![Page 37: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/37.jpg)
WS-Resource Destruction
• A requestor that wishes to terminate a WS-Resource uses WS-Resource-qualified endpoint reference to:
– Immediate Destruction: send a destroy request message to the WS using by the endpoint reference.
– Scheduled Destruction: message exchanges for establishing and renewing scheduled destruction times on WS-Resources
![Page 38: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/38.jpg)
WS-Resource Properties
• WS-Resource has an XML resource property document defined using XML schema.
• Requestors determine a WS-Resource’s type by retrieving the WSDL portType definition.
• Requestors use WS message exchanges to read, modify, and query the XML document representing the WS-Resource’s state.
![Page 39: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/39.jpg)
WS-Resource Properties
• resource property to refer to– An individual component of a WS-Resource’s state. – XML document describing the type of a S-Resource within the
WS-Resource is a WS-Resource properties document.
• Each resource property is represented as an XML element within the WS-Resource properties document
![Page 40: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/40.jpg)
WS-Resource Properties Document
• WS-Resource properties document acts as a view on, or projection of, the actual state of the WS-Resource. – the structure upon which requestor-initiated queries and
updates can be directed.
– Any operation that manipulates a resource property via the WS-Resource properties document must be reflected in the actual implementation of the WS-Resource’s state.
![Page 41: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/41.jpg)
WS-Resource Properties Document
• the state of “C” comprises 3 components, p1, p2, and p3
• resource properties document, “ExampleResourceProperties,”.
![Page 42: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/42.jpg)
WS-Resource Properties Document
• WS-Resource properties document declaration is associated with the WSDL portType using a standard attribute, resourceProperties
![Page 43: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/43.jpg)
WS-Resource Property Composition
• Web services allow to construct a new interface from several existing interfaces via a process of composition
• In WSDL 1.1, this composition must be achieved by a copy-and-paste of the operations defined in the constituent portTypes used in the composition
![Page 44: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/44.jpg)
WS-Resource Property Composition
• aggregation of WS-Resource properties of the various constituent portTypes is also possible.
• WS-Resource properties document composition is obtained by adding additional XML element declarations, using:
– xs:ref attribute
![Page 45: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/45.jpg)
Accessing WS-Resource Property Values
• The values of resource properties exposed in the WS-Resource’s resource properties document, can be – read, modified, and queried by using standard WS messages.
• The base functionality is to retrieve the value of a single resource property using a simple WS message exchange
![Page 46: WS-Resource Framework](https://reader036.vdocuments.us/reader036/viewer/2022070411/5681475e550346895db49d45/html5/thumbnails/46.jpg)
Accessing WS-Resource Property Values
• Retrieval function allow the retrieval of multiple resource properties with a single message exchange.
– The WS responds with a message containing the values of the requested WS-Resource properties
• message exchange to execute an arbitrary Xpath expression against the resource properties document.
– query expression types may be used to support resource discovery based on the values of a WS-Resource’s state.