Skip to content

Instantly share code, notes, and snippets.

@cstorey
Last active December 13, 2016 10:58
Show Gist options
  • Save cstorey/38d2ba04f661a7ed727d76cd47d6b40e to your computer and use it in GitHub Desktop.
Save cstorey/38d2ba04f661a7ed727d76cd47d6b40e to your computer and use it in GitHub Desktop.
Graphviz lamport diagrams (borrowed from palvaro's molly)
digraph spacetime {
rankdir=TD
splines=line
// outputorder=nodesfirst
subgraph cluster_proc_nodes {
label="";
proc_a [label="Process a",group="a"];
proc_b [label="Process b",group="b"];
}
node_a_1[label="1", group="a"];
node_a_2[label="2", group="a", shape="point"];
node_a_3[label="3", group="a", shape="point"];
node_a_4[label="4", group="a"];
node_b_1[label="1", group="b", shape="point"];
node_b_2[label="2", group="b"];
node_b_3[label="3", group="b"];
node_b_4[label="4", group="b", shape="point"];
node_a_1 ->node_b_2[constraint=false, label="req"];
node_b_3 ->node_a_4[constraint=false, label="res"];
edge[weight=2, arrowhead=none, color=gray75, fillcolor=gray75];
proc_a -> node_a_1 -> node_a_2 -> node_a_3 -> node_a_4 ;
edge[weight=2, arrowhead=none, color=gray75, fillcolor=gray75];
proc_b -> node_b_1 -> node_b_2 -> node_b_3 -> node_b_4 ;
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment