The modern systems we build, whether they are distributed monoliths, service-oriented systems, or microservices, involve multiple moving parts that continuously change and evolve. One of the nightmares for every developer is waking up to calls that their service does not work because another service they depend on downstream has changed. A sensible solution would be to know of changes well ahead of time to prevent applications from breaking or falling apart. Consumer-Driven Contracts, which serve as executable documentation of the interface between systems, are a good proactive way to ensure that.
In this presentation, we will discuss the needs, the cost, and the perils of evolving interfaces. Then we will discuss how consumer-driven contracts can help mitigate the risk. We will learn by creating executable contracts for Spring endpoints as a way to illustrate the concepts.