We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

In Event Sourcing: A Projection is the State of the System at some point in time. An Event is the change that occurred to the "State of the System" at some point in time. Regardless of how you cut it the state enters the system as an event, and is aggregated into a projection in order to facilitate processing. So the questions are: Do I need age in order ...


1

The actor model is a conceptual model to deal with concurrent computation. It defines some general rules for how the system’s components should behave and interact with each other. The concept fits well with Event Sourcing application however due to the complexity to implement it´s worth to use it with a stable framework that hides the complexity and ...


2

I almost fully agree with the answer of VoiceOfUnreason. I am adding a bit about how I would validate in the command handler and how I would design the aggregates. Aggregates as transactional Boundary : In domain driven design, aggregates are the transactional boundaries. So all business invariants that need to consistent all the time (not eventually) have ...


2

How can I avoid and protect the command from the concurrency case exposed before? The only way to "protect" yourself against concurrent changes is to hold a lock, which effectively means to have both of the changes be part of the same thing. Once you have decided to distribute the information, concurrency is unavoidable. In some cases, you can mitigate by ...


1

I know that the general concept behind event sourcing is that the state of the application should be able to be replayed from the event stream. Sometimes, however, we need to get information for business rules from other parts of the system. Short answer: Obtaining a stale copy of somebody else's data can be an event, which is to say, you can treat ...


1

First, let me consider this: Now when we try to replay the event stream to re-build the projections with the state of the user is not being stored in events, it is no longer possible. I don't see why it would be no longer possible. After all, the event stream does contain a UserActionBlocked event (judging from your code), so you would just replay that ...


Top 50 recent answers are included