~jan-kneschke/mysql-proxy/packet-tracking-assertions

« back to all changes in this revision

Viewing changes to doc/architecture.dot

  • Committer: Kay Roepke
  • Date: 2009-01-20 12:04:47 UTC
  • Revision ID: kay@mysql.com-20090120120447-fkoxq5ovwf9iyk4v
add the wrapper script/makefile fu to start mysql-proxy without having to set the environment variables

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  the building blocks of the proxy
3
 
 
4
 
  You may use "dot" from graphviz to generate human consumable output
5
 
  like PNG or PDF:
6
 
 
7
 
    $ dot -T pdf -o architecture.pdf architecture.dot
8
 
    $ dot -T png -o architecture.png architecture.dot
9
 
 
10
 
  or you generate a image-map
11
 
 
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
15
 
*/
16
 
digraph G {
17
 
        node [
18
 
                shape = "plaintext"
19
 
                fontname = "Courier"
20
 
                fontsize = 10
21
 
        ]
22
 
 
23
 
        subgraph scripting {
24
 
                rank = "min"
25
 
                Script [
26
 
                        label = <
27
 
                                <table border="1" cellborder="1">
28
 
                                 <tr>
29
 
                                  <td bgcolor="blue" port="head" colspan="4">
30
 
                                   <font color="white">Script</font>
31
 
                                  </td>
32
 
                                 </tr>
33
 
                                 <tr>
34
 
                                  <td border="1">connect</td>
35
 
                                  <td border="1">auth</td>
36
 
                                  <td border="1">query</td>
37
 
                                  <td border="1">close</td>
38
 
                                 </tr>
39
 
                                 <tr>
40
 
                                  <td border="1" bgcolor="orange" colspan="4">liblua</td>
41
 
                                 </tr>
42
 
 
43
 
                                </table>
44
 
                                >
45
 
                ]
46
 
        }
47
 
 
48
 
        subgraph network {
49
 
                rank = "same";
50
 
                Blocks [
51
 
                        label = <
52
 
                                <table border="1" cellborder="1">
53
 
                                 <tr>
54
 
                                  <td bgcolor="black" port="head" colspan="4">
55
 
                                   <font color="white">Proxy</font>
56
 
                                  </td>
57
 
                                 </tr>
58
 
                                 <tr>
59
 
                                  <td border="0" colspan="2"></td>
60
 
                                  <td border="1" port="script" colspan="2">script</td>
61
 
                                 </tr>
62
 
                                 <tr>
63
 
                                  <td border="0" colspan="2"></td>
64
 
                                  <td border="1" port="admin" colspan="2">admin plugin</td>
65
 
                                 </tr>
66
 
                                 <tr>
67
 
                                  <td border="1" port="script" colspan="2">script</td>
68
 
                                  <td border="0" colspan="2"></td>
69
 
                                 </tr>
70
 
                                 <tr>
71
 
                                  <td border="1" port="proxy" colspan="2">proxy plugin</td>
72
 
                                  <td border="0" colspan="2"></td>
73
 
                                 </tr>
74
 
                                 <tr>
75
 
                                  <td border="1" port="proxy" colspan="4">network core</td>
76
 
                                 </tr>
77
 
                                 <tr>
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>
82
 
                                 </tr>
83
 
                                </table>
84
 
                                >
85
 
                ]
86
 
 
87
 
                Clients [
88
 
                        label = <
89
 
                                <table border="1" cellborder="1">
90
 
                                 <tr>
91
 
                                  <td bgcolor="grey" port="head">
92
 
                                   <font color="white">Clients</font>
93
 
                                  </td>
94
 
                                 </tr>
95
 
                                 <tr>
96
 
                                  <td border="1" port="admin">admin</td>
97
 
                                 </tr>
98
 
                                 <tr>
99
 
                                  <td border="1" port="app">app</td>
100
 
                                 </tr>
101
 
                                </table>
102
 
                                >
103
 
                ];
104
 
 
105
 
                Backend [
106
 
                ];
107
 
        }
108
 
 
109
 
        subgraph lowend {
110
 
                rank="same";
111
 
                Chassis [
112
 
                        label = <
113
 
                                <table border="1" cellborder="1">
114
 
                                 <tr>
115
 
                                  <td bgcolor="blue" port="head" colspan="4">
116
 
                                   <font color="white">Chassis</font>
117
 
                                  </td>
118
 
                                 </tr>
119
 
                                 <tr>
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>
124
 
                                 </tr>
125
 
                                 <tr>
126
 
                                  <td border="1" bgcolor="orange" colspan="4">glib-2.0</td>
127
 
                                 </tr>
128
 
 
129
 
                                </table>
130
 
                                >
131
 
                ]
132
 
 
133
 
                Socket [
134
 
                        label = <
135
 
                                <table border="1" cellborder="1">
136
 
                                 <tr>
137
 
                                  <td bgcolor="blue" port="head" colspan="3">
138
 
                                   <font color="white">Socket</font>
139
 
                                  </td>
140
 
                                 </tr>
141
 
                                 <tr>
142
 
                                  <td border="1" bgcolor="orange">libevent</td>
143
 
                                  <td border="1" bgcolor="orange">libresolv</td>
144
 
                                  <td border="1">socket()</td>
145
 
                                 </tr>
146
 
                                </table>
147
 
                                >
148
 
                ]
149
 
 
150
 
                Protocol [
151
 
                        label = <
152
 
                                <table border="1" cellborder="1">
153
 
                                 <tr>
154
 
                                  <td bgcolor="blue" port="head" colspan="4">
155
 
                                   <font color="white">Protocol</font>
156
 
                                  </td>
157
 
                                 </tr>
158
 
                                 <tr>
159
 
                                  <td border="1">mysql</td>
160
 
                                  <td border="1">binlog</td>
161
 
                                  <td border="1">frm</td>
162
 
                                  <td border="1">masterinfo</td>
163
 
                                 </tr>
164
 
                                </table>
165
 
                                >
166
 
                ]
167
 
        }
168
 
 
169
 
        Legend [
170
 
                label = <
171
 
                        <table border="1" cellborder="1">
172
 
                         <tr>
173
 
                          <td bgcolor="grey" port="head">
174
 
                           <font color="white">Legend</font>
175
 
                          </td>
176
 
                         </tr>
177
 
                         <tr>
178
 
                          <td border="1" bgcolor="orange">external lib</td>
179
 
                         </tr>
180
 
                         <tr>
181
 
                          <td border="1" bgcolor="blue">internal lib</td>
182
 
                         </tr>
183
 
                        </table>
184
 
                        >
185
 
        ]
186
 
 
187
 
        Blocks:chassis:s -> Chassis:head:ne [ arrowhead = none ];
188
 
        Blocks:chassis:s -> Chassis:head:nw [ arrowhead = none ];
189
 
 
190
 
        Blocks:socket:s -> Socket:head:ne [ arrowhead = none ];
191
 
        Blocks:socket:s -> Socket:head:nw [ arrowhead = none ];
192
 
 
193
 
        Blocks:protocol:s -> Protocol:head:ne [ arrowhead = none ];
194
 
        Blocks:protocol:s -> Protocol:head:nw [ arrowhead = none ];
195
 
 
196
 
        Blocks:script:ne -> Script:head:se [ arrowhead = none ];
197
 
        Blocks:script:nw -> Script:head:sw [ arrowhead = none ];
198
 
 
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" ];
202
 
}