Interactive chapter · Pattern map · Read after chapter 1, come back any time

The pattern map: every problem, and the pattern that fixes it

Each microservice pattern fixes one problem and hands you the next. Start from FTGO’s monolith, fix its problems one pattern at a time, and watch the new problems each fix creates.

open problemtrade-off to acceptpattern appliedfast fail / compensation

Why patterns come in chains

A pattern is a reusable answer to a problem in a context. The useful part is what happens after you apply it. Every pattern has a resulting context: benefits, costs, and new problems that need patterns of their own.

One chain through the pattern languageMicroservices create the shared database problem. Database per service fixes it but removes ACID across services. Saga fixes that but needs save-and-publish to be atomic. Transactional outbox fixes that but needs a relay, which transaction log tailing provides. Microservicesthe first pattern services share tables DB per servicefixes it no ACID across services Sagafixes it save + publish at once? Outboxfixes it who sends the rows? Log tailingfixes it
Read left to right: each fix (teal) creates the next problem (coral). The game below lets you walk every chain like this one.
Source: pattern names, groups and page numbers follow Chris Richardson’s Microservices Patterns (Manning, 2018). The explanations and story steps on this page are written for this course.

Game: fix FTGO, one pattern at a time

FTGO (Food To Go) runs one large monolith. Each card below is a real problem: pick the pattern that fixes it. Some choices are traps that solve a different problem, and the card says why. Some problems have no pattern at all: they are trade-offs you accept and design around.

Problems in, patterns out

Fixed problems move to the log, along with the new problems each pattern caused. Click any pattern name in the log for its full card.

0open problems
0problems handled
0patterns used
0wrong picks

What happened

All 45 patterns, by the problem they solve

The same patterns, grouped the way the book groups them. Green ones are those you used in the game. Click a pattern to see its problem, solution and cost, and the chain around it: what made it necessary, and what it leads to.

The pattern language

Type a symptom (“slow”, “twice”, “who is the user”) or a pattern name to filter.


Quick check: name the pattern

Symptom → pattern

8 questions. Pick one answer each.

    Recap

    Microservice patterns: common questions

    Which microservice pattern solves distributed transactions?

    The saga pattern: a sequence of local transactions, one per service, with compensating transactions that undo earlier steps when a later one fails.

    How do you publish an event reliably when you update a database?

    Use the transactional outbox: insert the message into an outbox table in the same transaction, then relay it to the broker by polling or transaction log tailing.