1
+ digraph {
2
+ rankdir =LR;
3
+ node [shape =rectangle , style =rounded, fontname =helvetica];
4
+ edge [arrowhead =normal, arrowtail =crow, dir =both];
5
+
6
+ subgraph cluster_browser {
7
+ label = " Web Browser" ;
8
+ style = filled;
9
+ color = lightgrey;
10
+ node [style =filled, color =white];
11
+ browser [label = " <f0>Web Browser|<f1>" ];
12
+ }
13
+
14
+ subgraph cluster_sqlpage {
15
+ label = " SQLPage" ;
16
+ style = filled;
17
+ color = lightblue;
18
+ node [style =filled, color =white];
19
+ read_file [label = " <f0>Read File|<f1>todos.sql" ];
20
+ replace_param [label = " <f0>Replace Parameter|<f1>$todo_id with 1" ];
21
+ format_results [label = " <f0>Format Results|<f1>as HTML" ];
22
+ }
23
+
24
+ subgraph cluster_database {
25
+ label = " Database" ;
26
+ style = filled;
27
+ color = palegreen;
28
+ node [style =filled, color =white];
29
+ execute_query [label = " <f0>Execute|<f1>Query" ];
30
+ return_results [label = " <f0>Return|<f1>Results" ];
31
+ }
32
+
33
+ browser:f1 -> http_request [label = " HTTP GET Request\n /todos.sql?todo_id=1" , lhead =cluster_browser];
34
+ http_request -> read_file:f0 [lhead =cluster_sqlpage];
35
+ read_file:f1 -> replace_param:f0;
36
+ replace_param:f1 -> sql_query [label = " SQL Query\n SELECT * FROM todos\n WHERE id = 1" , lhead =cluster_sqlpage];
37
+ sql_query -> execute_query:f0 [lhead =cluster_database];
38
+ execute_query:f1 -> return_results:f0;
39
+ return_results:f1 -> result_stream [label = " Result Stream" , lhead =cluster_database];
40
+ result_stream -> format_results:f0 [lhead =cluster_sqlpage];
41
+ format_results:f1 -> html_response [label = " HTML Response\n with Formatted Results" , ltail =cluster_sqlpage];
42
+ html_response -> browser:f0 [label = " Display Results" , lhead =cluster_browser];
43
+
44
+ // Additional Styles
45
+ edge [arrowhead =normal, arrowtail =none , dir =both, fontname =helvetica, fontsize =10];
46
+ node [fontsize =12];
47
+ }
0 commit comments