You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi thanks for the example implementation, I'm enjoying looking at it.
In event_handler.py I noticed that the event is triggering the corresponding action; for example a post_created_event triggers the creation of the post.
My understanding was that the event should represent something that has happened already? My plan for implementing something similar was to perform the action first and then save the corresponding event.
For example my action might be CreatePost and once the post is created I then store a PostCreatedEvent.
What do you think of this? Would be good to get your views!
Many thanks,
Dom
The text was updated successfully, but these errors were encountered:
@DomHudson If we create the post first, and then create the event, this might get us to an inconsistent state.
In the implementation I've done
Event is created first
Actual data is created after the event.
So if there is an issue creating the data, I can replay the events to get the data to a proper consistent state.
But if I create the object first and then the event, if the event creation fails then there is a chance of inconsistency, as replaying the events would miss out this data (Since storing this event failed).
Hi thanks for the example implementation, I'm enjoying looking at it.
In event_handler.py I noticed that the event is triggering the corresponding action; for example a
post_created_event
triggers the creation of the post.My understanding was that the event should represent something that has happened already? My plan for implementing something similar was to perform the action first and then save the corresponding event.
For example my action might be
CreatePost
and once the post is created I then store aPostCreatedEvent
.What do you think of this? Would be good to get your views!
Many thanks,
Dom
The text was updated successfully, but these errors were encountered: