1 / 35

Modeling Stateful Resources with Web Services

Modeling Stateful Resources with Web Services. ICE 0534 - Ph.D lecture 20042068 Byung-sang Kim. Contents. Introduction SOA and Services Motivation Modeling Stateful Resources in WS Stateless & Stateful The WS-Resource Framework Model Standardization and Implementation

mareo
Download Presentation

Modeling Stateful Resources with Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modeling Stateful Resources with Web Services ICE 0534 - Ph.D lecture 20042068 Byung-sang Kim

  2. Contents • Introduction • SOA and Services • Motivation • Modeling Stateful Resources in WS • Stateless & Stateful • The WS-Resource Framework Model • Standardization and Implementation • Public Review Specifications • Java WS Core in GT4

  3. Service Oriented Architecture (SOA)? • An SOA application is a composition of services • A “service” is the atomic unit of an SOA • Services encapsulate a business process • Service Providers Register themselves • Service use involves: Find, Bind, Execute • Most well-known instance is Web Services Service Registry Find Register Service Consumer Service Provider Bind, Execute

  4. Web Services • “A Web service is a software system designed to support interoperable machine-to-machine interaction over a network.” • “It has an interface described in a machine-processable format (specifically WSDL).” • “Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.” W3C – Web Services Architecture

  5. Grid ..? • Flexible, secure, coordinated resource sharing among dynamic collections of individuals, institutions, and resource • How different from distributed computing? • Focused on dynamic, cross-organizational sharing • Internet scale distributed computing • Grid architecture • Protocol architecture by which VO users and resources negotiate , establish, manage and exploit sharing relationships. • A services standards-based open architecture that facilitates extensibility, interoperability, portability and code sharing

  6. Motivation (1/2) • Grid • Focus on the sharing multiple sources • Need standard protocol and infrastructure for SOA • WS is good as a Grid infrastructure and standard protocol (OGSA) • But WS • Focus on the interoperability between services • Does not care current status of the services and their entities • Need Service that acts upon stateful resources • Provides access to, or manipulates a set of logical stateful resources

  7. Motivation (2/2) • Building large-scale systems by composition of many heterogeneous components demands that we extract and standardize common patterns • Use WS-Addressing for referring to resources, with extensions for stability • Define resource lifetime management interfaces • Define resource inspection and monitoring interfaces • Define base fault representation & groups • WSRF is just a start to WS Distributed Management (WSDM) defining resource management framework (probably) on WSRF

  8. Grid Services as an extension of WS • Resource management protocol • Resource framework in WSDL Grid Stuff OGSA • Remote Job Execution • Resource Discovery & Monitoring • Data Transfer & replication • Security OASIS WSRF Web Services • WSDL / XML • SOAP / HTTP • TCP / IP • Internet

  9. Modeling Stateful Resources with Web Services

  10. State ? • Service’s Internal data • Attributes which are needed to persist across multiple invocation • Web Service’s internal data • Attributes which are needed to maintain for multiple clients • Attributes which are needed to deal with the dependencies among multiple services • Service’s status at system level • Service’s life time, system workload, disk information

  11. Stateless Web Service

  12. Stateful Web Service

  13. Web Services and Stateful Resources • “State” appears in almost all applications • Data in a purchase order • Current usage agreement for resources on a grid • Metrics associated with work load on a Web server • There are many possible ways Web services might model, access and manage state • The WS-Resource Framework proposes to standardize this capability for Web services

  14. Modeling Stateful Resources Web Service + WSRF = Stateful Resources = WS-Resource • A stateful resource is something that exists even when you're not interacting with it. • E.g. database backend service • Stateful resources have properties that define state • these properties are how you interact with them • Properties have values • Add/remove/change properties and values dynamically • WSRF Specification: • a WS-Resource is the combination of a Web service and a stateful resource on which it acts.

  15. The WS-Resource framework model Source : www.ibm.com Web Service Run-time environment WSDL Interface Web Service

  16. The WS-Resource framework model Source : www.ibm.com Invoking a Web Service Endpoint Reference Run-time environment message Interface Web Service message address

  17. The WS-Resource framework model Source : www.ibm.com • What is a WS-Resource • Examples of WS-Resources: • Physical entities (e.g.. processor, communication link, disk drive) or Logical construct (e.g.. agreement, running task, subscription) • Real or virtual • Static (long-lived, pre-existing) orDynamic (created and destroyed as needed) • Simple (one), or Compound (collection) • Unique - Has a distinguishable identity and lifetime • Stateful - Maintains a specific state that can be materialized using XML • May be accessed through one or more Web Services resource

  18. context The WS-Resource framework model Source : www.ibm.com Using a Web service to access a WS-Resource Resource id Address Endpoint Reference Run-time environment id resource message Interface Web Service message address id

  19. context The WS-Resource framework model Source : www.ibm.com Using a Web service to access a WS-Resource Endpoint Reference Endpoint Reference Run-time environment id resource message Interface Web Service message address id resource

  20. id address The WS-Resource framework model Source : www.ibm.com Creating / Locating a WS-Resource Endpoint Reference Run-time environment Endpoint Reference resource message Interface Web Service message address Web Service either locates or creates a WS-Resource

  21. The WS-Resource framework model Source : www.ibm.com • WS-Resource Properties • Resource state and metadata “Projected” as an XML document • Query and Set operations • WS-Resource LifeTime • Explicit destruction or “Soft state” time-to-live • Provides for cleanupof resource instances resource <ProcessorProperties> <ProcID>5A34C1DE03</ProcID> <ProcArchitecture>Power6.2</ProcArchitecture> <ProcSpeedMIPS>400</ProcSpeed> <ProcCacheMB>256<ProcCache> <ProcRunning>1</ProcRunning> </ProcessorProperties>

  22. WS-Notification • Asynchronous WS resource state handling • WS-Notification • Loosely coupled, asynchronous messaging in a Web services context • Standardizes the role of Brokers, Publishers, Subscribers and Consumers • Provides two forms of publish/subscribe: direct publishing and brokered publishing

  23. Subscriber Broker WS-Notification • Subscriber indicates interest in a particular “Topic” by issuing a “subscribe” request • Broker (intermediary) permits decoupling Publisher and Subscriber • “Subscriptions” are WS-Resources • Various subscriptions are possible • Publisher need NOT be a Web Service • Notification may be “triggered” by: • WS Resource Property value changes • Other “situations” • Broker examines current subscriptions • Brokers may • “Transform” or “interpret” topics • Federate to provide scalability subscribe notify notify notify subscribe S S S Publisher notify

  24. Standardization & Implementation

  25. Current public review specifications(still on going): • http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrf • WS-Resource specification • WS-ResourceProperties (WSRF-RP) specification • WS-ResourceLifetime (WSRF-RL) specification • WS-ServiceGroup (WSRF-SG) specification • WS-BaseFaults (WSRF-BF) specification • WS-Resource WSDL • WS-ResourceProperties (WSRF-RP) WSDL • WS-ResourceLifetime (WSRF-RL) WSDL • WS-ServiceGroup (WSRF-SG) WSDL • WS-BaseFaults (WSRF-BF) WSDL • WSN (WS-Notification) also can refer in • http://www.oasis-open.org/home/index.php

  26. BPEL4WS WS-Reliable Messaging WS-Transaction WS-Security WSDL XSD WS-Policy WS-Metadata Exchange SOAP XML WS-Addressing WS-Renewable References JMS RMI / IIOP SMTP HTTP/HTTPS How these proposals relates to other Web services standards Service Composition WS-Notification WS-Service Group Quality of Experience (QoX) WS-Resource Lifetime Description WS-Base Faults WS-Resource Properties Messaging Transports

  27. WS-Resource • http://docs.oasis-open.org/wsrf/rpw-1 • describes the relationship between a Web service and a resource in the WS-Resource Framework. • WS-Resource Access Pattern, • an abstract concept of how resources are accessed through Web services, • the means by which WS-Resources are referenced.

  28. WS-RP (ResourceProperty) • http://docs.oasis-open.org/wsrf/rpw-1 • Web Services Resource Properties 1.2 (Public Review Draft 01, 10 June 2005) • Resource Property defined by the state model • A piece of information • Reflect a part of the resource’s state, meta-data, manageability information • Resource properties Document • Logical composition of resource property elements • Resource property Element • XML representation of a resource property • Child of the root element of a resource properties document • XML global element definition and unique Qname • Resource Property Value • Value(s) associated with a resource property

  29. WS-RP (simple example) • The resource properties document associated with GenericDiskDrive • Defines the GenericDiskDrive portType <wsdl:definitions … " …> … <wsdl:types> <xsd:schema targetNamespace="http://example.com/diskDrive" ... > <!-- Resource property element declarations --> <xsd:element name="NumberOfBlocks" type="xsd:integer"/> <xsd:element name="BlockSize" type="xsd:integer" /> <xsd:element name="Manufacturer" type="xsd:string" /> <xsd:element name="StorageCapability" type="xsd:string" /> <!-- Resource properties document declaration --> <xsd:element name="GenericDiskDriveProperties"> <xsd:complexType> <xsd:sequence> <xsd:element ref="tns:NumberOfBlocks"/> <xsd:element ref="tns:BlockSize" /> <xsd:element ref="tns:Manufacturer" /> <xsd:any minOccurs="0" maxOccurs="unbounded" /> <xsd:element ref="tns:StorageCapability“ minOccurs="0“ maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> … </xsd:schema> </wsdl:types> Resource property element declarations Resource properties document

  30. WS-RP (simple example) • The resource properties document associated with GenericDiskDrive • Defines the GenericDiskDrive portType …<!-- Association of resource properties document to a portType --> <wsdl:portType name="GenericDiskDrive" wsrf-rp:ResourceProperties="tns:GenericDiskDriveProperties" > <operation name="start" …/> <operation name="stop" …/> … </wsdl:portType> … </wsdl:definitions> Association of resource properties document to a portType • The association of the resource properties document with the portType defines the type of the WS-Resource.

  31. WS-RP (simple example) • The request message used to retrieve two resource property elements from the WS-Resource that implements the GenericDiskDrive portType: … <wsrp:GetMultipleResourceProperties xmlns:tns="http://example.com/diskdrive" …> <wsrp:ResourceProperty>tns:NumberOfBlocks</wsrp:ResourceProperty> <wsrp:ResourceProperty>tns:BlockSize</wsrp:ResourceProperty> <wsrf-rp:ResourceProperty>tns:StorageCapability</wsrf-rp:ResourceProperty> </wsrp:GetMultipleResourceProperties> …

  32. WS-RP (simple example) • A sample response to the simple get request: … <wsrf-rp:GetMultipleResourcePropertiesResponse xmlns:ns1="http://example.com/diskdrive" xmlns:ns2="http://example.com/capabilities" ...> <ns1:NumberOfBlocks>22</ns1:NumberOfBlocks> <ns1:BlockSize>1024</ns1:BlockSize> <ns1:StorageCapability> <ns2:NoSinglePointOfFailure>true</ns2:NoSinglePointOfFailure> </ns1:StorageCapability> <ns1:StorageCapability><ns2:DataRedundancyMax>42 </ns2:DataRedundancyMax></ns1:StorageCapability> </wsrf-rp:GetMultipleResourcePropertiesResponse> …

  33. OGSA, WSRF, GT4 Relationship

  34. Java WS Core in GT4 • A component in GT4 functionality • An implementation of the Web Services Resource Framework (WSRF) and the Web Service Notification (WSN) family of standards. • It provides APIs and tools for building stateful Web services. • An Implementation of the 2004/06 OASIS WSRF and WSN working draft specifications • Basic HTTP/1.1 client & server support • JNDI based registry based on the JNDI service in Apache Tomcat

  35. Java WS Core • Visit following link for more information • http://www.globus.org/toolkit/docs/4.0/common/javawscore/ Any questions for WSRF ?

More Related