Am 29.08.24 um 18:29 schrieb Mark Thomas:
On 29/08/2024 15:34, Felix Schumacher wrote:<snip/>While I don't object to buying a license, I would love to know, which diagram you looked at and what exactly did not work out. (the activation stuff in mermaid is brittle, but I think I managed to get them all right)I couldn't find a way to get the gap in the activation of Catalina between the call to setParentClassLoader() and start(). I see how you fixed that. Nice.There are a couple of places where the message arrows don't quite meet up with the activation bar correctly and the await note isn't quite in the right place.
I only see one gap at the message await() from Catalina to itself.The note is a bit better placed, when we use "note right" (or even "note left") instead of "note right of Catalina".
To get even more of the original look, we can use UML style, by adding "skinparam style strictuml" and to mimic the original drawing even more, we can switch off the actors at the bottom, by specifying "hide footbox". (full code at the end)
and for mermaidjs I gotI found that very hard to read but I suspect that is a fairly easy fix.My biggest complaint with mermaidjs was that the text on messages to self is centered rather than to the right. That is probably fixable too.
We can configure some stuff in a YAML like begin block by adding (at the top of the file)
--- config: messageAlign: left mirrorActors: false --- The three dashes are important and part of the header block.mirrorActors switch off the actors at the bottom, to mimic the original diagram (not that I like it that much).
There is a missing activation bar for the digester but that might be due to the issues you mentioned.
Yes, there was a missing "deactivate Digester" (again, full code at the end)
The label is in the right place for await() which is good.To summarize my findings. plantuml seemed to be more predictable and feature-rich (for sequence diagrams) than mermaidjs. But I didn't see any showstoppers with both of them.Another alternative to use would be umlet (https://www.umlet.com/), which I used way back, but haven't looked at lately.I'll take a look.I hope you didn't mind the inline code and thus this long message.Not at all. This is all really useful.I do really like the idea of the source being human readable but I think I am still leaning towards Visual Paradigm because it doesn't have any of the niggles in the output and generally, we have a lot more control over the final layout.Another factor is time. While Visual Paradigm also has its quirks, I've found I have spent far less time cajoling the tool into providing the output I want.
Yes, I can understand that. It seems, that we have different bars on what is acceptable visually :)
As promised above in the text, the code for plantuml with the corrections is:
@startuml hide footbox skinparam style strictuml activate Bootstrap Bootstrap -> Bootstrap: initClassLoaders() Bootstrap -->> Catalina ** : newInstance() Bootstrap -> Catalina: setParentClassLoader() activate Catalina deactivate Catalina Bootstrap -> Catalina: start() activate Catalina Catalina -> Catalina: load() activate Catalina Catalina -> Catalina: initNaming() Catalina -> Catalina: parseServerXml() activate Catalina Catalina -->> Digester ** : note right of Digester The digester creates all of the objects defined //server.xml// but only the Server is shown here for simplicity end note Catalina -> Digester: parse() activate Digester |||| Digester -->> Server ** : deactivate Digester deactivate Catalina deactivate Catalina Catalina -> Catalina: initStream() Catalina -> Server: init() activate Server deactivate Server Catalina -> Server: start() activate Server Catalina -> Catalina: await() activate Catalina note right This is where Tomcat spends time serving requests end note deactivate Catalina Catalina -> Catalina: stop() activate Catalina Catalina -> Server: stop() Catalina -> Server: destroy() Catalina <<-- Server: deactivate Server deactivate Catalina Bootstrap <<-- Catalina: deactivate Catalina deactivate Bootstrap @enduml and for mermaidjs it is --- title: Some sequenceDiagram config: messageAlign: left mirrorActors: false --- sequenceDiagram activate Bootstrap Bootstrap->>Bootstrap: initClassLoader() create participant Catalina Bootstrap--)Catalina: newInstance() Bootstrap->>+Catalina: setParentClassLoader() deactivate Catalina Bootstrap->>+Catalina: start() Catalina->>+Catalina: load() Catalina->>Catalina: initNaming() Catalina->>+Catalina: parseServerXml() create participant Digester Catalina--)Digester:<br>note right of Digester: The digester creates all<br>of the objects defined<br>in server.xml but only the<br>server is shown here for<br>simplicity
Catalina->>+Digester: parse() create participant Server Digester--)Server: <br> deactivate Digester deactivate Catalina deactivate Catalina Catalina->>Catalina: initStream() Catalina->>+Server: init() deactivate Server Catalina->>+Server: start() Catalina->>+Catalina: await()note right of Catalina: This is where Tomcat spends<br>time serving requests
deactivate Catalina Catalina->>+Catalina: stop() Catalina->>Server: stop() Catalina->>Server: destroy() deactivate Catalina Server--)Catalina: <br> deactivate Server Catalina--)Bootstrap: <br> deactivate Catalina deactivate Bootstrap Felix
Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature