Home arrow Web Services arrow Web Services and Stateful Resources
WEB SERVICES

Web Services and Stateful Resources


The WS-Resource Framework is a set of proposed standards that formalizes the relationship between Web services and state. If you do anything involving the Web and persistent data, you know how important this is. This article, the first of a multi-part series, examines that framework. It is excerpted from chapter 8 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418).

Author Info:
By: Sams Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 5
June 29, 2006
TABLE OF CONTENTS:
  1. · Web Services and Stateful Resources
  2. · Aspects of State
  3. · Stateful Resources
  4. · Role of WS-Addressing
  5. · Using the Endpoint Reference

print this article
SEARCH DEVARTICLES

Web Services and Stateful Resources
(Page 1 of 5 )

Chapter 8: Web Services and Stateful Resources

Almost every computer system has some form of state or state management. By state, we mean a set of persistent data or information items that have a lifetime longer than a single request/response message exchange between a requestor and the Web service. An airline reservation system manages the current state of flights, reservations, airplane capacity, seating arrangements, and so on. This state lasts much longer than the duration of a particular set of message exchanges to create a reservation or cancel a reservation. In a supply chain, the current state of the request for quotes (RFQs), purchase orders, invoices and so on is managed. Most systems of any consequence have some form of state. Many Web service interfaces allow for the manipulation of state; that is, the existence of state is implied by the Web service interface. For example, a purchase order Web service implies the presence of the "purchase order" state associated with the various operations defined on the interface. Because these kinds of interfaces are common, it's important to understand the relationship between Web services and state.

To this point in the evolution of Web services technology, no formal mechanism has been proposed to represent the relationship between Web services and state. Currently, each application deals with stateful resources in a slightly (and occasionally radically) different manner. The lack of a standard convention means there is limited motivation for the industry to produce hardened, reusable middleware, tooling, design practices, and experiences upon which Web services applications can be built. This results in increased integration cost between systems that deal with stateful resources in different ways.

This chapter discusses a recent set of proposed standards that formalize the relationship between Web services and state: WS-Resource Framework. The WS-Resource Framework was developed by Computer Associates, Fujitsu, Globus (a major open-source provider of Grid middleware), Hewlett-Packard, and IBM and has been submitted to the OASIS standards organization. A set of five specifications and a white paper outline an approach to modeling stateful resources using Web services. The five specifications are WS-ResourceProperties, WS-ResourceLifetime, WS-ServiceGroup, WS-RenewableReferences, and WS-BaseFaults. We'll examine these specifications in more detail later in this chapter.

Built on top of the WS-Resource Framework is a family of specifications called WS-Notification, which defines a Web services standard approach to asynchronous notification message delivery, or the so-called publish/subscribe (pub/sub) pattern. We'll also review the WS-Notification specifications in this chapter.

Web Services and State

Fundamentally, Web services are best modeled as stateless message processors that accept request messages, process them in some fashion, and (usually) formulate a response to return to the requestor. Web services are typically implemented by stateless components such as Java servlets or EJB stateless session beans. It's left to the implementation to figure out how (or if) any information about the request needs to be stored more permanently (such as in a database) or whether additional information needs to be acquired (such as a lookup into a file in the filesystem) in order to properly process the Web service message.

Therefore, a Web service (a stateless entity) is separate from any persistent state that it might need in order to complete the processing of request messages. This notion of the separation of Web service and state (a so-called "first amendment of the Web services constitution," to make a poor attempt at humor by historical and political analogy) is at the heart of the WS-Resource Framework.


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials