Skip to content
Permalink
Browse files

docs: add dilation state machines diagram

  • Loading branch information...
warner committed Jul 5, 2019
1 parent ee8c1ac commit c9d36888bb9ca83b189f8cd79071e91ec3e562d5
Showing with 33 additions and 1 deletion.
  1. +1 −1 docs/state-machines/Makefile
  2. +32 −0 docs/state-machines/dilation.dot
@@ -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

@@ -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"]
}

0 comments on commit c9d3688

Please sign in to comment.
You can’t perform that action at this time.