debasishg / frdomain

Code repo for Functional and Reactive Domain Modeling
Apache License 2.0
467 stars 136 forks source link

Service method is <1-1> to Command but can generate multiple Events #36

Open SemanticBeeng opened 8 years ago

SemanticBeeng commented 8 years ago

@debasishg a question about what comes first, Command or Event.

In the current code the service operations are mapped to a single Event which, in turn is mapped to a Command. Seems this would not support a functionality where a service operation (logically a Command) would need to generate multiple Events to different Aggregates.

Scenario: funds transfer would update Account balances and update Customer net worth.

Then there is the question of whether the Interpreter is per Aggregate or can work with more than one.

Please advise.