Return to Home Page
Overview
    History
    Acknowledgements
    Podcasts
    Notification Form
    Feedback Form
    Press Release #1
    Press Release #2
    Press Release #3

Master SOA Design
Pattern Catalog
    Master Pattern List (alphabetical)
    Master Pattern List (by category)
    Master Pattern List with
Page Numbers (PDF)
    Master Pattern List (Text)
    Pattern Notation
    Pattern Profiles
    Symbol Legend
    Pattern Contribution Form

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

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

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

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

About the Book



SOA Design Patterns
by Thomas Erl

For more information visit: www.soapatterns.com

Related Publications


"Introducing SOA Design Patterns", SOA World Magazine (PDF)



"The Case for Single-Purpose Services: Understanding the Non-Agnostic Context and a Strategy for Implementation", SOA Magazine (HTML)



"REST-Inspired SOA Design Patterns", SOA Magazine (HTML)



"Service-Orientation and Object-Orientation Part I: A Comparison of Goals and Concepts", SOA Magazine (HTML)



"Service-Orientation and Object-Orientation Part II: A Comparison of Design Principles", SOA Magazine (HTML)



"Service Facade", InformIT (HTML)



"Non-Agnostic Context", InformIT (HTML)



"Domain Inventory", InformIT (HTML)



"Service Normalization", InformIT (HTML)



"Service Decomposition", InformIT (HTML)



"Canonical Schema", InformIT (HTML)



"Policy Centralization", InformIT (HTML)





Content Negotiation (candidate)


Home > Candidate Patterns List > Content Negotiation

How can services support old and new service consumers or consumers with differing requirements without changing the service contract?  

Problem

Media types accepted or returned by service capabilities can evolve over time. If these changes are backwards-compatible, the changes can be accommodated easily. However, if the change is incompatible then a new variant of each capability needs to be introduced to support consumers of old and new versions simultaneously. More generally there may be requirements to return different content to different types of consumer, or to work around problems encountered in specific consumer implementations.

Solution

The media type and specific content to be accepted or returned by a service capability is negotiated as part of its invocation.

Application

Media type and schema references are decoupled from the service capabilities that use them. Capabilities are modified to negotiate and select the media type to use at run-time from the set allowed by the contract. Media types are still kept to a defined, centralized set but are able to evolve separately to the set of capabilities.

Different types of consumers of the same age can be accommodated by including information about the consumer as part of requests.

Impacts

Media types and schemas can evolve more freely than if they had been referred to directly by service capabilities.

Old versions of media types continue to be understood by new service providers and consumers. Legacy media types can be difficult to retire and may increase the governance burden of the inventory.

Principles

Standardized Service Contract, Service Loose Coupling

Architecture

Composition, Service

Status

Under Review

Contributors

Balasubramanian, Carlyle, Pautasso
 

Incorporating content negotiation into the service contract allows a service to be compatible with old and new consumers without introducing new service capabilities to its contract.



The envelope combining a media type identifier, a block of data, and associated meta-data elements is called a "representation" in REST. This generic parcel of data remains the same, even as new media types are introduced to the service inventory. This permits generic components to deal with the data in various ways without having to have any deep understanding of the media type semantics. For example, caches can be introduced within the service inventory without needing to be aware of the specific media types in use.


Related Patterns in This Catalog

Compatible Change (Orchard, Riley), Concurrent Contracts (Erl), Schema Centralization (Erl), Fine-grained Servie Endpoint


Related Service-Oriented Computing Goals

Increased Organizational Agility, Reduced IT Burden

The Prentice Hall Service-Oriented Computing Series from Thomas Erl
Home    SOA Books    SOA Magazine    What is SOA?    SOA Principles    SOASchool.com    SOA Glossary Copyright © 2007-2010
SOA Systems Inc.