How to design database agnostic references in DDD -


while working on separating applications data domains , make them work independently 1 cannot avoid references other domains. while data domain should accessible via api couldn't find answer on how design reference between domains are

  • they api centric
  • database agnostic
  • not losing database functionalities grouping

enter image description here

the image should visualize intend, though right approach here?

when multiple systems have interact each other, i'd recommend using guids store references between them.

as per description, guids used globally uniquely identify something, regardless of , it's stored. if have multiple systems storing data in different places, , you'd need merge/group them , ensure uniqueness, use guids. are:

  • unique across tables, databases, servers, can safely join/merge data stored in different places
  • predictable, no need insert in table generate it
  • no need of central authority, if multiple systems registering orders, example, , need share them, there no need have central place control whether duplicates
  • people/evil robots can't call method in api guessing ids, improves security

you can read more here.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -