Part 8 of 8 · 3 min read
Exercises
Easy
Easy 1: Break the four rules (20 minutes)
For each of the four rules in section 1, write one concrete design that breaks it and say who feels the pain.
Done when: four designs with four named victims.
Hint
Start from the reason column in the table.
Easy 2: Sync or async (20 minutes)
Classify these as better sync or async, with one reason each: card payment at checkout, thumbnail creation, order-shipped email, price lookup.
Done when: four rows with a choice and a reason.
Hint
Ask whether the caller needs the answer before it can continue.
Easy 3: Read the version (20 minutes)
A caller is built against version 2.3.1. For each of 2.3.4, 2.4.0, 2.2.0 and 3.0.0, say whether it should work and why.
Done when: four answers using the semantic versioning rules.
Hint
Only the major number allows breaks, and a lower minor may lack features.
Medium
Medium 1: Conductor or dancers (30 minutes)
Design the order-placed flow in both styles: reserve stock, take payment, send email, update loyalty. Draw both and list who knows what.
Done when: two diagrams and a table of knowledge per service.
Hint
In the dancers version, nobody holds the whole flow.
Medium 2: Tolerant reader (30 minutes)
A customer response has 10 fields. A caller needs 3. Write the caller's reading rule, then list four changes to the response that must not break it and one that will.
Done when: a reading rule and five labelled changes.
Hint
Read by name and ignore position.
Medium 3: Poison message (30 minutes)
A queue job crashes workers. Design the retry limit, the dead letter queue, the alert and the replay screen. Give numbers, marked as made up.
Done when: a design with numbers and a replay procedure.
Hint
A message that fails the limit should stop going back to the main queue.
Hard
Hard 1: Expand and contract plan (45 minutes)
Plan the move of a price field from a number to an object holding amount and currency. 12 callers use it. Give a week-by-week plan with the versions offered at each stage.
Done when: a plan with stages, versions and the check for removing the old field.
Hint
Offer old and new together, and remove the old one only after nobody reads it.
Hard 2: Hybrid design (45 minutes)
A travel site books flights, hotels and cars. Choose sync or async, request or event, and conductor or dancers for each link, and justify them.
Done when: a table with a choice and reason per link.
Hint
The payment-like links need a quick, firm answer.
Hard 3: Escape database integration (50 minutes)
Three applications edit one customers table. Plan how to move to a customer service without a stop in service. Include the order of steps and how to find all the users of the table.
Done when: a step plan with a rollback at each step.
Hint
Put the service in front first, move readers one by one, and only then change the table.