Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transaction Processing CS409 Application Services Even Semester 2007.

Similar presentations


Presentation on theme: "Transaction Processing CS409 Application Services Even Semester 2007."— Presentation transcript:

1 Transaction Processing CS409 Application Services Even Semester 2007

2 2 What is Transaction Processing? The ability of a software application to do state management for the features or transactions it performs. A state is a set of persistent data that have longer lifetime than a single request/response exchange between the information requestor and provider. A stateful resource is something that exists even when you're not interacting with it.

3 3 Samples of state: –An airline reservation system: Query the status of flights, price, seating arrangement, etc. Maintain the status of user request until displaying the result. –An e-store: Maintain the current state of request for quote, creating purchase order, generate invoice, etc. Monitor user’s status between request for transaction and giving out reference number. Sample of stateful resource: –a database, as a resource, still exist even when you're not querying it. Transaction Processing Examples

4 4 Aspect of Stateful Resource How it is identified and referenced throughout a system. How message can be sent to it to query its values or to act upon. How it is created and terminated. –what is the limit? How can we modify the elements of it.

5 5 Why Should We Care? Each application deal with stateful resources in different way. Lack of standard convention. Limited reusable, best-practice, tools and concept for the industry. Consequence: higher integration cost between systems that deal with stateful resources.

6 6 What does WS-* Offer? WS-Resource framework. WS-Notification framework. Additional transaction management frameworks: –WS-Coordination framework. –WS-Transactions framework.

7 7 WS-* and Transaction Processing WS-Service Group WS-Renewable References WS-Notification Modeling Stateful Resources with Web Services WS-Base Faults WS-Resource Properties WS-Resource Lifetime

8 8 WS-Resource A standard specification approach for modeling stateful resources using web services. Is the combination of a Web service and a stateful resource on which it acts. Example: –A system that manages group of satellites. –Each satellite is a stateful resource. –The system has web service that provide satellite functions such as change orientation, change location, get information, etc. –Satellite + Web Service = WS-Resource !

9 9 WS-Resource (2) WS-Resource is actually a series of specifications that define standard “message patterns” = ways to request the value of properties and specify how it should be altered. WS-Resource consists of:  WS-ResourceProperties  WS-ResourceLifetime  WS-ServiceGroup  WS-RenewableReferences  WS-BaseFaults.

10 10 WS-ResourceProperties Outlines how elements of a WS-Resource’s state are modeled in XML and accessed through Web services. It specifies: –How resource properties are defined in a WSDL file. –The form of messages that request and receive the values of these properties. –How to change, add, and remove properties from a WS-Resource.

11 11 WS-ResourceProperties Case Suppose our satellite has the following properties:  Describing position - latitude, longitude, altitude.  Describing orientation - pitch, yaw, roll.  Describing its focus - focalLength, currentView.

12 12 WS-ResourceProperties Case (2) The satellite has web services with WSDL: <definitions name="Satellite“ targetNamespace="http://example.com/satellite.wsdl" xmlns:tns="http://example.com/satellite.wsdl" xmlns:satTypes="http://example.com/satellite.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <schema targetNamespace="http://example.com/satellite.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema">

13 13 WS-ResourceProperties Case (3) … WSDL continues:

14 14 WS-ResourceProperties Case (4) … WSDL continues: <input message="tns:SetAltitudeInput“ wsa:Action="http://example.com/SetAltitude" /> <output message="tns:SetAltitudeOutput“ wsa:Action="http://example.com/SetAltitudeResponse" />

15 15 WS-ResourceProperties Case (5) … WSDL continues:

16 16 WS-ResourceProperties Case (6) WSDL explained: –There is only one service, SatelliteService. –The service has single port, AltitudePort, which defines that the SOAP message should be sent to http://example.com/satellite. –How to send the SOAP message? Look at the binding of the port, the AltitudeSoapBinding. –AltitudeSoapBinding is the implementation of AltitudePortType, which has one operation with one input and one output message using format “document/literal” style.

17 17 WS-ResourceProperties Case (7) Possible types of WS-Resources for the satellite: –A service that sets or retrieves the altitude of the satellite. –A service that sets or retrieves the location or orientation of the satellite. –A service that provides access to a process that counts the stars in the view of the satellite.

