Chapter 9. Data Ownership and Distributed Transactions

Friday, December 10 09:12

While the database team works on decomposing the monolithic Sysops Squad database, the Sysops Squad development team, along with Addison, the Sysops Squad architect, start to work on forming bounded contexts between the services and the data, assigning table ownership to services in the process.

“Why did you add the expert profile table to the bounded context of the ticket assignment service?” asked Addison.

“Because,” said Sydney, “the ticket assignment relies on that table for the assignment algorithms. It constantly queries that table to get the expert’s location and skills information.”

“But it only does queries to the expert table,” said Addison. “The user maintenance service contains the functionality to perform database updates to maintain that information. Therefore, it seems to me the expert profile table should be owned by the user maintenance service and put within that bounded context.”

“I disagree,” said Sydney. “We simply cannot afford for the assignment service to make remote calls to the user maintenance service for every query it needs. It simply won’t work.”

“In that case, how to you see updates occurring to the table then when an expert acquires a new skill or changes their service location? And what about when we hire a new expert?” asked Addison. “How would that work?”

“Simple,” said Sydney. “The user maintenance service can still access the expert table. All it would need to ...

Get Software Architecture: The Hard Parts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.