I've been reading about CQRS and Event Sourcing lately, and I plan to try it out by creating a demo application about hotel reservations - that domain should be rich enough to require all tools in the Event Sourcing toolbox (I have experience about the domain through work projects). I want to implement it "without frameworks" (on top of RDBMS) to learn CQRS/ES more deeply. I'll also share it on GitHub as an example application.
I found the article Building an Event Storage [1] useful for understanding how to store the events, and Greg Young's CQRS Class [2] I found useful for understanding how to write aggregate roots and command handlers. They had enough code examples to make the concepts concrete and understandable.
I still need help in understanding how to implement process managers (or sagas) and projections.
Greg Young's CQRS class went through process managers at a far too abstract level, without concrete code, so I'm having a hard time understanding how to implement them. I've understood that process managers can be implemented as aggregate roots, but that description still leaves far too many implementation details open. Some things I'm struggling with: how process managers are created, how events are sent to process managers, how the process manager is persisted etc. etc. I need to see code.
Similarly I'm not yet 100% sure about how to implement projections. The part that wonders me is that how the events make their way from the event store to the projections, and how projections will keep track of which events they have already processed. I suppose there are various options depending on how the event store is implemented.
Do you know about good code examples for implementing process managers? For example a full example application which uses them, or a good concrete article similar to [1]. Ideas for the various ways of implementing projections are also welcome.