Exercises: Data Mesh
Solutions and grading notes are in the instructor companion. Exercises marked ๐งช use
code/mesh_readiness.py. Several of these ask you to argue against your own conclusion, which is
the discipline this chapter is really teaching.
Warm-Up
Exercise 35.1 โ Do you have the problem?
Difficulty: โ โโ ยท Time: 15 minutes
ยง35.1's four symptoms: a measured wait nobody defends ยท requests that are specifications ยท a central team that cannot say whether a number is right ยท domain teams with shadow pipelines.
- Score your organization on each: yes, no, or unknown.
- How many are "unknown"? For each, say what you would measure.
- ยง35.1 says you need at least three. Where do you land?
Exercise 35.2 โ Which principles need decentralization?
Difficulty: โ โโ ยท Time: 15 minutes
For each of the four principles, answer two questions: does it require domain teams? and could your central team do it alone this quarter?
- Domain-oriented decentralized ownership
- Data as a product
- Self-serve data platform
- Federated computational governance
Then: ยง35.2 claims three of four are good advice at any size. Do you agree? Argue the one you disagree with most.
Exercise 35.3 โ Read the readiness score
Difficulty: โ โโ ยท Time: 20 minutes ยท ๐งช
python code/mesh_readiness.py --readiness
- Kestrel scores 15/32. Which principle scores worst, and by how much?
- ยง35.9 says to read the score by principle rather than in total. What does the total hide?
- Sort the fifteen conditions into passed and failed. What single property distinguishes the two groups?
Core
Exercise 35.4 โ Measure your bottleneck
Difficulty: โ โ โ ยท Time: 60 minutes
ยง35.3's analysis costs one query against a ticket system.
- Export a year of intake. Categorize it โ eight categories is plenty.
- For each: count, median wait, and could a domain team do it?
- Compute the delegable share and, separately, the mean wait for delegable work versus all work.
- Sort by wait time and look at the top three. Are they delegable?
- ยง35.3 found the delegable work already waits less than average. Does yours? If so, what does that mean for a mesh proposal?
Exercise 35.5 โ Test a domain partition
Difficulty: โ โ โ ยท Time: 60 minutes ยท ๐งช
- Propose a domain partition of your own data graph. Four or five domains.
- Express it in
GRAPH's format and run--coupling. - Report: edges crossing, and each domain's fan-out.
- Which tables are read by three or more domains? For each, answer ยง35.4's question: which domain owns it, and what is wrong with every available answer?
- Now redraw the boundaries to minimize crossing edges. What do the resulting domains correspond to in your organization โ and do those teams exist?
Exercise 35.6 โ The shared table
Difficulty: โ โ โ ยท Time: 30 minutes
ยง35.4's ๐ callout: fct_order_line is read by all four proposed domains, and all three ownership
answers are bad.
- Restate the three bad answers in your own words.
- Find your equivalent table. Every organization has one.
- Case Study 1's merged graph has no table read by three or more domains. What changed?
- The mesh literature's answer is "polyseme โ each domain has its own representation." When does that work, and when does it produce Chapter 30 Case Study 1?
Exercise 35.7 โ Price it
Difficulty: โ โ โ ยท Time: 40 minutes ยท ๐งช
python code/mesh_readiness.py --cost
- Run it with your domain count and engineer count.
- ยง35.10 insists the platform team does not shrink. Argue against that โ construct the case where it does โ then say whether you believe it.
- Find the headcount at which your multiple falls below 1.5. How far are you from it?
- Add the transition cost: how many months of paying for both? Multiply.
Exercise 35.8 โ Data as a product, today
Difficulty: โ โ โ ยท Time: 45 minutes
ยง35.5 lists six properties and notes Kestrel has all six with a central team.
- Pick your three most-used datasets. Score each on all six.
- For each missing property, say what it costs to add. Most are hours.
- ยง35.5 says product framing makes "who is the consumer?" a routine question. Ask it of ten datasets. How many have none?
- Case Study 1 found six wholesale tables with no consumer. What did you find?
Exercise 35.9 โ Self-serve, honestly costed
Difficulty: โ โ โ ยท Time: 45 minutes
ยง35.6's arithmetic: 2โ5 days to build an ingestion pipeline, ~8 weeks to make it self-serve.
- Pick a capability your central team performs repeatedly. Count how many times a year.
- Estimate the do-it-yourself cost per instance and the self-serve build cost. Compute break-even.
- ยง35.6's rule: build self-serve for capabilities whose users already exist and are already asking. Does yours qualify?
- Case Study 1's self-serve ingestion took nine months against eight weeks and was used four times. At what usage rate would you call that a failure?
Exercise 35.10 โ The shadow pipeline audit
Difficulty: โ โ โ ยท Time: 60 minutes
Case Study 2's shadow pipeline ran for seven months undetected.
- Find yours. Look for: service accounts with unexplained query patterns, scheduled exports, Google Sheets with API connectors, notebooks on a schedule, laptops.
- For each, measure what Case Study 2 measured: uptime, latency, time to add a metric, cost.
- Compare against the sanctioned equivalent. Be honest about which wins.
- Write the first message you would send its builder. Case Study 2's โ ๏ธ callout is the standard.
- Does anything reconcile it against a gold model? Kestrel's shadow pipeline understated revenue by 9% for seven months because nothing did.
Advanced
Exercise 35.11 โ Extend the readiness model
Difficulty: โ โ โ ยท Time: 90 minutes ยท ๐งช
Add three to mesh_readiness.py, with self-checks:
- A modularity score that finds the best partition rather than scoring a proposed one. Does it agree with your org chart?
- A transition-cost model โ the months of paying for both (ยง35.10).
- A per-domain readiness score, so you can adopt one domain at a time (ยง35.13).
- A "which domain should go first" recommendation, using fan-out and readiness.
- A shadow-pipeline signal: scratch tables with more than one consumer, over time.
- Sensitivity analysis: which single input most changes the recommendation?
Then: run #6. If one input dominates, your model is that input with extra steps โ say which and whether that is a problem.
Exercise 35.12 โ Argue the other side
Difficulty: โ โ โ ยท Time: 60 minutes
This chapter concludes that Kestrel should not adopt a mesh. Write the strongest possible rebuttal.
Requirements:
- Use the chapter's own numbers. Do not dispute the measurements โ dispute what they mean.
- Address the fan-out finding directly. ยง35.4 says no domain is autonomous; argue that autonomy is the wrong criterion.
- Address the cost. $810,000 buys something โ say what.
- Address ยง35.3's finding that delegable work is already fast.
- Then evaluate your own rebuttal. Which of your four arguments is weakest, and why?
Exercise 35.13 โ Design the scratch schema
Difficulty: โ โ โ ยท Time: 60 minutes
Case Study 2's ๐ callout sanctions the pattern rather than the pipeline.
- Specify it for your platform: access, masking, retention, catalog tier, naming.
- Design the promotion path. What makes a scratch table a candidate for a real model?
- Design the reconciliation check. Any scratch table computing a metric that exists in gold gets compared. What threshold, and who is told?
- Case Study 2's check fired eleven times and twice the gold model was wrong. How does your process handle that outcome without embarrassing anyone into silence?
- What is your answer when someone puts a scratch table in a board report?
Exercise 35.14 โ Plan an adoption you would not do
Difficulty: โ โ โ ยท Time: 90 minutes
Even if a mesh is wrong for you, plan one properly โ the exercise is in the sequencing.
- Use ยง35.13's inverted order. Give each of the four steps a duration and a cost.
- Which domain goes first? Justify with fan-out and readiness, not with politics.
- Write the contingency: what triggers reverting a domain to central ownership? (Case Study 1's is "fewer than two engineers.")
- ยง35.8's test: name the person who would approve a change to those teams' responsibilities. Have they seen a proposal like this?
- Write the one-page memo. Lead with the evidence, not the pattern.
Project Milestone
Exercise 35.15 โ The readiness assessment
Difficulty: โ โ โ ยท Time: 3โ4 hours ยท ๐งช
Produce the assessment Kestrel produced, for your own organization.
- The bottleneck analysis โ a year of intake, by category, with wait times and delegable share.
- The coupling analysis โ a proposed partition, its crossing ratio, and every domain's fan-out.
- The shared tables โ anything read by three or more proposed domains.
- The readiness score, reported by principle, never in total.
- The cost, in headcount and dollars, including the transition period.
- The recommendation, in one paragraph, with the three numbers that drive it.
- The two ideas you will adopt regardless (ยง35.11), with a date.
- The shadow-pipeline audit (Exercise 35.10).
Deliverable: a memo of no more than two pages, plus the analysis behind it.
The recommendation must be falsifiable. "Not yet" is not a recommendation; "not until we have domain teams with engineers and a delegable-work wait above ten days" is one, and it tells the next person what changed when the answer changes โ which is exactly what let Case Study 1 re-run the analysis and get a different result.