InfoQ

News

Article: Ian Robinson on Consumer-driven Contracts

Posted by Stefan Tilkov on Jul 28, 2008 03:40 PM

Community
SOA
Topics
Design ,
Governance
Tags
XML Schema ,
WSDL ,
policy

In a new article, Ian Robinson, a Principal Consultant with ThoughtWorks, discusses how "consumer-driven contracts", in the form of "stories for services" and unit tests exchanged between service development streams, can strengthen the service-oriented development lifecycle. In contrast to contracts defined from the point of view of the provider, consumer-driven contracts result from combining the demands of all known service consumers.

Ian introduces consumer-driven contracts as they relate to provider contracts and consumer contracts:

  • Provider contracts - Provider contracts are the kind of service contract with which we are most familiar -think WSDL plus XML Schema plus WS-Policy. Provider contracts are, as the name implies, provider-centric. Providers mandate what they have to offer; each consumer then binds itself to this one-size-fits-alloffering. By adopting a provider contract, a consumercouples itself to the entirety of the provider's functionality, irrespective of how much of this functionalityit really needs.
  • Consumer contracts - A consumer contract, on the other hand,is a more exact description of an individual consumer's needs. Consumer contracts represent the specific pieces of provider functionality required by that consumer in the context of a particular interaction. Consumer contracts can be used to annotate an existing provider contract, or they can help discover an as-yet unspecified provider contract.
  • Consumer-driven contracts - A consumer-driven contract is a representation of a service provider's obligations to all its current consumers. Consumer-driven contracts are created when each consumercommunicates to the provider its specific expectations. The obligations created on the provider's side establish a consumer-driven contract. As part of adopting a consumer-driven contract, a provider is free to evolve and innovate its service offering just so long as it continues to satisfy its existing obligations

The author then explores how consumer-driven contracts can be used within the phases of the service development lifecycle, ranging from the initial phase through building and operating them.

Ian summarizes:

Consumer-driven contracts support the development and testing of service-oriented systems, and encourage collaboration between all parties responsible for the service lifecycle.

Check out the full article for more.

  • This article is part of a featured topic series on Governance
whose contact is more contractible by Michael Poulin Posted Oct 10, 2008 2:03 PM
Great Ideas by Colin Jack Posted Nov 23, 2008 1:53 PM
  1. Back to top

    whose contact is more contractible

    Oct 10, 2008 2:03 PM by Michael Poulin

    Interesting article, especially in the light of OASIS SOA Reference Architecture -RA(Public Review Draft 1). In particular, SOA RA considers a bit simpler structure: the are 1) Service Descriptions and 2) Service Contracts. The Service Descriptions are versioned description of the Service offered by the Provider. This document includes all information needed for any Consumer to decide if this Service suitable for him/her, i.e. can satisfy the needs. Service Contracts are explicit contracts between the Provider and every of its Consumers. The to-be standard allows inclusion of both Provider's and Consumer's policies in to the Service Contract. In general, the Service Contract may contain just a sub-set of the functional, non-functional features of the Service and related sub-set of the policies. However, after the Service is built, a Consumer can offer just its policies to be added to the Service Contract; the latter is driven and approved/supported only by Provider. If a Consumer does not like the Service Description, it should not use the service. If a Provider is interested in wider Service consumption, it will listen to the Consumer needs. Otherwise, it is an open market - do not like, do not take. - Michael Poulin

  2. Back to top

    Great Ideas

    Nov 23, 2008 1:53 PM by Colin Jack

    Great stuff, I can definitely see the benefits of such an approach.

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.