Should we use Mermaid for the visualisation? #41
Replies: 2 comments 11 replies
-
|
Using a standard format like Mermaid definitely gives us a lot of benefits for free as you point out. It also has far better layout functionality than the library that I had initially used. The main downside that I see is the lack of intractability. With the tool that we currently have, you can move the nodes around and get more information about them than what is just shown on the graph. The custom tool has the potential to dynamically change and create/delete nodes and relationships inside the visualisation itself (although this would require a fair bit of work I think). To be honest, I think using mermaid would allow us to build something more useful and complete far quicker than the custom approach that I've taken so far. I'd definitely be keen to see the code that you wrote to convert from CALM to Mermaid. |
Beta Was this translation helpful? Give feedback.
-
|
As we move forward we should maintain backwards/forward compatibility with C4. Last I looked Mermaid had experimental support for C4. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been experimenting trying to use Mermaid to visualise the CALM examples. My rationale for this is:
I've been able to produce the following diagram using Mermaid for the TraderX sample.
flowchart TB subgraph internal_bank_network [Internal Network: Bank ABC Internal Network] subgraph traderx_system [System: TraderX] web_client[Webclient: Web Client] web_gui_process[Service: Web GUI] position_service[Service: Position Service] traderx_db[(Database: TraderX DB)] reference_data_service[Service: Reference Data Service] trading_services[Service: Trading Services] trade_feed[Service: Trade Feed] trade_processor[Service: Trade Processor] accounts_service[Service: Accounts Service] people_service[Service: People Service] end end traderx_trader((Actor: Trader)) user_directory[LDAP: User Directory] traderx_trader -->|interacts| web_client web_client -->|connects HTTPS OAuth2| web_gui_process web_gui_process -->|connects HTTPS SPNEGO| position_service position_service -->|connects JDBC Kerberos| traderx_db web_gui_process -->|connects HTTPS SPNEGO| reference_data_service web_gui_process -->|connects HTTPS SPNEGO| trading_services web_gui_process -->|connects WebSocket Kerberos| trade_feed trade_feed -->|connects AMQP Kerberos| trade_processor trade_processor -->|connects JDBC Kerberos| traderx_db web_gui_process -->|connects HTTPS SPNEGO| accounts_service web_gui_process -->|connects HTTPS SPNEGO| people_service people_service -->|connects LDAP Kerberos| user_directory %% Custom styles to indicate 'composed-of' relationship visually style traderx_system stroke-dasharray: 5 5In this example I have not provided any custom styling which could help make it look even better and it has the advantage that we could generate the mermaid representation through IDE plugins and / or build time plugins which would mean the diagrams would stay in sync with the CALM manifests.
What do you think @aidanm3341 / @jpgough-ms / @Budlee
Beta Was this translation helpful? Give feedback.
All reactions