Handle Others’ Versions
Explore methods to handle version changes in distributed systems by designing API compatibility, using contract testing to verify conformance, and preparing for unexpected input or version mismatches. Understand defensive programming techniques that improve system resilience against evolving external services and consumer behaviors.
Designing for version changes
When receiving requests or messages, our application has no control over the format. No matter how well the service’s expectations are defined, some non-serious person can pass us a bogus message. We’re lucky if the message is just missing some required fields. Right now, we’re just going to talk about how to design for version changes. (For a more thoroughly chilling discussion about interface definitions, see Integration Points). The same goes for calling out to other services. The other ...