Command-query responsibility segregation (CQRS) pattern

In the microservices world, implementing queries that join data from multiple services and their own databases is a real challenge. The solution approach is to split the application into two parts; the command side and the query side. The command side handles create, update, and delete requests and emits events when data changes. The query side handles queries by executing them against one or more materialized views that are kept up to date by subscribing to the stream of events emitted when data changes. The advantages are many. This pattern is especially necessary for an event-driven architecture (EDA) environment. This gives improved separation of concerns and supports multiple denormalized views.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset