Resulting context

The primary benefit of this solution is that it helps teams recognize the first order importance of asynchronous inter-component communication in cloud-native systems. In Chapter 4, Boundary Patterns, it will become clearer how critical a role asynchronous communication plays in cloud-native systems. Asynchronous communication is nothing new, but generally it has not been the primary form of communication and thus tends to not receive the proper attention. Instead, thinking about bounded isolated components in terms of their Trilateral API and how these touch points can fit together, helps simplify and compartmentalize the complexity of reactive systems.

It is hard to perform integration and end-to-end testing on distributed systems because so many components have to be coordinated. It is hard to automate test asynchronous systems, regardless of size, because the tests have to poll for messages within a reasonable amount of time. Thus, testing asynchronous distributed systems is extremely difficult when employing traditional testing techniques. In Chapter 7, Testing, we will discuss how consumer-driven contract testing addresses this complexity, with what I refer to as transitive integration and end-to-end testing, without the need for all components running at the same time. What is important now, in the context of this discussion, is that this enables teams to know immediately when they have made an API change to an event type definition that is not backward compatible.

Documentation improves communication across teams and increases confidence, as the stream topology and the event type definitions align with the various bounded contexts and the ubiquitous language of the system. The upstream and downstream dependencies of the system should be well defined. This, in turn, identifies the necessary consumer-driven contract testing, which helps ensure backwards compatibility. Understanding the various APIs and the required resources for each component helps teams ensure they have the proper technology bulkheads. Altogether this helps teams to continuously deliver with a higher degree of confidence.