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
|
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
|
-
-
-
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
-
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
|
digraph G {
// put client after server so server_start node is visible
//
subgraph cluster_0 {
node [style=filled];
subgraph cluster_1 {
node [style=filled,shape=box];
start_client -> lookup_server;
lookup_server -> connect [label=found];
check_available_queue -> remove_entries_over_10s_old;
remove_entries_over_10s_old -> set_available [label="num_avail < 3"];
remove_entries_over_10s_old -> exit [label="num_avail > 2"];
lookup_server -> "server_available?";
"server_available?" -> delay [label=yes];
set_available -> delay_2s;
delay_2s -> check_place_in_queue;
"server_available?" -> client_start_server [label=no];
client_start_server -> delay;
check_place_in_queue -> "http:transport-launch" [label="at head"];
check_place_in_queue -> exit [label="not at head"];
connect -> login;
login -> read_write [label=success];
login -> "server_dead?" [label=fail];
"client:login" -> "server:shutdown" [label="login failed"];
"server:shutdown" -> exit;
read_write -> timeout -> "server_dead?";
subgraph cluster_2 {
read_write -> wrong_server -> delay;
// read_write -> read_write;
"server_dead?" -> remove_record [label="yes (too many tries)"];
"http:transport-launch" -> "http:transport-run";
"http:transport-launch" -> "http:transport-keep-running";
"http:transport-keep-running" -> "tests running?";
"tests running?" -> "client:login" [label=yes];
remove_record -> lookup_server;
"server_dead?" -> delay [label=no];
delay -> lookup_server;
"tests running?" -> "server:shutdown" [label=no];
"client:login" -> delay_5s [label="login ok"];
delay_5s -> "http:transport-keep-running";
}
label = "client";
color=green;
}
subgraph cluster_1 {
node [style=filled];
start_server -> "server_running?";
"server_running?" -> set_available [label="no"];
"server_running?" -> delay_2s [label="yes"];
delay_2s -> "still_running?";
"still_running?" -> ping_server [label=yes];
"still_running?" -> set_available [label=no];
ping_server -> exit [label=alive];
ping_server -> remove_server_record [label=dead];
remove_server_record -> set_available;
set_available -> avail_delay [label="delay 3s"];
avail_delay -> "first_in_queue?";
"first_in_queue?" -> set_running [label=yes];
set_running -> handle_requests;
"first_in_queue?" -> "server_running?" [label=no];
handle_requests -> start_shutdown [label="no traffic"];
handle_requests -> shutdown_request;
start_shutdown -> shutdown_delay;
shutdown_request -> shutdown_delay;
shutdown_delay -> exit;
// start_server -> "server_running?";
// "server_running?" -> set_available [label="no"];
// "server_running?" -> delay_2s [label="yes"];
// delay_2s -> "still_running?";
// "still_running?" -> ping_server [label=yes];
// "still_running?" -> set_available [label=no];
// ping_server -> exit [label=alive];
// ping_server -> remove_server_record [label=dead];
// remove_server_record -> set_available;
// set_available -> avail_delay [label="delay 3s"];
// avail_delay -> "first_in_queue?";
//
// "first_in_queue?" -> set_running [label=yes];
// set_running -> get_next_port -> handle_requests;
// "first_in_queue?" -> "dead_entry_in_queue?" [label=no];
// "dead_entry_in_queue?" -> "server_running?" [label=no];
// "dead_entry_in_queue?" -> "remove_dead_entries" [label=yes];
// remove_dead_entries -> "server_running?";
//
// handle_requests -> start_shutdown [label="no traffic\nno running tests"];
// handle_requests -> shutdown_request;
// start_shutdown -> shutdown_delay;
// shutdown_request -> shutdown_delay;
// shutdown_delay -> exit;
label = "server";
label = "server:launch";
color=brown;
}
client_start_server -> start_server;
handle_requests -> read_write;
read_write -> handle_requests;
// client_start_server -> start_server;
// handle_requests -> read_write;
// read_write -> handle_requests;
}
|