thenativeweb / node-cqrs-eventdenormalizer

Node-cqrs-eventdenormalizer is a node.js module that implements the cqrs pattern. It can be very useful as eventdenormalizer component if you work with (d)ddd, cqrs, domain, host, etc.
http://cqrs.js.org/pages/eventdenormalizer.html
MIT License
38 stars 27 forks source link

[General Question] revisionGuard usage? #50

Closed AlexandreRoba closed 8 years ago

AlexandreRoba commented 8 years ago

Hi there, first thanks for all this open sourced cqrs component. They are of great value. I was wondering if you could point me to some documentation that describes what is the revisionGuard used for? I'm familiar with CQRS and I have followed Greg young intensive CQRS weekend seminar but I do not record having heard of the revision guard :( thanks for any help. Alex.

adrai commented 8 years ago

HI Alexandre!

The revisionGuard is an optional part. (my invention)

If you need your events to be handled in order and your system(messaging layer) does not guarantee it and you have a revision number on your events (incremental number for the event stream) the revisionGuard ensures the ordered handling of the events.

for example if the received events are:

  1. evt0
  2. evt2
  3. evt1

the revisionGuard will handle it that way:

  1. evt0
  2. evt1
  3. evt2

and if there is a some missing events (i.e. if evt1 is never received) after a configurable timeout and EventMissing will be fired => https://github.com/adrai/node-cqrs-eventdenormalizer#wire-up-event-missing-optional

AlexandreRoba commented 8 years ago

Hi adrai, great, thanks for the clarification.