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 > Contract Centralization
Contract Centralization

Contract Centralization

How can direct consumer-to-implementation coupling be avoided?

Problem

Consumer programs can be designed to access underlying service resources using different entry-points, resulting in different forms of implementation dependencies that undermine strategic SOA goals associated with loose coupling.

Solution

Access to service logic is limited to the service contract, forcing consumers to avoid implementation coupling.

Application

This pattern is realized through formal enterprise design standards and the targeted application of the Service Abstraction design principle.

Impacts

Forcing consumer programs to access service capabilities and resources via a central contract can impose performance overhead and on-going standardization effort.

Principles

Standardized Service Contract, Service Loose Coupling

Architecture

Composition

Table 8.2 – Profile summary for the Contract Centralization pattern.

Problem

Even when services within an enterprise are deployed with published, standardized service contracts, those designing consumer programs can be tempted to look for alternative entry points into service logic. For example, it may be easier or more efficient to bypass the service contract and simply access its underlying database directly using native protocols.

Subsequently, the service contract loses its significance and the service ends up with numerous tight dependencies (usually in the form of integration channels) to various parts of its implementation. This inhibits the evolution and governance of the service and undermines many of the objectives of service-orientation.

Figure 8.5 – A service consumer program simply bypasses the service contract to access underlying logic directly.

Solution

The Contract Centralization pattern establishes as a design standard that positions the service contract as the sole entry point into service logic. This allows for a consistent form of loose coupling with all service consumer programs (Figure 8.x).

Figure 8.6 – Through contract centralization we place the service contract front and center within a service-oriented architecture. This is why much of service-orientation is focused on contract design.

Application

The application of this pattern establishes a distinction between the official published service contract and other parts of the service that can also be accessed via separate technical endpoints. For example, a consumer could interface with an underlying service component via that componentÕs API. This API still represents a technical contract, but not the ÒofficialÓ service entry point. This would therefore be considered a non-centralized form of service coupling.

If Contract Centralization is enforced to a meaningful extent, the service contract becomes a focal point for a great deal of interaction. From a long-term evolutionary perspective, therefore, Web services provide an effective means of establishing a service contract that can be customized and standardized, while remaining decoupled from the serviceÕs underlying environment, as per the Decoupled Contract pattern.

On the other hand, if the contract technology is proprietary or requires the use of proprietary communication protocols, then the consumer base is limited to those programs compatible with the proprietary requirements. In this case, the application of this pattern can result in a proliferation of technology coupling throughout an inventory.

Impacts

Integration architecture has a well-rooted history that predates the emergence of middleware and the EAI movement. Few of the past integration architectures were based on a concept like centralization and, more often than not, connections were made to whatever application entry points were the most convenient and efficient to fulfill immediate requirements.

Requiring architects, developers, project managers, and other team members to now forsake all of the options theyÕve had in the past in favor of a design standard that is being established for the long-term good of the enterprise can be difficult. Resistance to centralization is common and tactical requirements, such as time-to-market timelines and budget restrictions, can motivate some project teams to simply disregard the centralization standard altogether.

Furthermore, requiring that all service consumers access a body of logic through a single entry point can result in classic convergence performance issues, especially when having to reroute multiple existing integration channels to interface with a service contract. Contract Centralization needs to be expected and planned for, especially with agnostic services because they are subject to the greatest concurrency demands.

Relationships

By looking at the variety of relationships in Figure 8.x, it is evident how important the Contract Centralization pattern is to service-orientation. It is a part of establishing an effective endpoint layer within inventories and the repeated utilization of agnostic services (such as those based on Entity Abstraction and Utility Abstraction patterns) relies on the base requirement that they only be accessed via their contracts which, in turn, fully supports the long-term, independent governance of services subject to the Service Refactoring pattern.

Contract Centralization is responsible for positioning service contracts as a fundamental service access tier that can be further extended via complementary policy and schema layers (as per the Policy Abstraction and Schema Abstraction patterns).

It is important to acknowledge that the centralization of service contracts is supported (and often enabled) by the Decoupled Contract and Service Normalization patterns. Decoupled contracts can be much more easily centralized and separately positioned from underlying service implementations (as illustrated in the Loose Contract Coupling compound pattern in Chapter 9). The normalization of services further ensures that centralized contracts do not end up representing redundant logic.

One of the closest relationships illustrated in Figure 8.x is between Contract Centralization and Logic Centralization, as explored in the Official Endpoints compound pattern description in Chapter 9.

Figure 8.7 – The core Contract Centralization pattern is a lot like an enterprise design standard in that it regulates how services are accessed and therefore has relationships with both service logic and contract-related patterns.

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.