Project

General

Profile

« Previous | Next » 

Revision 1302

Added by Jing Tao about 22 years ago

Change the documentation according our new feature in replication.

View differences:

docs/user/replication.html
27 27
    </tr>
28 28
  </table>
29 29
  <p>Metacat has built in replication to allow different Metacat servers to 
30
  share data between themselves.  The replication scheme that Metacat uses is
31
  both push and pull.  There are several triggers that can start a replication 
32
  mechanism. </p>
30
  share data between themselves. In this release, Metacat not only replicate 
31
  XML documents but also data files. </p>
32
  <p> A new hub feature was added to Metacat too. Previous version of Metacat
33
  only replicate XML documents whose home server is itself. But hub Metacat can 
34
  replicate both its documents and other's documents which replicated from 
35
  other server.</p>
36
  <p>The replication scheme that Metacat uses is both push and pull.  There are 
37
  several triggers that can start a replication mechanism. </p>
33 38
  <ul>
34 39
    <li>Delta-T monitoring. At a set time interval a server checks each of the
35 40
    other servers in its list for updated documents</li>
......
46 51
    can give a lock for that file to be altered.</li>
47 52
  </ul>
48 53
  <p>Each server contains a list of servers to which it can replicate.  One-way
49
  replication is enabled by the 'replicate' flag in the list.  The server list 
50
  may look like the following.</p>
54
  replication is enabled by the 'replicate' and 'datareplicate' flags in the 
55
  list.  The server list may look like the following.</p>
51 56
  <table border="1">
52 57
    <tr>
53 58
      <td><b>serverid</b></td>
54 59
      <td><b>server</b></td>
55 60
      <td><b>last_checked</b></td>
56 61
      <td><b>replicate</b></td>
62
      <td><b>datareplicate</b></td>
63
      <td><b>hub</b></td>
57 64
    </tr>
58 65
    <tr>
59 66
      <td>1</td>
60 67
      <td>localhost</td>
61 68
      <td>null</td>
62 69
      <td>0</td>
70
      <td>0</td>
71
      <td>0</td>
63 72
    </tr>
64 73
    <tr>
65 74
      <td>2</td>
66 75
      <td>alpha.nceas.ucsb.edu:8080/berkley/servlet/replication</td>
67 76
      <td>2001-01-22 14:52:12.1</td>
68
      <td>1</td>
77
      <td>0</td>
78
      <td>0</td>
79
      <td>0</td>
69 80
    </tr>
70 81
    <tr>
71 82
      <td>3</td>
72 83
      <td>dev.nceas.ucsb.edu/Metacat/servlet/replication</td>
73 84
      <td>2001-01-23 9:10:02.5</td>
74 85
      <td>1</td>
86
      <td>1</td>
87
      <td>0</td>
75 88
    </tr>
76 89
  </table>
77 90
  
......
81 94
  hence the servlet/replication on the end of both of the sample servers.  Note
82 95
  that any port numbers (if your servlet engine is not running on port 80) must
83 96
  also be included.  The replicate flag is set to 1 if you want this server to 
84
  copy data TO the remote host.  (Note that both servers (the local host and 
85
  the remote host) must have each other in their respective tables or replication
86
  will not take place.)</p>
97
  copy XML documents TO the remote host.  If replicate flag is set to 1 and 
98
  datareplicate is set to 1, this server can copy data file TO the remote host
99
  too. If this server is a hub to the remote host, the hub flag should be set to
100
  1. (Note that both servers (the local host and the remote host) must have each 
101
  other in their respective tables or replication will not take place.)</p>
87 102
  <b>Example:</b>
88 103
  <table border="1">
89 104
    <tr>
......
98 113
          <td><b>server</b></td>
99 114
          <td><b>last_checked</b></td>
100 115
          <td><b>replicate</b></td>
116
          <td><b>datareplicate</b></td>
117
          <td><b>hub</b></td>
101 118
        </tr>
102 119
        <tr>
103 120
          <td>localhost</td>
104 121
          <td>null</td>
105 122
          <td>0</td>
123
          <td>0</td>
124
          <td>0</td>
106 125
        </tr>
107 126
        <tr>
108 127
          <td>alpha.nceas.ucsb.edu:8080/berkley/servlet/replication&nbsp;&nbsp;&nbsp;</td>
109 128
          <td>2001-01-22 14:52:12.1</td>
110
          <td>1</td>
129
          <td>0</td>
130
          <td>0</td>
131
          <td>0</td>
