-
Book Overview & Buying
-
Table Of Contents
Microservices Design Patterns in .NET - Second Edition
By :
The previous chapter explored the CQRS pattern, which encourages us to create a clear separation between code and data sources that govern read and write operations. With this kind of separation, we risk having inconsistencies in our data between operations, which introduces the need for additional techniques to ensure data consistency.
We must contend with the typical microservices pattern, where each service is expected to have its own data store. Remember that there will be situations where data needs to be shared between services. Some mechanisms must adequately transport data between services to remain in sync.
Event sourcing is touted as a solution to this issue, where a new data store is introduced that keeps track of all the command operations as they happen. The records in this data store are considered events and contain enough information for the system to track what happens with each command operation. These records are called events...