-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As requested: issue #13 #16
Conversation
…he changes are not significant insofar as *how* the event gets pushed to the view models, but the concept of a 'Publish(event)' has been removed (including the implementation), so as not to create the false impression that event sourcing should follow the "store event -> publish event to queue" pattern. As stated by Greg Young, using an ESB creates all sorts of headaches when wanting to rebuild view models, or add new subscribers that require events from the beginning of time, not to mention the messaging issues created when not managing the ES & ESB within a distributed transaction. ~TLDR: The new subscriber semantics are designed to encourage the treatment of the event store as a commit log, doing away with any notion of an ESB, where any subscriber (new or old) can for whatever reason begin receiving events from the commit log (aka the event store) at any point in time (the position in the log), be it the start of time, or regular continuations of receiving the latest events
Couple of questions about the code: Inquiring minds want to know :) |
I'm on holidays and will try to review tomorrow. |
Here's another question: Is this valid? |
The unsubscribe token is just there for detaching from the event stream at runtime. It's by no means necessary. I copied a portion of some code I use, which is why it made it in there.
The only reason I made the pull-request and changed the event stream was because at a conceptual level, it was incorrect and was leading people into thinking an esb was required, which is false. In fact, having the bus was very much antithetical to the architecture @gregoryyoung is trying to promote. I was in no-way critical of any of the implementation detail of the code, just that one core concept, which is rather important. Again, my advice would be to not worry about the implementation detail too much. If you did, you would have to throw the whole example away as most - if not all of it - is not production worthy code. It's just meant as a tool to convey the concept of writing changes to an event stream via an aggregate, and using that event steam to build read models. |
#13 (comment)
The changes are not significant insofar as how the event gets pushed to the view models, but the concept of a 'Publish(event)' has been removed (including the implementation), so as not to create the false impression that event sourcing should follow the "store event -> publish event to queue" pattern. As stated by Greg, using an ESB creates all sorts of headaches when wanting to rebuild view models, or add new subscribers that require events from the beginning of time, not to mention the messaging issues created when not managing the ES & ESB within a distributed transaction.
~TLDR: The new subscriber semantics are designed to encourage the treatment of the event store as a commit log, doing away with any notion of an ESB, where any subscriber (new or old) can for whatever reason begin receiving events from the commit log (aka the event store) at any point in time (the position in the log), be it the start of time, or regular continuations of receiving the latest events