111 132
        </tr>
112 133
        <tr>
113 134
          <td>dev.nceas.ucsb.edu/Metacat/servlet/replication</td>
114 135
          <td>2001-01-23 9:10:02.5</td>
115 136
          <td>1</td>
137
          <td>1</td>
138
          <td>0</td>
116 139
        </tr>
117 140
      </table>
118 141
     </td>
......
125 148
            <td><b>server</b></td>
126 149
            <td><b>last_checked</b></td>
127 150
            <td><b>replicate</b></td>
151
            <td><b>datareplicate</b></td>
152
            <td><b>hub</b></td>
128 153
          </tr>
129 154
          <tr>
130 155
            <td>localhost</td>
131 156
            <td>null</td>
132 157
            <td>0</td>
158
            <td>0</td>
159
            <td>0</td>
133 160
          </tr>
134 161
          <tr>
135 162
            <td>snoopy.nceas.ucsb.edu:8080/berkley/servlet/replication</td>
136 163
            <td>2001-01-21 11:33:12.7</td>
137 164
            <td>0</td>
165
            <td>1</td>
166
            <td>0</td>
138 167
          </tr>
139 168
          <tr>
140 169
            <td>dev.nceas.ucsb.edu/Metacat/servlet/replication</td>
141 170
            <td>2001-01-23 10:22:02.5</td>
142 171
            <td>1</td>
172
            <td>0</td>
173
            <td>0</td>
143 174
          </tr>
144 175
        </table>
145 176
      </td>
......
152 183
            <td><b>server</b></td>
153 184
            <td><b>last_checked</b></td>
154 185
            <td><b>replicate</b></td>
186
            <td><b>datareplicate</b></td>
187
            <td><b>hub</b></td>
155 188
          </tr>
156 189
          <tr>
157 190
            <td>localhost</td>
158 191
            <td>null</td>
159 192
            <td>0</td>
193
            <td>0</td>
194
            <td>0</td>
160 195
          </tr>
161 196
          <tr>
162 197
            <td>snoopy.nceas.ucsb.edu:8080/berkley/servlet/replication</td>
163 198
            <td>2001-01-21 11:33:12.7</td>
164 199
            <td>0</td>
200
            <td>0</td>
201
            <td>0</td>
165 202
          </tr>
166 203
          <tr>
167 204
            <td>alpha.nceas.ucsb.edu:8080/Metacat/servlet/replication</td>
168 205
            <td>2001-01-22 12:15:32.5</td>
169 206
            <td>1</td>
207
            <td>1</td>
208
            <td>1</td>
170 209
          </tr>
171 210
        </table>
172 211
      </td>
......
174 213
  </table>
175 214
  <p>Our three servers, snoopy, alpha and dev are all set up to replicate
176 215
  between themselves.  Snoopy is a one way replicator.  Meaning that it only 
177
  pushes data to alpha and dev but does not pull back from them.  This
216
  pushes XML documents and data file to dev but does not pull back from it.  This
178 217
  is achieved by dev and alpha setting snoopy's 'replicate' value to 0 indicating
179
  that they do not want to send their files to snoopy.  Alpha and dev have a 
180
  two-way replication agreement since each of them have a 1 in their 'replicate'
181
  value for the other.</p>
218
  that they do not want to send their files to snoopy(Even in in Alpha, 
219
  'datareplicate' is set to 1 for snoopy but nothing will be sent to Snoopy from alpha).  
220
  Alpha and dev have a two-way replication agreement since each of them have a 1 
221
  in their 'replicate' value for the other.</p>
222
  <p>Snoopy will replicate both XML documents and data file to dev because it 
223
  setting dev's 'replicata' and 'datareplicate' is 1. Alpha only replicate
224
  XML documents to dev and this is caused by it setting dev's 'datareplicate' 0.
225
  </p>
226
  <p>Dev is a hub of alpha because it setting alpha's 'hub' value to be 1. Moreover, 
227
  dev set alpha's 'replicate' and 'datareplicate' value 1. So dev will replicate
228
  XML documents and data file whose home server is dev or snoopy(replicated 
229
  from snoopy) to alpha</p>
230
  <P>Note: if 'replicate' value is 0, the value for 'datareplicate' and 'hub'
231
  has no sense.</P>
182 232
  <p>There is an html control panel for controling replication.  After
183 233
  <a href="./Metacatinstall.html">installing</a> Metacat, you can access
184 234
  it by going through the Metacat servlet context you have setup and calling up

Also available in: Unified diff