18 18 WS-ResourceProperties Case (8) Merging the resource properties in the WSDL: <definitions name="Satellite“ targetNamespace="http://example.com/satellite“... xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2- draft-01.xsd“>... <xsd:schema targetNamespace="http://example.com/satellite" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing„ schemaLocation="WS-Addressing.xsd" />

19 19 WS-ResourceProperties Case (9) … WSDL continues:

20 20 WS-ResourceProperties Case (10) … WSDL continues:

21 21 WS-ResourceProperties Case (11) … WSDL continues: <portType name=“SatellitePortType“ wsrp:ResourceProperties="tns:GenericSatelliteProperties"> <!-- any operations are performed on a particular type of stateful resource, as defined by a GenericSatelliteProperties element.-->...

22 22 WS-ResourceProperties Case (12) Creating a WS-Resource instance: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">...

23 23 WS-ResourceProperties Case (13) Response from creating a WS-Resource instance: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing">... <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/02/addressing" xmlns:sat="http://example.org/satelliteSystem"> http://example.com/satellite SAT9928

24 24 WS-ResourceProperties Case (14) Requesting a resource property: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">... satProp:altitude

25 25 WS-ResourceProperties Case (12) Receiving a resource property: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">... 47700

26 26 WS-ResourceProperties Case (13) Adding a resource property: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">... 36n11, 115w08

27 27 WS-ResourceProperties Case (14) Deleting a resource property: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">...

28 28 WS-ResourceProperties Case (15) Changing a property value: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft- 01.xsd">... 36.11 158.08

29 29 WS-ResourceLifetime Specifies the situation in which a WS- Resource needs to expire or be explicitly destroyed when it is no longer needed. To limit a resource for only existed in a specified period of time, no matter if any processes still connected to the system. Destruction can be done immediately or scheduled.

30 30 WS-ResourceLifetime Case Destroying a WS-Resource instance: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft- 01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/Destroy http://example.com/satellite SAT9928

31 31 WS-ResourceLifetime Case (2) Acknowledgement of destroying a WS- Resource instance: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft- 01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/DestroyResponse http://example.com/myClient

32 32 WS-ResourceLifetime Case (3) Set termination time of an instance: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft- 01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/SetTerminationTime http://example.com/satellite SAT9928 2005-2-15T07:24:00

33 33 WS-ResourceLifetime Case (4) Response for set termination time: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/SetTerminationTimeResponse http://example.com/myClient 2005-2-15T07:24:00 2005-2-15T03:25:08

34 34 WS-ServiceGroup Defines a way to create a collection of Web services, such as a registry of available services. A ServiceGroup is a WS-Resource that groups together pointers to other WS-Resources and to plain Web services. Application can perform the same operations on a ServiceGroup that can be performed on any other WS-Resource, such as creating, destroying, or accessing its properties.

35 35 WS-ServiceGroup Case Creating a service group: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"...

36 36 WS-ServiceGroup Case (2) Response of creating a service group: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"... <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/02/addressing" xmlns:sat="http://example.org/satelliteSystem"> http://example.com/satellite SATGRP3

37 37 WS-ServiceGroup Case (3) Adding membership content rule: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/“ xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2- draft-01.xsd"... <wsrp:SetResourceProperties xmlns:satProp="http://example.com/satellite"> <wssg:MembershipContentRule MemberInterface="sat:CounterPortType" ContentElements="sat:audited" />

38 38 WS-ServiceGroup Case (4) Adding a new entry into group: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/“ xmlns:wssg=""http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft- 01.xsd"> SATGRP3 http://example.com/satellite SAT8557 My Boss

39 39 WS-BaseFaults Defines a standard way of indicating errors in a WS-Resource based application. Defines a basic format for standard errors, then provides a way to extend that basic format for more specific purposes without losing the original structure.

40 40 WS-BaseFaults (2) Examples of errors: –Clients are requesting WS-Resources that do not exist. –Clients are adding them to ServiceGroups for which they do not qualify. –Clients are creating XPath expressions for multiple queries that aren't really XPath expressions.

