ws-resource framework

Post on 13-Jan-2016

18 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

WS-Resource Framework. Adam Belloum Computer Architecture & Parallel Systems group University of Amsterdam adam@science.uva.nl. GT1. GT2. OGSI. Started far apart in apps & tech. Have been converging. ?. WSDL 2, WSDM. WSDL, WS-*. HTTP. Grid and Web Services: Convergence?. Grid. - PowerPoint PPT Presentation

TRANSCRIPT

WS-Resource Framework

Adam Belloum

Computer Architecture & Parallel Systems group

University of Amsterdam

adam@science.uva.nl

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

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

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.

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

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.

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.

The five specification composing the WSRF

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:

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.

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

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.

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

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.

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

Modeling Stateful Resources with Web Services

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.

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

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.

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

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.

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.

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.

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

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.

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

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.

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.

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.

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

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

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.

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.

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

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.

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.

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

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.

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

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.

WS-Resource Properties Document

• the state of “C” comprises 3 components, p1, p2, and p3

• resource properties document, “ExampleResourceProperties,”.

WS-Resource Properties Document

• WS-Resource properties document declaration is associated with the WSDL portType using a standard attribute, resourceProperties

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

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

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

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.

top related