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) ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.png


(2) Pattern: Common Ownership (data ownership in microservices) ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.1.png solution: create a service around the shared table eg. create a service “Audit Service”


(3) Pattern: Joint Ownership (data ownership in microservices) ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.2.png

Solution 1: table split pattern ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.3.png catalog needs to update inventory synchronous vs asynchronous communication

Solution 2: data domain ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.4.png -> bounded context now contains 2 services

Solution 3: delegation ./resources/model-3-data-ownership-patterns-in-microservice-ar.resources/unknown_filename.5.png