41 41 WS-BaseFaults (3) Types of faults for WS-ResourceProperties: –ResourceUnknownFault : This fault applies to all of the various operations and indicates that the message refers to an endpoint reference the Web service doesn't recognize. –InvalidResourcePropertyName : When requesting a property or properties, this fault indicates that the client is trying to get or set a ResourceProperty that doesn't exist on the WS-Resource in question. –InvalidSetResourcePropertiesRequestContent : The data that was sent in the SetResourcePropertyRequest doesn't conform to the schema for the appropriate resource property document.

42 42 WS-BaseFaults (4) Types of faults for WS-ResourceProperties: –UnableToModifyResourceProperty : The resource property that client is attempting to set is read-only. –SetResourcePropertyRequestFailed : This is a general error indicating that the server was unable to add or change the resource property. –UnknownQueryExpressionDialect : When querying resource properties, this fault indicates that the client is attempting to evaluate a query in a dialect the service doesn't recognize.

43 43 WS-BaseFaults (5) Types of faults for WS-ResourceProperties: –InvalidQueryExpression : The query doesn't conform to the specified dialect. –QueryEvaluationError : This is a general error indicating something went wrong while processing the query.

44 44 WS-BaseFaults (6) Types of faults for WS-ResourceLifetime: –InvalidQueryExpression : The query doesn't conform to the specified dialect. –ResourceNotDestroyedFault : This fault indicates that the WS-Resource wasn't destroyed. –UnableToSetTerminationTimeFault : General fault indicating the service couldn't make the requested change. –TerminationTimeChangeRejectedFault : The client is attempting to make a change that doesn't conform with the internal rules of the WS- Resource.

45 45 WS-BaseFaults (7) Types of faults for WS-ServiceGroups: –UnsupportedMemberInterfaceFault : The service the client is attempting to add doesn't implement any of the required portTypes. –ContentCreationFailedFault : The request to add a Web service doesn't have the appropriate Content element as defined in the MembershipContentRules for the ServiceGroup. –AddRefusedFault : Indicating that the resource couldn't be added.

46 46 WS-RenewableReferences Defines a mechanisms that can be used to renew an endpoint reference that has become invalid. When endpoint location or policy changes, it may become necessary to renew a client copy of associated information regarding that resource.

47 47 WS-Notification A standard specification for asynchronous message delivery notification, built on top of WS-Resource. Explains how to enable an application to provide publish-subscribe capabilities for various application events.

48 48 WS-Notification (2) Three specifications for WS-Notification: –WS-Topics –WS-BaseNotifications. –WS-BrokeredNotifications.

49 49 WS-Topics A set of "items of interest for subscription". A service can publish a set of topics that clients can subscribe to, and receive a notification whenever the topic changes.

50 50 WS-BaseNotifications Defines the standard interfaces of notification consumers and producers. Notification producers have to expose a subscribe operation that notification consumers can use to request a subscription. Consumers, have to expose a notify operation that producers can use to deliver the notification. The client actually requesting the subscription need not necessarily be the consumer of those notifications, clients can perform subscriptions "on behalf of other notification consumers".

51 51 WS-BaseNotifications (2) 1.Notification consumer subscribes himself to the SystemLoadHigh topic. 2.Next, at some point in time, something happens in the notification producer that must trigger a notification from the SystemLoadHigh topic. The notification filter for example is send out a notification every time the system load has passed "more than 75%“. 3.Notification producer delivers the notification to the consumer by invoking the notify operation in the consumer. Fig 1. WS-Notification Interaction

52 52 WS-BaseNotifications (3) Fig 2. WS-Notification Interaction where subscriber and consumer are different entities.

53 53 WS-BrokeredNotifications Defines the standard interfaces for the notification broker. Notifications are delivered from the producer to the consumer through an intermediate entity called the broker.

54 54 WS-BrokeredNotifications (2) 1.The producer must register with the broker and publish its topics there. 2.The subscriber (separate from the consumer in this case), must also subscribe through the broker. 3.When a notification is produced, it is delivered to the consumer through the broker. Fig 3. Brokered WS-Notification Interaction

55 Thank You Doddy Lukito dlukito@infinitechnology.com dlukito@alumni.carnegiemellon.edu


Download ppt "Transaction Processing CS409 Application Services Even Semester 2007."

Similar presentations


Ads by Google