spacer
Overview
  spacer   History
  spacer   Acknowledgements
  spacer   Podcasts
  spacer   Notification Form
  spacer   Feedback Form
  spacer   Press Release #1
  spacer   Press Release #2
  spacer   Press Release #3

Master SOA Design
Pattern Catalog
  spacer   Master Pattern List (alphabetical)
  spacer   Master Pattern List (by category)
  spacer   Master Pattern List (Text)
  spacer   Pattern Notation
  spacer   Pattern Profiles
  spacer   Symbol Legend
  spacer   Pattern Contribution Form

SOA Candidate Patterns
  spacer   SOA Patterns Review Committee
  spacer   Candidate Patterns Overview
  spacer   Candidate Patterns List
  spacer   Candidate Pattern Contribution Form
  spacer   Candidate Pattern
Feedback Form
  spacer   SOA Pattern Template

Design Pattern Basics
  spacer   What's a Design Pattern?
  spacer   What's a Design Pattern Language?
  spacer   What's a Compound Pattern?

Supplemental
  spacer   SOA Patterns and Application Technologies
  spacer   SOA Design Patterns Historical Influences
  spacer   SOA Design Patterns and Design Principles
  spacer   SOA Design Patterns and Design Granularity
  spacer   Legal

Resources
  spacer   Design Patterns Publications
  spacer   Reference Posters
  spacer   SOAPrinciples.com
  spacer   WhatIsSOA.com
  spacer   SOA Visio Stencil

spacer
spacer
Idempotent Capability (Candidate)
spacer
spacer
Home> Candidate Patterns List >Idempotent Capability

How can services recover from lost messages resulting from communication failures? spacer  
spacer
spacer
Problem
spacer
Network and server hardware failure can lead to lost messages, resulting in cases where a service consumer receives no response to its request. Attempts to reissue the request message can lead to unpredictable behavior within the service and the service consumer logic.
spacer
spacer
Solution
spacer
Design service capabilities capable of safely supporting repeated message exchanges.
spacer
spacer
Application
spacer
Idempotent capabilities guarantee that repeated invocations are safe and will have no negative effect. These types of capabilities are generally defined in terms of "set", "put" or "delete" actions that have a post-condition that does not depend on the original state of the service.

Idempotent capabilities that do request changes to service state can be safely retried and are generally limited to read-only data fetches or queries.

The design of an idempotent capability can include the use of a unique identifier with each request so that repeated requests that have already been processed will be discarded by the service rather than being processed again.
spacer spacer spacer spacer
Impacts
spacer
The use of a unique identifier to define an idempotent capability requires session state to be reliably recorded by the service and preserved across server hardware failures. This can harm the scalability of the service, and may be further complicated if redundant service implementations are operating at different sites that experience network failures.

Not all service capabilities can be idempotent. Unsafe capabilities included those that need to perform "increment", "reverse" or "escalate" transition functions where the post-execution condition is dependent upon the original state of the service.
spacer
spacer
Principles
spacer
Standardized Service Contract , Service Statelessness , Service Composability
spacer spacer spacer spacer
Architecture
spacer
Inventory, Composition, Service
spacer
spacer
Status
spacer
Under Review
spacer spacer spacer spacer
Contributors
spacer
Pautasso, Wilhelmsen
spacer
 
spacer
The getValue() and setValue() capabilities can be safely retried because they are idempotent. The incrementValue() capability is not idempotent and must not be retried unless each request is associated with a unique identifier. Such an identifier would need to be incorporated into the service's session state and must be synchronized between service instances alongside changes to the value.
spacer
spacer
Related Patterns in This Catalog
spacer
Reliable Messaging (Little, Rischbeck, Simon), Reusable Contract (Balasubramanian, Carlyle, Pautasso) , Uniform Contract (Raj Balasubramanian, Jim Webber, Thomas Erl, David Booth)

spacer
spacer
Related Service-Oriented Computing Goals
spacer
Increased Organizational Agility, Reduced IT Burden
spacer
spacer This page contains excerpts from:
spacer
SOA with REST: Principles, Patterns & Constraints
by Raj Balasubramanian, Benjamin Carlyle, Thomas Erl, Cesare Pautasso
spacer

spacer

spacer
(ISBN: 0137012510, Hardcover, 400+ pages)
spacer
For more information about this book, visit
www.soabooks.com.
spacer
Home    SOA Books    SOA Magazine    What is SOA?    SOA Principles    SOASchool.com    SOA Glossary Copyright © 2007-2011
SOA Systems Inc.









gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.