Re: Re: Same aggregate in 2 bounded contexts
"Jose Fernandez [email protected] [domaindrivendesign]" <[email protected]> Fri, 2 Jan 2015 19:55:38 -0500
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
I think you're a little confused with the concepts of DDD. Your persistence layer will guarantee that you have your entities "sync" because after all your entities Suppliers, regardless of the BC, are being populated by their respective repositories. So, if you need instant notification from one BC to another, use events. If not, once your BCs start loading their entities, it should get a fresh copy from the repo with whatever data exists in the database. I don't understand what you mean dump data from one BC to another. Sent from my iPhone > On Jan 2, 2015, at 4:06 PM, [email protected] [domaindrivendesign] <[email protected]> wrote: > > Thanks Jose for your reply. > > > so we agree that I can have the same entity Supplier in multiple BCs. My next question is how can I keep those entities in sync? > > For example, if I disable a Supplier in BC1 I'll need this info to be propagated to the other BCs. > > Currently we do a nightly batch script that dumps the data from BC1 to the other BCs, but I'm beginning to think this approach isn't really the best way out there. > > >