Architectures in motion
A transfer from Alice to Bob, €250, told by nine animated diagrams. Each one shows what an architecture really changes: the direction of dependencies, round trips, failures, queues that overflow.
Six questions, not one ladder
These architectures do not all answer the same question, and they combine from one family to another. Underlined names have their scene.
① How to organize the code inside an application?
Layered · Hexagonal · Onion · Clean · Functional Core · Vertical Slice · Microkernel · Pipeline · Mediator
② How to split the system into independent pieces?
Package by Component · Modular Monolith · Microservices · Serverless · Orchestrated Saga · Multi-tenant · BFF · Cells · Actors · Space-based · Choreography · Resilience
③ How to model the business and the data?
DDD · CQRS · Event Sourcing · Transaction Script · Active Record
④ How to replace an existing system?
⑤ How to expose the system to its clients?
⑥ How to organize the user interface?
MVC · MVVM · MVU
The scenes
Each scene simulates a demo of the repository in the browser, with its figures. Play, pause, step, and buttons to trigger what the demo shows.
The direction of dependencies: layers or hexagon
The same bank, built in layers then as a hexagon.
Modeling · demo 9CQRS: eventual consistency
One model to write, another to read, linked by events.
Modeling · demo 10Event Sourcing: the balance doesn't exist, it is replayed
Alice's balance is not stored, the sequence of facts is: opening, withdrawals, transfers.
System decomposition · demo 14 · 21Orchestrated saga or choreography: the same transfer
A transfer in several steps, over several services, without a common transaction.
Code organization · demo 20Pipeline: back-pressure and the bottleneck
A file of transfers goes through six filters linked by bounded pipes.
System decomposition · demo 17Cells: bounding the blast radius
Several complete copies of the system, each for a group of customers.
Migration · demo 22Strangler Fig: migrating route by route
A façade in front of the legacy system takes its functions away one route at a time, in favour of the new one.
System decomposition · demo 27Resilience: not going down with a partner
Before each transfer, the bank asks a fraud-detection partner.
Exposure · demo 23REST, GraphQL, gRPC: one screen, three ways
The same home screen (Alice, her three accounts, their last operations) loaded by three clients.