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

« back to all changes in this revision

Viewing changes to doc/architecture-overview.dot

  • Committer: Kay Roepke
  • Author(s): Jan Kneschke
  • Date: 2008-01-23 22:00:28 UTC
  • Revision ID: kay@mysql.com-20080123220028-hq2xqb69apa75fnx
first round on mysql-shell based on the proxy code

this is mostly a verification if the proxy-code is flexible enough to handle 
all three scenarios of: client, server and forwarding (proxy)

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
 
        rank = "same";
24
 
        rankdir = "LR";
25
 
        subgraph clients {
26
 
                Clients1 [
27
 
                        label = <
28
 
                                <table border="1" cellborder="1">
29
 
                                 <tr>
30
 
                                  <td bgcolor="grey" port="head">
31
 
                                   <font color="white">Client</font>
32
 
                                  </td>
33
 
                                 </tr>
34
 
                                 <tr border="0"><td border="0"><table border="0">
35
 
                                 <tr>
36
 
                                  <td border="1" port="app">app</td>
37
 
                                 </tr>
38
 
                                </table>
39
 
                                </td></tr></table>
40
 
                                >
41
 
                ];
42
 
 
43
 
                Clients2 [
44
 
                        label = <
45
 
                                <table border="1" cellborder="1">
46
 
                                 <tr>
47
 
                                  <td bgcolor="grey" port="head">
48
 
                                   <font color="white">Client</font>
49
 
                                  </td>
50
 
                                 </tr>
51
 
                                 <tr border="0"><td border="0"><table border="0">
52
 
                                 <tr>
53
 
                                  <td border="1" port="app">app</td>
54
 
                                 </tr>
55
 
                                </table>
56
 
                                </td></tr></table>
57
 
                                >
58
 
                ];
59
 
        }
60
 
 
61
 
        subgraph backends {
62
 
                Backend1 [
63
 
                        label = <
64
 
                                <table border="1" cellborder="1">
65
 
                                 <tr>
66
 
                                  <td bgcolor="grey" port="head">
67
 
                                   <font color="white">MySQL Server</font>
68
 
                                  </td>
69
 
                                 </tr>
70
 
                                 <tr border="0"><td border="0"><table border="0">
71
 
                                 <tr>
72
 
                                  <td border="1" port="port">10.0.0.1:3306</td>
73
 
                                 </tr>
74
 
                                </table>
75
 
                                </td></tr></table>
76
 
                                >
77
 
 
78
 
                ];
79
 
 
80
 
                Backend2 [
81
 
                        label = <
82
 
                                <table border="1" cellborder="1">
83
 
                                 <tr>
84
 
                                  <td bgcolor="grey" port="head">
85
 
                                   <font color="white">MySQL Server</font>
86
 
                                  </td>
87
 
                                 </tr>
88
 
                                 <tr border="0"><td border="0"><table border="0">
89
 
                                 <tr>
90
 
                                  <td border="1" port="port">10.0.0.2:3306</td>
91
 
                                 </tr>
92
 
                                </table>
93
 
                                </td></tr></table>
94
 
                                >
95
 
 
96
 
                ];
97
 
 
98
 
        }
99
 
 
100
 
        Blocks [
101
 
                label = <
102
 
                        <table border="1" cellborder="1">
103
 
                         <tr>
104
 
                          <td bgcolor="black" port="head">
105
 
                           <font color="white">MySQL Proxy</font>
106
 
                          </td>
107
 
                         </tr>
108
 
                         <tr border="0"><td border="0"><table border="0">
109
 
                         <tr>
110
 
                          <td border="1" port="script">script</td>
111
 
                         </tr>
112
 
                         <tr>
113
 
                          <td border="1" port="plugin">plugin</td>
114
 
                         </tr>
115
 
                         <tr>
116
 
                          <td border="1" port="proxy">network core</td>
117
 
                         </tr>
118
 
                        </table>
119
 
                        </td></tr></table>
120
 
                        >
121
 
        ]
122
 
 
123
 
 
124
 
        Clients1:app:e -> Blocks:w;
125
 
        Clients2:app:e -> Blocks:w;
126
 
        Blocks:e -> Backend1:port:w;
127
 
        Blocks:e -> Backend2:port:w;
128
 
}