Skip to content

Determining which modules own whicn entities #338

Open
@josealbertocoronado

Description

@josealbertocoronado

Hi, thanks for this repo, really useful.
I wanted to ask about something that has caught my attention:

MeetingGroupProposal entity exists both in ApplicationContext and MeetingContext and I'm wondering whether that's correct from a DDD perspective?
I mean, shouldn't each entity be owned by one (and only one) module? Is it ok to have more than one module accessing to the same entity directly? With that approach, nothing prevents us from starting use the same entity in more modules, ending up with all modules been able to access all entities? also, how would that work if we wanted to separate modules in different databases?

Let's say this was a microservices architecture rather than a modular monolith: in that case only one of the microservices would have access to the entity, the other one should get that data differently (maybe by caching it via integration events). Is it not he same idea here?

Thanks in advance.
Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions