This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
states.dot
74 lines (59 loc) · 3.29 KB
/
states.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
digraph g{
ranksep="1.7 equally"
nodesep="0.9 equally"
START -> CONNECTION_ESTABLISHED [label="on_connect"];
subgraph level0 {
DISCONNECT;
}
subgraph cluster_unauthenticated {
label = "UNAUTHENTICATED";
PROCESS_HELLO [ color = "red", penwidth = 2];
CONNECTION_ESTABLISHED;
PROCESS_HELLO;
}
subgraph cluster_authenticated {
label = "AUTHENTICATED";
AWAIT_COMMAND [ color = "blue"];
RUN_COMMAND;
WAIT_FOR_ACKS [ color = "blue"];
DELIVER_NOTIFICATIONS;
INC_STORAGE_POSITION [ color = "red", penwidth = 2];
STORE_DIRECT_MESSAGES [ color = "red", penwidth = 2];
CHECK_STORAGE [ color = "red", penwidth = 2];
RUN_COMMAND [ color = "red", penwidth = 2];
MIGRATE_COMMAND [ color = "red", penwidth = 2];
DROP_COMMAND [ color = "red", penwidth = 2];
DELETE_MESSAGE_COMMAND [ color = "red", penwidth = 2];
}
CHECK_STORAGE -> DELIVER_NOTIIFCATIONS [label="messages \n Cond:include_topic_flag"];
CHECK_STORAGE -> DELIVER_NOTIFICATIONS [label="messages \n Set:inc_storage_flag"];
CHECK_STORAGE -> DROP_COMMAND [label="P1 empty\n Cond:reset_uaid_flag"];
CHECK_STORAGE -> MIGRATE_COMMAND [label="P2 empty\n Cond:rotate_message_table_flag\n UnSet:check_flag"];
CHECK_STORAGE -> AWAIT_COMMAND [label="P3 empty\n UnSet:check_flag"];
MIGRATE_COMMAND -> AWAIT_COMMAND [label="UnSet:(rotate_message_table_flag,inc_storage_flag,include_topic_flag)"];
DROP_COMMAND -> DISCONNECT;
DELIVER_NOTIFICATIONS -> WAIT_FOR_ACKS;
DELETE_MESSAGE_COMMAND -> WAIT_FOR_ACKS [label="Cond:acks remaining"];
DELETE_MESSAGE_COMMAND -> CHECK_STORAGE [label="Cond:all acked"];
WAIT_FOR_ACKS -> DELETE_MESSAGE_COMMAND [label="topic ack"];
WAIT_FOR_ACKS -> INC_STORAGE_POSITION [label="all acked \n Cond:check_flag && Cond:inc_storage_flag"];
WAIT_FOR_ACKS -> CHECK_STORAGE [label="all acked \n Cond:check_flag"];
WAIT_FOR_ACKS -> AWAIT_COMMAND [label="all acked \n Cond:NO_FLAGS"];
WAIT_FOR_ACKS -> RUN_COMMAND [label="reg or unreg"];
WAIT_FOR_ACKS -> DISCONNECT [label="connection drop"];
WAIT_FOR_ACKS -> STORE_DIRECT_MESSAGES [label="connection drop \n Cond:direct unacked messages"];
INC_STORAGE_POSITION -> CHECK_STORAGE [label="UnSet:inc_storage_flag"];
INC_STORAGE_POSITION -> STORE_DIRECT_MESSAGES [label="connection drop \n Cond:direct unacked messages"];
INC_STORAGE_POSITION -> DISCONNECT [label="connection drop"];
AWAIT_COMMAND -> CHECK_STORAGE [label="endpoint wants full check \nSet:(include_topic,check_flag)", fontcolor="darkgreen", color="green"];
AWAIT_COMMAND -> RUN_COMMAND [label="reg or unreg"];
AWAIT_COMMAND -> DISCONNECT [label="connection drop"];
AWAIT_COMMAND -> DELIVER_NOTIFICATIONS [label="direct message", fontcolor="darkgreen", color="green"];
STORE_DIRECT_MESSAGES -> DISCONNECT;
RUN_COMMAND -> AWAIT_COMMAND [label="send response"];
RUN_COMMAND -> WAIT_FOR_ACKS [label="send response \n Cond:acks remaining"];
CONNECTION_ESTABLISHED -> PROCESS_HELLO [label="hello"];
CONNECTION_ESTABLISHED -> DISCONNECT [label="ELSE"];
PROCESS_HELLO -> CHECK_STORAGE [label="authenticate success \n Set:(include_topic,check_flag)"];
PROCESS_HELLO -> AWAIT_COMMAND [label="ELSE"];
}