THE SHAN LENS The Invisible Architecture

PART 1 · CHAPTER 01

The Architecture You Cannot See

A diagram inventories visible components. Actual architecture also consists of runtime behaviour, assumptions, ownership, constraints and decisions.

8 min readThe Invisible Architecture

The invisible rule: Protect the business operation, not just the HTTP request. The key must refer to the same logical intent. A second request with a different amount but the same key is a conflict, not a harmless replay.

The question

Why can two systems with identical diagrams behave completely differently?

This question sounds simple because we usually evaluate a software system by the parts we can see. Yet an incident often begins in a rule that nobody wrote down: a hidden timing assumption, a missing owner, an ambiguous business word or an unsafe fallback.

Throughout this book we follow Meridian, a fictional enterprise order and payments platform. Its incidents are constructed teaching cases, not claims about a real company. They are based on common engineering patterns and are designed to make the underlying trade-offs observable.

The familiar world

Two restaurant kitchens may have the same equipment yet produce very different meals. One has clear recipes, roles and handoff signals; the other relies on people remembering unwritten rules.

The useful detail in this analogy is that the visible equipment is not enough. Reliable outcomes depend on relationships, rules and responses to exceptions. These are precisely the aspects that disappear when architecture is represented as nothing more than boxes and arrows.

The connection

A diagram inventories visible components. Actual architecture also consists of runtime behaviour, assumptions, ownership, constraints and decisions.

In a software system, this is not merely a theoretical distinction. A customer presses Pay once, sees a spinner, then receives two bank notifications. The visible system topology contains one payment processor, but the real failure exists in the gap between timeout semantics and repeated commands.

The architecture becomes visible only when we ask more specific questions: Which component has authority? Which fact is immutable? How long may another service be out of date? Which error is retryable? Who must approve the next action? The answers define a system more accurately than the technology list alone.

The visual explanation

A concrete model to inspect:

POST /payments
Idempotency-Key: checkout-723-attempt-1
Content-Type: application/json

{"orderId":"723","amountMinor":4999,"currency":"AUD"}

Read the model from the point of view of a user action rather than from the point of view of a service. Follow the business intention, identify where meaning is translated or lost, and mark the precise point where a decision becomes irreversible or externally visible.

The deeper truth

A realistic engineering situation

An order service writes an order row and calls a payment provider. The diagram looks clean. Under a payment timeout, the application retries and charges twice because nobody declared what a repeated request means.

A team could easily mistake this for a small implementation defect. That diagnosis would be incomplete. The incident arises because the surrounding system has not represented an important contract or policy explicitly enough for other parts of the system to rely on it.

How to design the solution

Define an idempotency key based on the logical payment attempt, persist the first outcome, and reject attempts whose reused key has incompatible parameters. Include a timeout state and reconciliation job.

Implementation requires more than adding one validation check. Decide which data is authoritative, how the rule is enforced during concurrent requests, what evidence is recorded, and how old clients behave during migration. Prefer a small set of explicit guarantees over a long list of informal expectations.

What can still go wrong

A network diagram cannot express a business promise unless that promise has been captured as a contract, invariant or test.

For a production rollout, make the failure case part of the acceptance criteria. Include at least one network timeout, one duplicate or late input, one authorisation failure, one version mismatch and one observable recovery path where those scenarios are relevant. Test under concurrency, because a guarantee demonstrated by a sequential unit test may not hold when requests overlap.

Design review questions

Review dimensionQuestion to answer before release
Business meaningWhat does success mean to a customer or operator?
OwnershipWhich service or human is accountable for the result?
FailureWhat happens if the next step never occurs?
EvidenceWhich test, log or metric demonstrates the guarantee?
ChangeHow will older consumers and existing data behave?

Try this in your own system

Write five promises your most critical service must keep, then identify the code, data constraints, tests and owner enforcing each.

Do not start by selecting a framework. Write down the observable outcome, the invariant that must hold, and the evidence that would convince a sceptical reviewer. Then identify the simplest design that enforces those conditions.

The takeaway

Protect the business operation, not just the HTTP request. The key must refer to the same logical intent. A second request with a different amount but the same key is a conflict, not a harmless replay.

The most important architecture is often the architecture of decisions. Make the hidden rule explicit, give it an accountable owner, enforce it where the business effect occurs, and verify it in realistic conditions. That is how a plausible design becomes a dependable system.

Further reading

END OF CHAPTER 01◉ THE SHAN LENS