Skip to main content

Decomposition Lab

Retrieval Prompts

  1. State the three criteria that define a microservice.
  2. Name the five readiness tests from the cost model.
  3. Name the three decomposition lenses from concept 05.
  4. Name two anti-patterns from concept 06 and one symptom of each.
  5. 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:

  1. "We have one repo per service and they deploy in Kubernetes, so it is a microservices architecture."
  2. "We split by entity: Customer Service, Product Service, Order Service. Every workflow calls a sequence of these services."
  3. "We will rewrite the monolith as microservices next year. Feature freeze now."
  4. "Two services share the users table because the Accounts team and the Profile team both need it."
  5. "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:

  1. Bounded contexts (3-5 contexts, one sentence of ubiquitous language each).
  2. Decomposition table (apply all three lenses: capability, subdomain core/supporting/generic, noun/verb).
  3. Proposed services (3-6 services with name, verbs owned, owned data).
  4. Anti-pattern audit: for each service, state why it is not an entity service and why it can deploy independently.
  5. Strangler-fig first cut: which service would you extract first from the existing monolith, and why is it the lowest-risk cut?
  6. Team topology sketch: which team owns each service; is any service split across teams?

Use this table template for the decomposition:

ServiceOwned verbsOwned 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.