4 Communication Patterns
This chapter presents the fundamental building blocks regarding communication in distributed systems.
The Gateway Routing pattern in § 4.1 abstracts the location of the underlying services from any clients, presenting the system as if it was a single service
The Publisher–Subscriber pattern introduces a common way to decouple and scale communication between services in § 4.2 and message brokers, a common way to implement this communication style, in § 4.2.7
The Asynchronous Request–Reply pattern then fills in a gap introduced by employing messaging or asynchronicity in general, that is, how to handle responses, in § 4.3
As distributed systems necessitate communication, many other patterns could be included in this chapter but are presented elsewhere due to their focus on other aspects of the system, such as:
Ambassador handles communication on behalf of a service
Queue-Based Load Leveling focuses on how messaging can improve reliability
Competing Consumers and Scatter–Gather extend messaging to bring scalability
Messaging Bridge shows how to connect two systems using incompatible messaging
Transactional Processor, Transactional Outbox, and Event Sourcing show how to communicate transactionally
Choreography and Orchestration show how to coordinate processes in services
Colocate uses physics to speed up communication and make it more reliable
Patterns in ch. 7 can be necessary to handle communication failures
Overall, this is just a subset of the topic and was covered in depth by Hohpe et al. [4] or Richardson [20, p. 85].