Complex architecture patterns
Seven patterns, each with the problem it solves, its price and when to do without it: microservices, API gateway, event-driven architecture, CQRS, event sourcing, saga and circuit breaker.
- 27 cards
- 5 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- On the diagram
- Scenarios
A few cards from the deck
Microservices: what is it?
Show the answer
Splitting an application into small, separately deployable services, each built around a business capability and owning its data.
The gain: teams that deploy without waiting for each other. The price: much heavier networking, data consistency and operations. A small team is usually better off with a monolith.
An account receives +100, then -30, then +20. With event sourcing, what does the database keep?
- The three movements, in order; the balance of 90 is recomputed by replaying them
- Only the current balance of 90, updated on each movement
- The balance and the date of the last movement only
- A copy of the balance after each movement, without the movements
Show the answer
The three movements, in order; the balance of 90 is recomputed by replaying them
The event is the source of truth, the state is only a summary: you can recover the balance at any date and audit every change. Storing only the balance loses that history.
In publish and subscribe, the sender publishes on a … and each … receives a copy of the message.
Show the answer
In publish and subscribe, the sender publishes on a topic and each subscriber receives a copy of the message.
The sender does not know its recipients: they can be added or removed without touching it. A plain queue, by contrast, hands each message to a single consumer.
API gateway: what is it?
Show the answer
A single entry point placed in front of several services, which routes requests and centralises authentication, rate limiting and logging.
The client knows one address instead of ten. The price: one more link, which becomes a point of failure if it is not duplicated.