Closed domagojk closed 7 years ago
You got it half right.
The "revision" refers to the aggregate and it is basically a number incremented with each event ( and appended to it ) to control concurrency and the right order of denormalization ( with help from revisonGuardStore if you use adrai/node-cqrs-eventdenormalizer ).
The "version" refers to the command and it allows you to have two versions of the same command, useful in a scenarios when you change the command expected payload ( ie. producing version 2 of the command ), but some components of your system dispatch older versions of the command.
Understood! :) Thank you.
Hy! I'm new to CQRS/ES architecture and I'm experimenting with my own implementation in node.
Usually in CQRS examples I saw, the word "version" refers to a number which increments every time an event is stored to ensure optimistic concurrency.
But since in this implementation there is both "version" and "revision", I suppose a "revision" is this number which increments every time an event is saved and a "version" refers to command and event "signature" (so it's incremented only when property is changed/added and similar).
Could you please confirm is my assumption correct or is it used differently?