-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPP-3079: Add a C4 Relay model, initial diagrams #4901
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very thorough work. Thank you for going thru it all.
I made it thru the C1 level before I was overwhelmed by the jump in the level of detail at the C2 level. I can go thru the full diagram, but I thought I'd give a quick review with some comments that might help to simplify the C2 level.
- At C2 level (maybe even at the C1 level), we should show Amazon and Twilio as external software systems that interact with Firefox Relay, Phone Contact, and Email Contact.
- At C2, we should consolidate the individual AWS elements together into something like a single Email Processing container. The details about Sender, Receiver, Storage, Queues, Pub/Sub, and Encryption are good though, so maybe pull them out into their own C3 diagram that details the Email Processing container.
- These details are also great for the dynamic diagram for forwarding an email to a Relay user!
- When we have an "Email Processing" C3 diagram, we can similarly consolidate the deployment diagrams to replace the duplicated details in each deployment into a single "Email Processing" system.
- Similarly, we should group the individual Tasks into something like a Python/Django Commands container. And then move the invididual task details to their own C3 diagram.
- And then similarly, when we have a Python/Django Commands C3 diagram, we can replace the duplicated details in each deployment into a single "Python/Django Commands" system.
* Add the 2 top-level C4 models for the system context and containers. * Add a dynamic view for happy-path email forwarding * Add a deployment models for dev, stage, and prod * Use structurizr lite to layout, create diagrams * Add docs/system_diagrams.md to document the diagrams
* Add return relation for reply text from phone services to contacts * Change "Metrics Platform" to "Operational Metrics Platform" * Add tech telegraf tp metrics aggregator * Add TODO for summary container graphs, drill-down graphs * Change name of current containers graph to refer to is as the "all details" graph
b152460
to
7870937
Compare
I've made the smaller changes, but the bigger ones will take some time, so it will be a bit later before this is ready for re-review. With PTO and MozWeek, it will be August 22 at the earliest. If the delay concerns you, please consider merging this work and reviewing the next PR later this month.
I've been chewing on this, and you're right, the jump is too much. It was important for going to the deployment diagrams, which might deserve that detail level for completeness, but it does not help understanding. It's addressed on the C4 model website:
I have some ideas for that, and added some TODOs to
That was in my original plan: However, Structurizr would not show any second level relationships for the System Context (C1) - it showed the phone system but not the external contact. Going back to the C4 model website
Once I treated email processing as several containers, and Twilio as "our" phone service, it felt like I was working with Structurizr rather than against it.
There is still grouping in the deployment diagrams to show GCP vs AWS, and the different services used in each. After working with it a bit, I think AWS and Twilio belong inside the Relay system container, not external.
As I said above, my plan is now to create a summary container diagram that treats all of the AWS parts as one "box", as well as collects other parts in their own boxes, to make a diagram that is about the complexity level of the system context diagram (C1), and could potentially fit on a slide. Then, there will be other C2 diagrams that "zoom in" and show those systems. The dynamic diagram seems the right size for the zoomed-in email processing piece. I think the other two zoomed-in diagrams are clients and the web application, and the scheduled tasks. If those are two crowded, there may be one for the web app and the backing services. The current noisy one stays on as a detailed view, and a transition to the deployment diagrams. Those may get broken into summary and detail as well. I think the hexagon would make a decent shape for "this element represents a collection of elements"
I disagree with treating the tasks as C3-level components. The C2-level container is "a separately runnable/deployable unit (e.g. a separate process space) that executes code or stores data". The C3-level component is for the software architecture. I think the separate C2-level diagrams will get to the same results of understandable diagrams. I was going to wait until a future PR to break the web application into a C3 components diagram, but it may make sense to do it now to test how things will look at that level. I think a summary and details version may make sense for that as well. |
Thanks for the thoughtful reply.
Yeah that sounds just as good and more aligned with C4 & Structurizr like you said.
I always get concerned if we leave things un-merged for too long. I'll go ahead and merge this one and make a Jira ticket to make follow-up changes. |
I filed https://mozilla-hub.atlassian.net/browse/MPP-3864 for the follow-up. |
How to test: