There are various examples of applications and frameworks that implement the CQRS + Event Sourcing architecture, and most of them describe the use of an event handler to create a denormalized representation of domain events stored in an event store.
One example of hosting this architecture is the web api, which accepts commands on the write side and supports the request of denormalized views. This web api is likely to scale for many machines in a load balanced farm.
My question is where are the read model event handlers located?
Possible scenarios:
Hosting in one Windows service on a separate host. If so, will this not create a single point of failure? This probably also complicates the deployment, but it guarantees a single thread of execution. The disadvantage is that the reading model may exhibit increased latency.
Hosting as part of the web api itself. If I use EventStore , for example, to store events and process events, I will use several handlers (one in each web farm process) for each individual event and, therefore, cause conflicts in the handlers when they try to read / write to your reading store? Or do we guarantee that for a given aggregate instance, all its events will be processed in turn in the order the events are executed?
2, , , . , .
EventStore ? ?
EDIT:
, , "Q" CQRS.
, , "" read models/sagas/etc, , , , .
, , , .
/ , , . (), / , "/" .
pub/sub, , ( , ..) . , , , . / concurrency.
, - node . ; / , .., .
/
/, () .
, . /, , . , , - node, .