In a complex, interdependent eco-system, where each service is evolving rapidly, we typically end up with an Integration Hell .i.e. the myriad problems that occur when API integrations break down

  • Provider and consumer integrations break when their understanding of the API endpoints are out of sync
  • Working integrations break when the API developer makes a change without informing the consumer
  • Development and testing slow down when the consumer depends on the provider API running in a staging environment:
    • The network may be down
    • The environment hosting the API may be down
    • The staging API may crash, or may not even be started
    • Development can be delayed if the staging API is not kept up-to-date
    • API changes can come in at the last minute, resulting in breakage on the consumer side
    • The provider API may break backward compatibility, resulting in breakage on the consumer

Instead, what if we could make the dependencies between the provider and consumers explicit in the form of executable contracts. These executable contracts provide a common, clear definition of their API endpoints. They give instantaneous feedback about accidental breakage to the teams so that they can work independently. These executable contracts are:

  1. Kept up-to-date and acts as a single source of truth
  2. Used for service virtualisation, keeping consumers in sync with the contract
  3. Run as tests against the provider API to validate it's request and response type definitions
  4. Tightly integrated with CI
  5. Capable of pinpointing any backwards-incompatible changes to the contract

This is Contract Driven Development, and it heralds the Death of Integration Hell.

Here's a sample contract:

code-window.png

This session will demonstrate all the key points of Contract Driven Development as implemented by the teams using an open-source tool called Qontract.

 
 

Outline/Structure of the Talk

  • Contract-driven development using Qontract - 10 mins
  • Test-drive your APIs using executable specifications - 10 mins
  • Backward compatibility verification - 10 mins
  • Service virtualisation - Isolate yourself from downstream dependencies - 10 mins
  • Sharing and versioning your contracts seamlessly - 5 mins
  • CI/CD pipeline Integration - 10 mins
  • Next Steps and Q&A - 5 mins

Learning Outcome

  • Learn how to define better contracts between two services (provider and consumer-driven contracts)
  • Discover how to capture those contracts as executable specs
  • Understand how contract tests can prevent the provider from accidentally breaking the consumer

Target Audience

This session would make most sense for teams actively building and testing large complex systems with multiple dependencies. If you are building a system using microservices architecture, then definitely you'll benefit from this session.

schedule Submitted 1 week ago