From c9d36888bb9ca83b189f8cd79071e91ec3e562d5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 5 Jul 2019 15:56:13 -0700 Subject: [PATCH] docs: add dilation state machines diagram --- docs/state-machines/Makefile | 2 +- docs/state-machines/dilation.dot | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 docs/state-machines/dilation.dot diff --git a/docs/state-machines/Makefile b/docs/state-machines/Makefile index a9072c3..ea42875 100644 --- a/docs/state-machines/Makefile +++ b/docs/state-machines/Makefile @@ -1,7 +1,7 @@ default: images -images: allocator.png boss.png code.png input.png key.png lister.png machines.png mailbox.png nameplate.png order.png receive.png send.png terminator.png +images: allocator.png boss.png code.png input.png key.png lister.png machines.png mailbox.png nameplate.png order.png receive.png send.png terminator.png dilation.png .PHONY: default images diff --git a/docs/state-machines/dilation.dot b/docs/state-machines/dilation.dot new file mode 100644 index 0000000..1465802 --- /dev/null +++ b/docs/state-machines/dilation.dot @@ -0,0 +1,32 @@ +digraph { + Manager [label="Manager" shape="box" color="blue" fontcolor="blue"] + Connector [label="Connector" shape="oval"] + Framer [label="Framer"] + DCP [label="Dilated\nConnection\nProtocol"] + + DCP -> Connector [style="dashed" label="add_candidate\n"] + + Record [label="Record"] + Record -> Framer [style="dashed" label="connectionMade\nsend_frame"] + Record -> Framer [style="dashed" label="add_and_parse (-> tokens)"] + + ITransport -> DCP [style="dashed" label="connectionMade\ndataReceived\nconnectionLost"] + Framer -> ITransport [style="dashed" label="write"] + Manager -> DCP [style="dashed" color="green" label="disconnect"] + DCP -> Manager [style="dashed" color="green" label="got_record CClost"] + DCP -> Record [style="dashed" label="set_role\nconnectionMade\nsend_record"] + DCP -> Record [style="dashed" label="add_and_unframe (-> tokens)"] + Manager -> Connector [style="dashed" label="start\ngot_hints\nstop"] + Connector -> Manager [style="dashed" color="green" label="CCmade"] + Connector -> DCP [color="green" fontcolor="blue" label="select\nsend_record(KCM)"] + Connector -> DCP [color="red" fontcolor="red" label="disconnect"] + Connector -> Connector [color="green" fontcolor="green" label="accept"] + + Inbound [label="Inbound" shape="box" color="blue" fontcolor="blue"] + Manager -> Inbound [style="dashed" label="use_connection"] + Inbound -> DCP [style="dashed" label="pauseProducing\nresumeProducing"] + + Outbound [label="Outbound" shape="box" color="blue" fontcolor="blue"] + Manager -> Outbound [style="dashed" label="use_connection"] + Outbound -> DCP [style="dashed" label="send_record\ntransport.(un)registerProducer"] +}