Now that we have developed some microservices, seen API Gateway, and understood service registry and discovery, it's time to dive deeper into microservices and understand the system from an individual microservice point of view. To gain the most benefits out of microservices architecture, every component in the system has to collaborate in just the right way—a way that ensures that there is most likely no coupling between microservices, which will enable us to be Agile.
In this chapter, we will understand various communication styles between microservices and see how services exchange data among themselves. Then we will move on to the service bus, an enterprise way of how system components communicate with each other. Many services would need to persist some state in one form or another. We will see how to make our service stateless. We will see the current database landscape and understand service state. We will understand pub-sub pattern...