-
Notifications
You must be signed in to change notification settings - Fork 2
/
message-flow.dot
76 lines (58 loc) · 3.85 KB
/
message-flow.dot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
digraph {
ranksep=0.2
"Client::Game.send-nop" -> "Client::Game.action-promise"
"Client::Game.action-promise" -> "Message::Request.on-success" [style=dotted]
"Client::Game.action-promise" -> "Message::Request.on-failure" [style=dotted]
"Client::Game.action-promise" -> "Client::Session.send-in-game-request"
"Client::Game.send-action" -> "Client::Session.send-in-game-request"
"Client::Session.send-in-game-request" -> "Client::Session.send-request"
"Client::Session.send-request" -> "Client::Connection::Supplier.send-to-server"
"Client::Session.send-request" -> "Client::Connection::WebSocket.send-to-server"
subgraph cluster_to_in_memory_server {
color="forestgreen"
fontcolor="forestgreen"
label="In-Memory Server"
"Client::Connection::Supplier.send-to-server" -> "Server::Connection::Supplier.send-to-server" -> "Server::Connection::Supplier.from-client-supply"
}
subgraph cluster_to_remote_server {
color="dodgerblue"
fontcolor="dodgerblue"
label="Remote Server"
"Client::Connection::WebSocket.send-to-server" -> "Cro::WebSocket::Client::Connection.send" -> "Server::Connection::WebSocket.from-client-supply"
}
"Server::Connection::Supplier.from-client-supply" -> "Server::Session.handle-client-message"
"Server::Connection::WebSocket.from-client-supply" -> "Server::Session.handle-client-message"
"Server::Session.handle-client-message" -> "Server::Session.error"
"Server::Session.handle-client-message" -> "Server::Session.auth-error" -> "Server::Session.error"
"Server::Session.handle-client-message" -> "Server.authenticate-user" -> "Server::Session.success"
"Server.authenticate-user" -> "Server::Session.auth-error"
"Server::Session.handle-client-message" -> "Server::Game.process-action" -> "Server::Session.success"
"Server::Session.handle-client-message" -> "Server.new-game" -> "Server::Session.success"
"Server::Session.handle-client-message" -> "Server.join-game" -> "Server::Session.success"
"Server::Session.handle-client-message" -> "Server.leave-game" -> "Server::Session.success"
"Server::Session.error" -> "Server::Connection::Supplier.send-to-client"
"Server::Session.success" -> "Server::Connection::Supplier.send-to-client"
"Server::Session.error" -> "Server::Connection::WebSocket.send-to-client"
"Server::Session.success" -> "Server::Connection::WebSocket.send-to-client"
subgraph cluster_from_in_memory_server {
color="forestgreen"
fontcolor="forestgreen"
label="In-Memory Server"
"Server::Connection::Supplier.send-to-client" -> "Client::Connection::Supplier.send-to-client" -> "Client::Connection::Supplier.from-server-supply"
}
subgraph cluster_from_remote_server {
color="dodgerblue"
fontcolor="dodgerblue"
label="Remote Server"
"Server::Connection::WebSocket.send-to-client" -> "Server::Connection::WebSocket.from-server" -> "Client::Connection::WebSocket.from-server-supply"
}
"Client::Connection::Supplier.from-server-supply" -> "Client::Session.handle-server-message"
"Client::Connection::WebSocket.from-server-supply" -> "Client::Session.handle-server-message"
"Client::Session.handle-server-message" -> "Message::Request.on-success" [label=Success]
"Client::Session.handle-server-message" -> "(translate error code to exception)" [label=error]
"(translate error code to exception)" -> "Message::Request.on-failure"
"Client::Session.handle-server-message" -> "Client::Game.handle-server-message" [label=push]
"Client::Game.handle-server-message" -> "Client::Game.canonify-response ?" -> "Client::Game.on-push"
"Message::Request.on-success" -> "Client::Game.canonify-response" -> "(game-specific on-success)" -> "(action promise KEPT)"
"Message::Request.on-failure" -> "(action promise BROKEN)"
}