InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Article: Ian Robinson on Consumer-driven Contracts

Posted by Stefan Tilkov on Jul 28, 2008

Sections
Architecture & Design,
Enterprise Architecture
Topics
SOA ,
Design ,
Governance
Tags
WSDL ,
policy ,
XML Schema

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 SOA
whose contact is more contractible by Michael Poulin Posted
Great Ideas by Colin Jack Posted
  1. Back to top

    whose contact is more contractible

    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

    by Colin Jack

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

Educational Content

Jesper Boeg on Priming Kanban

In this interview, Jesper Boeg, author of the new InfoQ book – Priming Kanban, discusses the keys to using Kanban effectively, and how to get started if you are currently using other approaches.

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.