Re: Sharing Aggregate Roots between Bounded Contexts
Greg Young <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAC9RQtheyO9e8n+Xm2ayucGUO401kmHb-1XMD0X-jAEzzyA1gQ@mail.gmail.com> |
Buying ticket -> ticket bought -> (asynchronous) game bc denormalized Play game (queries local) -> game played -> asynchronous points management deducts On Monday, May 27, 2013, Greg Young wrote: > Your understanding is incorrect about events they are very often used to > denormalize information from another context. > > On Monday, May 27, 2013, wonderfulworldofpingpong wrote: > > ** > > > Greg, thanks for the response. > > Are you advocating not to use a USER entity in every BC but any BC > (Game/Food/Products) that needs to know the points make a GET CALL (query) > to the Points management BC? That is possible. However, this makes the > Game, Food, Products BC depend on the Points Management BC. > > You have to consider another important business rule here. That is, if the > user does not have points he can't enter the section/stall. The Game BC can > send an event to the points management BC, but the Game BC has to check the > balance to allow or not the visitor. So the Game BC has to wait to complete > the deduct points event, so to check the balance which makes the Game BC > waiting. > > My understanding is that the events are for a pub/sub pattern like command > processing and not for query. > > --- In [email protected], Greg Young <gregoryyoung1@...> > wrote: > > > > Why not just make a call trydeductpointsforcstomer or get/remove points > for > > customer to points management? > > > > Or better make them all raise events? > > > > On Monday, May 27, 2013, wonderfulworldofpingpong wrote: > > > Reply via web post<http://groups.yahoo.com/group/domaindrivendesign/post;_ylc=X3oDMTJxZXZmYzZnBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBG1zZ0lkAzI0MDk0BHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTM2OTYyMDE4MA--?act=reply&messageNum=24094> Reply > to sender Reply to group Start a New Topic<http://groups.yahoo.com/group/domaindrivendesign/post;_ylc=X3oDMTJldGYydTZrBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTM2OTYyMDE4MA--> Messages > in this topic<http://groups.yahoo.com/group/domaindrivendesign/message/24084;_ylc=X3oDMTM2cG1qcGNxBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBG1zZ0lkAzI0MDk0BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTM2OTYyMDE4MAR0cGNJZAMyNDA4NA-->(7) > Recent Activity: > > - New Members<http://groups.yahoo.com/group/domaindrivendesign/members;_ylc=X3oDMTJmN20zMjkwBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEzNjk2MjAxODA-?o=6> > 3 > > Visit Your Group<http://groups.yahoo.com/group/domaindrivendesign;_ylc=X3oDMTJlN2pnc25oBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTM2OTYyMDE4MA--> > <http://groups.yahoo.com/;_ylc=X3oDMTJka29rOWxiBF9TAzk3MzU5NzE0BGdycElkAzgxMTY5MjMEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMzY5NjIwMTgw> > > -- > Le doute n'est pas une condition agréable, mais la certitude est absurde. > -- Le doute n'est pas une condition agréable, mais la certitude est absurde.