Model: 3 data ownership patterns (in microservice architecture)

July 28th, 2022

Model: Data ownership (in microservice architecture)

the owner is the one who writes to the table

 

(1) Pattern: Single Ownership

(2) Pattern: Common Ownership

  • solution: create a service around the shared table

(3) Pattern: Joint Ownership

  • solution 1: table split pattern

  • solution 2: data domain

  • solution 3: delegation

 


 

(1) Pattern: Single ownership (data ownership in microservices)

no description for image available

 


 

(2) Pattern: Common Ownership (data ownership in microservices)

no description for image available

solution: create a service around the shared table

eg. create a service "Audit Service"

 


 

(3) Pattern: Joint Ownership (data ownership in microservices)

no description for image available

 

Solution 1: table split pattern

no description for image available

catalog needs to update inventory

synchronous vs asynchronous communication

 

Solution 2: data domain

no description for image available

-> bounded context now contains 2 services

 

Solution 3: delegation

no description for image available