Book preview · First edition

Software Architecture
in Depth

From Foundations to Strategic Trade-offs

Abel Snipher Marube InsightFlow Technologies · Nairobi, 2026
57k
Words
20
Chapters
21
Topics covered
5
Architecture katas
Preface & Part 0 — Mindset & Foundations
1 What Is Software Architecture
2 The Real Drivers – Quality Attributes
3 The Fundamental Trade-off Matrix
Part 1 — The Building Blocks
4Components, Modules, and Boundaries
5Communication Paradigms
6Databases and Data Architecture
Part 2 — Architectural Patterns
7The Monolith – Misunderstood and Valuable
8Layered and Hexagonal Architecture
9Microservices – The Heavyweight Contender
10Event-Driven Architecture
11Other Important Patterns
Part 3 — Deep Dives into Critical "-ilities"
12Scalability Deep Dive
13Resilience Engineering
14Security Architecture
15Observability – See Inside Your System
16Deployability and Release Engineering
Part 4 — Decision Frameworks
17How to Choose an Architecture
18Handling Existing Systems – Technical Debt
19Architecture Governance for Teams
20The Human Side – Communication & Stakeholders
Part 5 — Appendices & Practice
AArchitecture Katas – 5 Full Problems
BCheat Sheets
CRecommended Reading & Resources
DGlossary of Terms (50 entries)
Ready to read?
Click any chapter above to preview · Full book available now
Chapter 1 · Part 0: Mindset & Foundations

What Is Software Architecture

Free preview

Every building has architecture. Not just the famous ones — the Sydney Opera House, the Nairobi City Hall, the Burj Khalifa. The small ones too: a family home, a corner shop, a school classroom. Architecture is not about grandeur. It is about intentional structure — making deliberate decisions about how space is organised, how people will move through it, and what will happen when you need to make changes.

Software has architecture for the same reasons. The decisions you make early — about how pieces fit together, how they communicate, where responsibilities live — will determine whether the system can be understood, maintained, and changed by the engineers who inherit it.

If you ask five software architects to define "software architecture," you will get six different answers. This is not a sign that the field is immature. It is a sign that architecture is a perspective more than a fixed artifact. Three definitions illuminate three essential truths.

Definition 1 — The "High-Level Structure" View
"The software architecture of a system is a set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both."
— Bass, Clements & Kazman · Software Engineering Institute
Definition 2 — The "Decisions" View
"Software architecture is the set of significant decisions about the organization of a software system."
— Philippe Kruchten · Rational Software
Definition 3 — The "Hard to Change" View
"Architecture is the stuff that's hard to change later."
— Ralph Johnson · Gang of Four

The third definition is the most pragmatic. A variable name is not architecture — rename it in ten seconds with a refactoring tool. A choice to store all service-to-service communication in a specific message queue format is architecture — every service in the system depends on it.

There is no hard line between architecture and design. They exist on a continuum. Think of a house: architecture is the floor plan — expensive to change once the foundation is poured. Design is the paint colour — easy to change later.

A decision is architectural when it is expensive to change, when it affects many parts of the system, or when it has deep technical or business consequences. Not every coding choice is architectural — but the ones that are deserve proportionate care.

Rather than debating whether something is "architecture" or "design," apply this test: how long would it take to reverse this decision if it turns out to be wrong?

Under a day
Design decision. Make it, move on, change it later if needed.
1–2 weeks
Borderline. Worth a brief discussion and a note in the codebase.
Over a month
Architectural decision. Document the rationale. Consider the alternatives. Get the right people in the room.

The effective architect operates in two modes simultaneously. Strategic decisions answer questions with implications measured in months or years: which database family, how we handle authentication, where team ownership boundaries sit. Tactical decisions answer questions measured in hours: which HTTP status code, whether to extract a duplicated function, what to name a variable.

The tactical-only engineer writes clean code inside a broken architecture — polishing deck chairs on the Titanic. The strategic-only architect draws beautiful diagrams that nobody can build. Mastering both modes is the craft.

Every system has an architecture. The question is whether it was chosen or whether it grew. Architecture that grows without guidance produces the "big ball of mud" — a system where everything depends on everything, changes ripple unpredictably, and no engineer can predict the impact of a modification.

Big balls of mud are not built by careless engineers. They are built by careful engineers making pragmatic decisions under time pressure — one shortcut at a time, each of which seemed reasonable in isolation.

· · · End of preview · Chapter 1 continues in the full book · · ·
Continue reading
57,000 words · 20 chapters · Python code examples · 5 architecture katas
Chapter 2 · Part 0: Mindset & Foundations

The Real Drivers: Quality Attributes

Free preview

Every system I have ever worked on had functional requirements. A list of features: what the system should do, what data it should accept, what responses it should return. Functional requirements are the easy part. The hard part — the part that causes systems to fail in production, to become impossible to maintain, to lose users — is almost never the functional requirements.

"It works" is the most dangerous phrase in software engineering. What people really mean is: "It worked right now, on my machine, with one user, in perfect conditions."

Throughout this book, we call them quality attributes — or "-ilities" because most end in -ity or -ility. They are the primary drivers of every architectural decision you will make.

Scalability
Can we handle 10× more users without rewriting?
Availability
How often is the system actually usable? (99.9%? 99.99%?)
Reliability
Does it return correct results, always — not just sometimes?
Performance
How fast does it respond? And is that fast enough?
Security
Can we keep bad actors out and protect data?
Maintainability
Can a new developer understand and change this safely?
Testability
Can we write automated tests that give us real confidence?
Deployability
Can it be released safely, frequently, and reversibly?

A startup built a payment system. It passed every test. The demo worked flawlessly. They launched on Monday. By Wednesday, the system was down. Not crashing — just crawling. Database connections exhausted. The load balancer dropping requests.

What happened? Ten thousand users arrived at once, on day one of a promotional campaign. The code was correct. Every function did exactly what it was supposed to. The system worked — in the conditions it had been tested in. It fell apart entirely in the conditions it actually needed to operate in.

Quality attributes are what separate a system that works in a demo from a system that works in production. The rest of this chapter explores each one — and the trade-offs between them that define every real architectural decision.

· · · End of preview · Chapter 2 continues in the full book · · ·
Continue reading
Deep dives on all 8 quality attributes · The trade-off matrix · 80+ exercises
"Most engineers know the patterns. Few know when to use them — and what they are quietly sacrificing when they do."

This is the practitioner's guide to making architectural decisions deliberately, documenting them clearly, and building systems that the engineers who come after you can understand, maintain, and evolve.

Every chapter opens with a real war story. The mistakes are the author's. The patterns are proven across systems built for African businesses and global clients — where constraints differ from the Silicon Valley default and the ingenuity required is correspondingly greater.

20 full chapters
From what architecture is, through every major pattern, to governance and stakeholder communication.
Python code examples
Every pattern illustrated in concise, focused Python — readable in any language background.
20 reference tables
Trade-off matrices, pattern comparisons, database selection guides, deployment strategy grids.
5 architecture katas
Video streaming, banking transactions, ride-sharing dispatch, healthcare records, SaaS analytics — fully worked.
ADR templates
Architecture Decision Record templates you can adopt on your team today.
50-term glossary
Every significant term defined in plain language, from ACID to Zero Trust.

Senior engineers stepping into an architecture role for the first time. Tech leads designing their first distributed system. Experienced architects who want a structured framework for decisions and documentation. Anyone who has stared at a system they inherited and wondered: why is it built this way?

Software Architecture in Depth
PDF + Word download · Instant access · 57,000 words