ranked icon indicating copy to clipboard operation
ranked copied to clipboard

Spring Configuration and CQRS

Open zambrovski opened this issue 8 years ago • 1 comments

After a small discussion with @jangalinski we identified the following problem. A system configuration provided by properties file (application.yml) should not change the system behavior. In general this is a problem, because the properties are exactly made for this: change the behaviour of the application. Having no "current" state in the application makes it difficult to handle. Here is an example:

Imagine we configure the property of number of sets to win a set to 6. The matches created with this value are validated against this number and the corresponding events are stored. If this number changes (because we consider the new rules and play till 10), the events created with value 6 become invalid.

To handle this issue, ths configration must be held inside of an aggregate. A config change should be considered as a system command, and the aggregate may reject it, or send the corresponding events to the components.

zambrovski avatar Dec 11 '17 15:12 zambrovski

I started working on this today ...

jangalinski avatar Dec 26 '17 20:12 jangalinski