Skip to content

Define an event as the sum of two events #1615

Answered by mostlyobvious
jbpfran asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

what you've described fits perfectly into a definition of a Process. There are certain condition to be met over time (expressed with ProfileUpdated and AvatarUpdated events). When they all happen, a barrier breaks and we propagate changes.

A component that handles such processes is called a Process Manager. It takes events as input (something happened), issuing a command when all conditions are met (do something):

f(events) -> command

In RailsEventStore this would be an event handler. Such handler needs to be subscribed to both events you've mentioned. Also both events need to have something in common, i.e. an identifier of entity they describe (like profile_id), so that we could …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fidel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants