Paths/Backend Engineer/Service Design & Reliability / Boundaries & Contracts
Draw the Service Boundaries
A boundary is a promise about who may change what. Write it down for the two services, including which one owns each table.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- Directory ~/backend/services exists○
- File ~/backend/services/README.md exists○
- The document names the services○
- The document states which service owns each table○
02Walkthrough
3 steps- 01
Name the services
A service is named after the business capability it owns, not after the team that wrote it.
echo '# Services\n\n## orders-service\n\nOwns the order lifecycle - creation, state changes and the orders table.' > ~/backend/services/README.md - 02
Add the second service and the rule
payment-service owns the payments table. The boundary rule is the sentence nobody is allowed to break.
echo '\n## payment-service\n\nOwns the payments table and the capture and refund flows.\n\n## Boundary rule\n\nA service may only write the tables it owns. Everything else goes through an API or an event.' >> ~/backend/services/README.md - 03
Verify and submit
cat the document, then submit for validation.
cat ~/backend/services/README.md
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list