• A Kumar

    I think the event based model you have described is very practical. I am wondering however whether it is a reasonably complete solution.

    An object may contain data made up of contributions from various services that cross the boundary of aggregates. Such shared objects are the reality of every business domain. Now if such an object is involved in a transaction, won’t this necessitate distributed transactions & multi-phase commit?

    April 30, 2019
    • Alexander Yermakov

      Take a human, for a example. You. To your employer you are an employee with specific attributes (salary, seniority, department, manager, etc.). To your doctor you are all about your health history, medication, etc. To tax office – it’s all about your income and taxes paid. And so on.

      Each entity within a domain very often has specific meaning in various subdomains, however the only bit of information that is really shared there is its Identity. An entity gets created somewhere – a human is born. And after that fact, all other subdomains may start building their own view of the entity.

      You don’t have multiple subdomains that *own* same pieces of data for a given entity.

      If your subdomain needs to know some bit of information from another subdomain – nothing is stopping you from storing that bit in a *view model* (read only cache that gets updated via processing notification events).

      Hope this helps.

      May 01, 2019

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © Alexander Yermakov