Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to visualize a system architecture using the C4 model? (jorzel.github.io)
31 points by jorzel on Dec 23, 2022 | hide | past | favorite | 10 comments


It should be noted C4 is for software architecture, specifically. Not system architecture, generally.

When diagramming (say) a cloud system architecture, you should use the abstractions that come with that cloud environment (in AWS it'd be things like Account, Region, Lambda, etc.). There is no benefit in translating these abstractions to C4's abstractions that were designed for software (Context, Container, and Component).


The C4 model also includes an optional deployment diagram (kinda like the deployment diagram from the 4+1 model). You could indeed use the abstractions of your cloud provider to draw that but I think it's more helpful to use C4 abstractions. Since this allows you to map concepts from your software (C4 containers) to your infrastructure.

Let's say to have a reasonable complex (micro)services landscape running in the cloud. I would create:

- one context diagram. System as a blackbox with surrounding actors.

- one or multiple container diagrams. One per bounded context.

- one deployment diagram mapping out the most significant cloud infra, their interrelations AND some example C4 containers to show how the software maps to the infra.


Good point. I used a 'system' as a synonym for a 'software' but you are right that it can be confusing


I still find myself making different diagrams for different levels of complexity. Things like "infrastructure diagram", "microservice diagram", "vendor dependency diagram", sequence diagrams. Depending on what's happening the architecture may dynamically change, and I'm not always sure how to represent that.


Making different diagrams to show different concerns is exactly what to do [0]. Trying to show everything in a single view is impossible, you'll just make a mess.

[0] Ilograph calls these different views perspectives: https://app.ilograph.com/demo.ilograph.Ilograph/Request Full disclosure: I made this


Have you checked out flows in https://icepanel.io for sequence diagrams?


https://github.com/gnodux/C4-PlantUML

Highly recommend to give this one a try


Is this the same package used in structurizr.com?


Does not look like that is the case. The syntax is different, this one I shared is based on the plant uml standard, while the one you mention seem to have its own thing. Will try it out! Tx for the link


In structurizr.com you have an option to export diagram using plant UML




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: