InterviewKata
Architecture styles · Start here

Start here: one app, many architectures

An architecture style is a set of big structural choices that tend to go together: how many things you deploy, how the parts talk, where the data lives, and which way dependencies point. This page introduces Pedal, the app every style page builds, and shows how to read the pages.

1. What a style is

Houses can be terraced, detached, a block of flats or a row of tiny homes sharing a garden. Each layout decides how far you walk to a neighbour, what one leaking roof affects, and what it costs to add a room. Nobody calls a block of flats "wrong"; it suits some families and lots, not others. Architecture styles are layouts for software.

Every style answers four questions, and the pages in this track always come back to them:

QuestionTwo very different answers
How many things do we deploy?One application (monolith) · dozens of services (microservices)
How do the parts talk?Direct calls that wait for an answer · events that nobody waits for
Where does the data live?One shared database · one store per part
Which way do dependencies point?Business rules depend on the database · the database plugs into the rules

Styles are not exclusive. A real system is usually a few styles at different sizes: microservices on the outside, each one hexagonal inside, talking through events. Page 16 is about combining them. The ideas behind the choice (characteristics, trade-offs, decision records) are taught in the Software architecture track; this one shows each style built and running.

2. Meet Pedal

Pedal runs a city bike-share: 400 docking stations, 6,000 bikes, about 60,000 rides on a weekday, with a sharp peak between 8 and 9 in the morning. Every style page builds the same core flow:

  1. Unlock. A rider scans a dock's code in the app; Pedal checks the account and payment method, and the dock releases a bike.
  2. Ride. The ride is open; the bike is "in use".
  3. Return. The rider docks the bike at any station with a free slot; the ride closes.
  4. Pay. Price the ride and charge the card. Pay-as-you-go: £1.00 to unlock plus £0.10 a minute. Members: no unlock fee and 30 free minutes, then £0.10 a minute.

Around that core sit the parts that make each style's trade-offs visible: rebalancing crews who move bikes from full docks to empty ones, dock hardware that sends status every few seconds, monthly reports for the city, and new cities that each want slightly different rules.

3. How to read a style page

SectionWhat it gives you
1 · In one pictureAn everyday analogy and the parts the style defines
2 · Pedal built this wayA numbered figure following one rental through the parts
3 · The rulesThe few rules that make it this style, and what breaking each looks like
4 · How it goes wrongThe common ways teams end up with the costs and not the benefits
5 · The codeA small program in Python, TypeScript and Java, compiled and run before publishing
6 · Try itA lab or simulator for the style's central trade-off
7 · What it costsGains, pains, and which style to pick instead in which situation
8 · Signs you've outgrown itThe symptoms that say it's time to move on
9 · Remember it and say itA memory hook, and how to talk about it in an interview or design review
10–11A short quiz (it feeds the review deck) and further reading

4. Words every page uses

5. Check yourself

Which of these is an architecture style decision rather than a detail?

It touches many parts, many people, and is expensive to change later.

Can one system use several styles?

Microservices outside, hexagonal inside, events between is a common mix.

6. Glossary

Every dotted word in this track, in one place.

7. Where to go next