diagrams for client

This commit is contained in:
Evgeny Poberezkin
2020-12-22 20:33:34 +00:00
parent 3cb2421373
commit 716a8a2067
2 changed files with 124 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
digraph SMPAgent {
graph [fontname=arial]
node [fontname=arial fontsize=11 shape=box]
edge [fontname=arial fontsize=10 arrowhead=open arrowtail=open]
subgraph clusterPersistence {
label="persistence"
connectionsStore [shape=cylinder label="duplex\nconnection\nrecords"]
}
subgraph clusterAgent {
label="agent threads"
main [shape=hexagon color=orange label="main\nthread"]
aSock [label="user agent TCP socket" color=darkgreen]
subgraph clusterThreads {
label=""
node [shape=hexagon color=orange]
runUser [label="runUser\nthread"]
runServer [label="runServer\nthread"]
msgSubscriber [label="message\nsubscriber\nthread"]
}
main -> {runUser runServer} [style=dashed label=race color=orange fontcolor=orange]
aSock -> runUser [color=darkgreen]
acInq [shape=rarrow label="agent\nserver\ncommands\nTBQueue"]
acInq -> runServer [color=darkgreen]
amInq [shape=larrow label="agent\nserver\nmessages\nTBQueue"]
amInq -> msgSubscriber [color=blue]
msgSubscriber -> connectionsStore [dir=both]
runUser -> connectionsStore [dir=both]
}
subgraph clusterUser {
label="1 group per user connection"
uSock [label="user connection TCP socket" color=darkgreen]
subgraph clusterUserThreads {
graph [fontsize=11]
label="user threads"
node [shape=hexagon, color=orange]
uRcv [label="receive"]
uAgent [label="user"]
uSnd [label="send"]
}
runUser -> uSock [style=dashed label="connect" color=darkgreen fontcolor=darkgreen]
runUser -> {uAgent uRcv uSnd} [style=dashed label=race color=orange fontcolor=orange]
uInq [shape=rarrow label="receive\nTBQueue"]
uOutq [shape=larrow label="send\nTBQueue"]
uSock -> uRcv -> uInq -> uAgent [color=darkgreen]
uAgent -> uOutq -> uSnd -> uSock [color=darkgreen]
msgSubscriber -> uOutq [color=blue]
uAgent -> acInq [color=darkgreen]
}
subgraph clusterServer {
label="1 group per SMP server connection"
sSock [label="SMP server connection TCP socket" color=blue]
subgraph clusterServerThreads {
graph [fontsize=11]
label="server threads"
node [shape=hexagon, color=orange]
sRcv [label="receive"]
sAgent [label="server"]
sSnd [label="send"]
}
runServer -> {sAgent sRcv sSnd} [style=dashed label=race color=orange fontcolor=orange]
sInq [shape=rarrow label="receive\nTBQueue"]
sOutq [shape=rarrow label="send\nTBQueue"]
sSock -> sRcv -> sInq -> sAgent [color=blue]
runServer -> sOutq [color=darkgreen]
sOutq -> sSnd -> sSock [color=blue]
sAgent -> amInq [color=blue]
}
}
+41
View File
@@ -0,0 +1,41 @@
digraph SMPClient {
graph [fontname=arial]
node [fontname=arial fontsize=11 shape=box]
edge [fontname=arial fontsize=10 arrowhead=open arrowtail=open]
label="module SMPClient"
subgraph clusterServerConnection {
label="data ServerConnection"
sSock [label="SMP server connection TCP socket" color=blue]
subgraph clusterServerThreads {
graph [fontsize=11]
label="server threads"
node [shape=hexagon, color=orange]
sRcv [label="receive"]
sAgent [label="server\nagent"]
sSnd [label="send"]
}
subgraph clusterServerQueues {
graph [fontsize=11]
label="server queues"
sInq [shape=rarrow label="receive\nTBQueue"]
sOutq [shape=rarrow label="send\nTBQueue"]
sMsgq [shape=rarrow label="message\nTBChan?"]
sResq [shape=rarrow label="response\nTBQueue"]
}
}
subgraph clusterModuleFunctions {
label="module functions"
getServerConnection
getMessageQueue [label="getMessageQueue"]
execCommand [label="sendCommand ::\nServerConnection ->\nQId ->\nCommand ->\nEither Error Command"]
}
sSock -> sRcv -> sInq -> sAgent -> {sMsgq sResq sOutq} [color=blue]
sOutq -> sSnd -> sSock [color=blue]
}