Am 13.12.2012 um 17:27 schrieb Stéphane Ducasse <stephane.ducasse@inria.fr>:
Hi all,
Please, anyone knows a Pharo framework to implement CQRS and/or Event Sourcing?
I read in diagonal the paper of martin fowler and I would say just some command patterns? + some meta modeling? no?
Well, you can give that particular answer to _a lot_ of problems :) I think the important part is the "event store" and how you snapshot state. So it is more or less a persistence question. Staying in-image it is rather easy. I use an approach where I still have the business objects holding state. But state is altered through commands and every command emits a set of events that get written to a timeline. The objects analyzing the timeline are more CQRS like because the state evolves out of the timeline. So I have an Event class with instVar time (aDateAndTime) A timeline is a sorted collection (by time) of events. An object has a stream on the timeline. Its position is the positional information about the snapshot state. Snapshot state is updated by following the stream (next: 100, upToDate: ⦠upToEventType:â¦) Altogether you have sources that put events on the timeline. Separated from that you have the consumer that reads the snapshot state and updates it. Norbert