2
the building blocks of the proxy
4
You may use "dot" from graphviz to generate human consumable output
7
$ dot -T pdf -o architecture.pdf architecture.dot
8
$ dot -T png -o architecture.png architecture.dot
10
or you generate a image-map
12
$ dot -T cmapx -o architecture.map -Tpng -o architecture.png architecture.dot && \
13
echo '<img src="architecture.png" border="0" usemap="#g"/>' > architecture.html && \
14
cat architecture.map >> architecture.html
27
<table border="1" cellborder="1">
29
<td bgcolor="blue" port="head" colspan="4">
30
<font color="white">Script</font>
34
<td border="1">connect</td>
35
<td border="1">auth</td>
36
<td border="1">query</td>
37
<td border="1">close</td>
40
<td border="1" bgcolor="orange" colspan="4">liblua</td>
52
<table border="1" cellborder="1">
54
<td bgcolor="black" port="head" colspan="4">
55
<font color="white">Proxy</font>
59
<td border="0" colspan="2"></td>
60
<td border="1" port="script" colspan="2">script</td>
63
<td border="0" colspan="2"></td>
64
<td border="1" port="admin" colspan="2">admin plugin</td>
67
<td border="1" port="script" colspan="2">script</td>
68
<td border="0" colspan="2"></td>
71
<td border="1" port="proxy" colspan="2">proxy plugin</td>
72
<td border="0" colspan="2"></td>
75
<td border="1" port="proxy" colspan="4">network core</td>
78
<td border="1" port="chassis">libchassis</td>
79
<td border="1" port="socket">socket</td>
80
<td border="1" port="protocol">protocol</td>
81
<td border="1" bgcolor="orange">liblua</td>
89
<table border="1" cellborder="1">
91
<td bgcolor="grey" port="head">
92
<font color="white">Clients</font>
96
<td border="1" port="admin">admin</td>
99
<td border="1" port="app">app</td>
113
<table border="1" cellborder="1">
115
<td bgcolor="blue" port="head" colspan="4">
116
<font color="white">Chassis</font>
120
<td border="1" port="chassis">logging</td>
121
<td border="1">getopt()</td>
122
<td border="1">configfile</td>
123
<td border="1">plugin</td>
126
<td border="1" bgcolor="orange" colspan="4">glib-2.0</td>
135
<table border="1" cellborder="1">
137
<td bgcolor="blue" port="head" colspan="3">
138
<font color="white">Socket</font>
142
<td border="1" bgcolor="orange">libevent</td>
143
<td border="1" bgcolor="orange">libresolv</td>
144
<td border="1">socket()</td>
152
<table border="1" cellborder="1">
154
<td bgcolor="blue" port="head" colspan="4">
155
<font color="white">Protocol</font>
159
<td border="1">mysql</td>
160
<td border="1">binlog</td>
161
<td border="1">frm</td>
162
<td border="1">masterinfo</td>
171
<table border="1" cellborder="1">
173
<td bgcolor="grey" port="head">
174
<font color="white">Legend</font>
178
<td border="1" bgcolor="orange">external lib</td>
181
<td border="1" bgcolor="blue">internal lib</td>
187
Blocks:chassis:s -> Chassis:head:ne [ arrowhead = none ];
188
Blocks:chassis:s -> Chassis:head:nw [ arrowhead = none ];
190
Blocks:socket:s -> Socket:head:ne [ arrowhead = none ];
191
Blocks:socket:s -> Socket:head:nw [ arrowhead = none ];
193
Blocks:protocol:s -> Protocol:head:ne [ arrowhead = none ];
194
Blocks:protocol:s -> Protocol:head:nw [ arrowhead = none ];
196
Blocks:script:ne -> Script:head:se [ arrowhead = none ];
197
Blocks:script:nw -> Script:head:sw [ arrowhead = none ];
199
Clients:admin:e -> Blocks:admin:w [ label = ":4042" ];
200
Clients:app:e -> Blocks:proxy:w [ label = ":4040" ];
201
Blocks:proxy:e -> Backend:w [ label = ":3306" ];