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 8: Service Design Patterns

Home > Chapter 8 Overview > Service Refactoring
Service Refactoring

Service Refactoring

How can a service be evolved without impacting existing consumers?

Problem

The logic or implementation technology of a service may become outdated or inadequate over time, but the service has become too entrenched to be replaced.

Solution

The service contract is preserved to maintain existing consumer dependencies, but the underlying service logic and implementation are refactored.

Application

Service logic and technology are upgraded or replaced, as necessary, and must undergo rigorous testing.

Impacts

Service refactoring introduces governance effort as well as risk associated with potentially negative side-effects introduced by new logic or technology.

Principles

Standardized Service Contract, Service Loose Coupling, Service Abstraction

Architecture

Service

Table 8.13 – Profile summary for the Service Refactoring pattern.

Problem

Even when delivering services as part of a top-down approach where service inventory modeling considerations can be factored into the initial service design, over time unforeseen performance and business requirements may demand more from a service than it is capable of providing.

The traditional approach of replacing outdating implementations with newer applications is undesirable due to the consumer dependencies that are formed on (mostly agnostic) services.

Figure 8.48 – Consumers of an existing service demand new requirements for which the service was not originally designed.

Solution

Software refactoring is an accepted software engineering practice whereby existing software programs can be improved without affecting the manner in which they behave. When applied to service design, this approach provides more opportunity for services to evolve within an organization without disrupting their existing consumers. As shown in Figure 8.x, with the application of this patter the underlying logic and implementation of a service can be regularly optimized, improved, or even upgraded while preserving the service contract.

Figure 8.48 – The red areas indicate parts of the service that can be refactored without compromising existing consumer relationships.

Application

The refactoring of existing service logic or technology introduces the need for the service to undergo redesign, redevelopment, and retesting cycles so as to ensure that the existing guarantees expressed in the service contract can continue to be fulfilled as expected (or better).

This pattern can be more successfully applied when the service has already been subjected to the application of the Decoupled Contract pattern and the Service Loose Coupling design principle. The separation of service logic from a fully decoupled contract provides increased freedom as to how refactoring can be carried out, while minimizing potential disruption to existing service consumers.

Note: Several books covering refactoring techniques and specialized patterns are available. Two well-known titles are Refactoring: Improving the Design of Existing Code (Fowler, Beck, Brant, Opdyke, Roberts) and Refactoring to Patterns (Kerievsky), both by Addison Wesley.

Impacts

Because existing, proven logic and technology is modified or replaced as a result of applying this pattern, there is always a risk associated with the reliable delivery of capabilities to existing service consumers. The degree to which this risk is alleviated is proportional to the maturity and suitability of the newly added logic and technology and the extent to which quality assurance is applied to the refactored service.

Relationships

The extent to which Service Refactoring can be applied depends on how the service itself was first designed. This is why there is a direct relationship between this pattern and the Service Normalization, Contract Centralization, and Decoupled Contract patterns. The abstraction and independence gained by the successful application of those patterns allows services to be individual governed and evolved with minimal impact to consumer programs.

Depending on the nature of the refactoring requirements, Service Decomposition, Concurrent Contracts, or Service FaŤade may need to be applied to accommodate how the service is being evolved. Capability Recomposition is furthermore supported by the improvements made as a result of successful refactoring efforts.

Figure 8.50 – The Service Refactoring pattern relies on several key contract-related patterns to ensure that refactoring-related changes do not disrupt existing service consumers.

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.