Chapter 11. Beyond the Basics
This chapter will look at some of the more advanced topics associated with the C4 model, ranging from the abstractions and diagram types to some specific recommendations for diagramming microservices and message-driven architectures. Let’s start our tour with a more detailed look at the four levels of the C4 model and why they exist.
The Model-Code Gap
Chapters 3–6 introduced the static structure diagram types that make up the C4 model, and each of those chapters included some guidance on whether I recommend using that particular diagram type. My general guidance to teams who are adopting the C4 model for the first time is to focus on the top two levels—the system context and container diagrams.
There are a couple of reasons for this. First, the system context and container diagrams can be created reasonably quickly in most cases. Second is the effort required to keep those diagrams up to date. Due to the hierarchical nature of the C4 model, each diagram will change at a different rate:
System context diagram: In most cases, the system context diagram will change very slowly. It describes the environment that the software system is operating within and the integration points between software systems in that environment, which don’t tend to change on a regular basis.
Container diagram: Unless you’re building a software system that consists of a large number of small C4 containers (e.g., microservices, serverless functions), the container diagram ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access