Summary
The microservices architecture is something different from everything else that we've covered in this book and how we build monoliths. Instead of one big application, we split it into multiple smaller ones that we call microservices. Microservices must be decoupled from one another; otherwise, we face the possible problems associated with tightly coupling classes, times infinity.
We can leverage the Publish-Subscribe design pattern to decouple microservices while keeping them connected through events. Message brokers are software that dispatch those messages. We can use event sourcing to recreate the state of the application at any point in time, including when spawning new containers. We can use application gateways to shield clients from the microservices cluster's complexity and expose only a subset of services publicly.
We also took a look at how we can build upon the CQRS design pattern to decouple reads and writes of the same entities, allowing us to scale...