Return to Home Page

The public review of the manuscript for "SOA Design Patterns" has concluded !
Thank you to all that participated. 234 reviews were received and over 30 new patterns have been contributed,
increasing the size of this book by over 50%. The second draft of the manuscript is currently in development.

About the Public Review
    History
    Podcasts (audio)
    Notification
    Submit Feedback
    Contribute a Proven Pattern
    Contribute a Candidate Pattern
    Acknowledgements
    Press Release

Introduction to SOA Types & Design Patterns
    The Architecture of
Service-Orientation
    Understanding SOA
Design Patterns

SOA Design Patterns
    Basic Service Inventory Design Pattern Language
    Architectural Design Patterns
    Basic Service Design
Pattern Language
    Service Design Patterns
    Common Compound
Design Patterns

Additional Resources
    View Entire TOC
    Symbol Legend
    Master Pattern List
(by category)
    Candidate Design Patterns
    Design Patterns Publications
    Download SOA Principles Poster (PDF)

About the Book



SOA Design Patterns
by Thomas Erl

For more information visit: www.soapatterns.com

Related Publications


Read the article "Introducing SOA Design Patterns" from the
June 2008 SOA World Magazine (High-Res PDF).

PLEASE NOTE

The content on this page is from the first draft of the manuscript for the upcoming book "SOA Design Patterns" by Thomas Erl. This version of the manuscript was authored in September, 2007. Since then, the manuscript has undergone significant content and structural changes as a result of an industry-wide review in which hundreds of SOA practitioners participated in addition to SOA vendors and experts from the design patterns community.

You are welcome to use the information on this page for research purposes, but you should assume that most of it will change in the final release of the "SOA Design Patterns" book.

Note also, that as a result of an industry-wide call for participation from December 2007 to February 2008, over 30 new design patterns have been contributed to this book. As they become finalized and are incorporated by the author, concise descriptions will be published on this site, and full descriptions with examples will be made available in the final, printed book.

Due to the volume of new content and changes, the release of the "SOA Design Patterns" book has been postponed to October, 2008. To learn more about the book, visit www.soapatterns.com. To be notified of updates to this site, use the notification form.

Chapter 6: Architectural Design Patterns

Home > Chapter 6 Overview > Stateful Services
Stateful Services

Stateful Services

How can service state data be persisted and managed without consuming service runtime resources?

Problem

Context data and rules associated with a particular service activity can impose a great deal of runtime state management responsibilities upon composition controllers and other involved services, thereby reducing their scalability.

Solution

Context data and rules are managed and stored by dedicated system services that are intentionally stateful.

Application

Stateful utility services can be custom developed or provided as part of a vendor platform.

Impacts

If not properly implemented, stateful services can become a performance bottleneck.

Principles

Service Statelessness

Architecture

Inventory, Service

Table 6.27 – Profile summary for the Stateful Services pattern.

Problem

The coordination of large activities requires the constant management of related context information. Placing the burden of retaining and processing this data upon controller services and other composition members increases their individual memory consumption as well as the duration for which they are required to remain stateful.

Figure 6.116 – The task controller service of a modest composition is required to retain and manage all of the service activityÕs context data until the activity is completed.

Solution

Stateful services are positioned as coordinators to manage the flow and participation of service activities. This alleviates the need for any one service, including the controller service, from having retain context state data.

Figure 6.117 – With the use of stateful utility services, context management responsibilities are deferred. Services participating in the activity are required to regularly interact with the context management services to keep them appraised of the activityÕs status.

Application

This pattern is automatically applied when using an existing framework, such as WS-Coordination. However, custom services can also be developed to provide standard state deferral functions. Either way, what distinguishes services dedicated to state management is that they are deliberately stateful parts of the enterprise. Therefore, they intentionally violate the Service Statelessness principle so as to support its application in other services.

Note: Stateful system services essentially become an extension of the underlying infrastructure, and are typically considered members of the utility service layer. To learn more about context data, context rules, and other forms of state information, see Chapter 11 of SOA: Principles of Service Design.

Impacts

In high concurrency situations, stateful system services can be required to manage numerous activities and activity instances at the same time. If they are not supported by the proper infrastructure, the overall performance and scalability of the service inventory can be compromised.

Relationships

Stateful Services establish a specialized variation of the utility service and are therefore closely related to Utility Abstraction. They may require a state management database behind the scenes, leading to the need to apply the State Repository pattern.

Because they commonly exist as Web services, Service Messaging is required for basic communication and Message Metadata provides a means of supplementing state data deliveries with additional activity details.

Figure 6.118 – The Stateful Services pattern results in the creation of system services that centralize state and activity management, primarily via messaging.

Case Study Example

Case study content is not available on this Web site.

Prev | Next
The Prentice Hall Service-Oriented Computing Series from Thomas Erl
Home    SOA Books    SOA Magazine    What is SOA?    SOA Principles    SOA Methodology    SOA Glossary Copyright © 2007-2008
SOA Systems Inc.