Decomposition Lab
Retrieval Prompts
- State the three criteria that define a microservice.
- Name the five readiness tests from the cost model.
- Name the three decomposition lenses from concept 05.
- Name two anti-patterns from concept 06 and one symptom of each.
- State the strangler-fig migration steps in order.
Compare and Distinguish
Separate these pairs clearly:
- bounded context vs microservice
- distributed monolith vs capability-scoped services
- entity service vs verb-owning service
- decomposition by entity vs decomposition by business capability
- monolith-first vs big-bang rewrite
Common Mistake Check
For each statement, identify the error:
- "We have one repo per service and they deploy in Kubernetes, so it is a microservices architecture."
- "We split by entity: Customer Service, Product Service, Order Service. Every workflow calls a sequence of these services."
- "We will rewrite the monolith as microservices next year. Feature freeze now."
- "Two services share the
userstable because the Accounts team and the Profile team both need it." - "Our six-person team owns 14 microservices."
Mini Application
Pick one of the following monoliths and decompose it. Budget: 45 minutes.
- Case A: An e-commerce retailer (catalog, cart, checkout, orders, payments, inventory, fulfillment, accounts, reviews, recommendations).
- Case B: A SaaS project-management tool (workspaces, users, projects, tasks, comments, files, notifications, billing, integrations).
- Case C: A ride-sharing backend (rider, driver, trip, pricing, routing, payments, ratings, dispatch, notifications).
For your chosen case, produce:
- Bounded contexts (3-5 contexts, one sentence of ubiquitous language each).
- Decomposition table (apply all three lenses: capability, subdomain core/supporting/generic, noun/verb).
- Proposed services (3-6 services with name, verbs owned, owned data).
- Anti-pattern audit: for each service, state why it is not an entity service and why it can deploy independently.
- Strangler-fig first cut: which service would you extract first from the existing monolith, and why is it the lowest-risk cut?
- Team topology sketch: which team owns each service; is any service split across teams?
Use this table template for the decomposition:
| Service | Owned verbs | Owned data (aggregates) | Cross-service dependencies |
|---|---|---|---|
Evidence Check
This page is complete only if you can:
- defend the number of services (not too many, not too few)
- name the owned data for each service without looking up your notes
- explain in one sentence why your decomposition is not a distributed monolith
- name the first cut for strangler-fig migration with a rollback plan
If any of those are shaky, run the mini application for a second case. The habit being built: decomposition is a reflex, not a one-time diagram.