Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson

Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson

Author:Ovais Mehboob Ahmed Khan, Nabil Siddiqui and Timothy Oleson
Language: eng
Format: epub
Publisher: Packt Publishing Pvt ltd
Published: 2021-09-23T00:00:00+00:00


Sharing dependencies using older techniques

In the n-tier architecture, each layer has a direct reference to the other layer, which makes it tightly coupled and dependent. With microservices, this is one of the anti-patterns. There are cases where one service needs to call another service to complete a transaction. In this case, the service is dependent on the other service. To overcome this challenge, you can build self-contained services.

Building self-contained services

Self-contained services help you collaborate with other services using patterns such as Saga and CQRS. Instead of making direct HTTP calls, the source service communicates with the other service over a message broker. The source service publishes a message, and the other service reads the message and responds. One approach is to keep two queues for requests and responses. That way, both services can communicate asynchronously over this channel.

The following diagram shows the collaboration between services over an asynchronous communication channel:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.