Handling distributed transactions.
When everything is normal, the API composition and CQRS patterns can provide appropriate solutions for distributed queries.
However, maintaining the integrity of distributed data is complex. If you store all data in a single relational database and specify the appropriate constraints in the schema, you can rely on the database engine to maintain data integrity.
The situation is very different when multiple microservices keeps the data in isolated data stores (relational or non-relational). Data integrity is critical, but it must be maintained by code. The saga pattern addresses this concern.
A common measure of data integrity is that all transactions that modify data have the ACID properties:
#saga #transactions #patterns #microservices