event diagrams #5852
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Enhancement
New feature or request
Type: New Diagram
Proposal
None of the current diagrams in Mermaid is very suitable to model time-causal relationship between processes. The Lamport diagrams, also known as logical clock diagrams or causal separation diagram or event diagrams are extremely useful for diagraming distributed algorithms or causal relationship between processes in relation to time.
Use Cases
modeling distributed mutual exclusion algorithms, database transaction ordering, algorithms based on logical and physical clocks, distributed computing, timing of events, illustrating consensus algorithms - raft, paxos, etc, synhronization, message ordering
Screenshots
Most of these are adequate to simple diagraming although Lesani. at al 2016 also allows showing labeled durations on the time axis.
this is from https://arxiv.org/html/2307.10484v2
from https://dev-discuss.pytorch.org/t/fsdp-cudacachingallocator-an-outsider-newb-perspective/1486
https://people.cs.rutgers.edu/~pxk/417/notes/clocks/index.html
A quick google search also yields a top of variations of the same idea in the images section https://www.google.com/search?q=lamport+diagrams
Syntax
The currently implemented sequence diagrams are very similar so I would think that the syntax will look close to what they use. Perhaps you can imagine that all timelines are quantized and you will list the points where each participant has a dot like P1[3] or a line P1[3..5] as well as links like P1[3]->>P2[5]
Implementation
This is a proposal which I'd love to see built into mermaid by the wonderful community.
The text was updated successfully, but these errors were encountered: