Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dynamic views are great for throwing together quick illustrations of the more complex interactions in a model. However the selection of allowed elements within a dynamic view seems to be restricted to static structure elements. Showing the collaboration between instances would be very useful for modelling distributed systems.
Example: Peer-to-peer architecture
Take for example a P2P system. On the container level you would define an application that is at once a server and a client. The container is a single static structure element, however it is only useful if deployed in several instances to form a network. Perhaps you draw a self referential relationship for that container to illustrate that its API is called by other instances of itself.

This approach results in the core static structure diagrams becoming rather abstract. Even though they faithfully represent a "map of your code", those diagrams fail to communicate the most critical design aspects, i.e. the interrelationship of instances.
The deployment modelling features are helpful in this regard, although even these are not always sufficient. Since relationships between two

StaticStructureElementInstance
objects are not permitted, every relationship that you want to show in the Deployment view must be defined in the static model. This makes sense, as a deployment shouldn't magically introduce relationships between two containers for example. Here is where the self referential relationship created before comes into play: in deployment views, those automatically get transformed into relationships between individual container instances.While this works out, the amount of relationships cluttering the static model will get unmanageable quickly. Further, it's an unviable solution for showing sequences of interactions. A deployment view represents a static environment, meant for illustrating physical placement. Dynamic diagrams should fill that gap instead. The dynamic view lacks the feature to do this out of the box though. The best you can do is show the container communicating with itself, but this is undesired.

Dynamic view semantics
This is where I get confused about the semantics of the dynamic view in C4/Structurizr. This is what is described in the book "The C4 model for visualising software architecture":
In UML sequence and communication diagrams, elements are instances of static structure elements. What I get now is that C4 tries to convey dynamic behavior using static structure elements as-is, hence also the constraints in Structurizr. The implication of this is probably negligible as long as you're designing software where you can skip the distinction without compromising comprehension of the diagram.
While I'd like to propose instances in dynamic views as a feature, I'm wondering whether I'm missing the philosophy or the decision to restrict dynamic views to static structure elements was misguided.
DSL used to generate examples
Beta Was this translation helpful? Give feedback.
All reactions