1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Getting Started with Replicated Berkeley DB Applications</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" />
9    <link rel="home" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
10    <link rel="next" href="preface.html" title="Preface" />
11  </head>
12  <body>
13    <div class="navheader">
14      <table width="100%" summary="Navigation header">
15        <tr>
16          <th colspan="3" align="center">Getting Started with Replicated Berkeley DB Applications</th>
17        </tr>
18        <tr>
19          <td width="20%" align="left"> </td>
20          <th width="60%" align="center"> </th>
21          <td width="20%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
22        </tr>
23      </table>
24      <hr />
25    </div>
26    <div class="book" lang="en" xml:lang="en">
27      <div class="titlepage">
28        <div>
29          <div>
30            <h1 class="title"><a id="id613728"></a>Getting Started with Replicated Berkeley DB Applications</h1>
31          </div>
32          <div>
33            <div class="legalnotice">
34              <p class="legalnotice-title">
35                <b>Legal Notice</b>
36              </p>
37              <p>
38        This documentation is distributed under an open source license.
39        You may review the terms of this license at:
40        <a href="http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html" target="_top">http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html</a>
41        
42        
43    </p>
44              <p>
45            Oracle, Berkeley DB,
46            
47            
48            and
49            Sleepycat are trademarks or registered trademarks of
50            Oracle. All rights to these marks are reserved.
51            No third-party use is permitted without the
52            express prior written consent of Oracle.
53    </p>
54              <p>
55        To obtain a copy of this document's original source code, please
56        submit a request to the Oracle Technology Network forum at:
57        <a href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
58        
59        
60    </p>
61            </div>
62          </div>
63          <div>
64            <p class="pubdate">4/25/2008</p>
65          </div>
66        </div>
67        <div></div>
68        <hr />
69      </div>
70      <div class="toc">
71        <p>
72          <b>Table of Contents</b>
73        </p>
74        <dl>
75          <dt>
76            <span class="preface">
77              <a href="preface.html">Preface</a>
78            </span>
79          </dt>
80          <dd>
81            <dl>
82              <dt>
83                <span class="sect1">
84                  <a href="preface.html#conventions">Conventions Used in this Book</a>
85                </span>
86              </dt>
87              <dd>
88                <dl>
89                  <dt>
90                    <span class="sect2">
91                      <a href="preface.html#moreinfo">For More Information</a>
92                    </span>
93                  </dt>
94                </dl>
95              </dd>
96            </dl>
97          </dd>
98          <dt>
99            <span class="chapter">
100              <a href="introduction.html">1. Introduction</a>
101            </span>
102          </dt>
103          <dd>
104            <dl>
105              <dt>
106                <span class="sect1">
107                  <a href="introduction.html#overview">Overview</a>
108                </span>
109              </dt>
110              <dd>
111                <dl>
112                  <dt>
113                    <span class="sect2">
114                      <a href="introduction.html#repenvirons">Replication Environments</a>
115                    </span>
116                  </dt>
117                  <dt>
118                    <span class="sect2">
119                      <a href="introduction.html#repdbs">Replication Databases</a>
120                    </span>
121                  </dt>
122                  <dt>
123                    <span class="sect2">
124                      <a href="introduction.html#commlayer">Communications Layer</a>
125                    </span>
126                  </dt>
127                  <dt>
128                    <span class="sect2">
129                      <a href="introduction.html#masterselect">Selecting a Master</a>
130                    </span>
131                  </dt>
132                </dl>
133              </dd>
134              <dt>
135                <span class="sect1">
136                  <a href="repadvantage.html">Replication Benefits</a>
137                </span>
138              </dt>
139              <dt>
140                <span class="sect1">
141                  <a href="apioverview.html">The Replication APIs</a>
142                </span>
143              </dt>
144              <dd>
145                <dl>
146                  <dt>
147                    <span class="sect2">
148                      <a href="apioverview.html#repframeworkoverview">Replication Framework Overview</a>
149                    </span>
150                  </dt>
151                  <dt>
152                    <span class="sect2">
153                      <a href="apioverview.html#repapioverview">Replication API Overview</a>
154                    </span>
155                  </dt>
156                </dl>
157              </dd>
158              <dt>
159                <span class="sect1">
160                  <a href="elections.html">Holding Elections</a>
161                </span>
162              </dt>
163              <dd>
164                <dl>
165                  <dt>
166                    <span class="sect2">
167                      <a href="elections.html#influencingelections">Influencing Elections</a>
168                    </span>
169                  </dt>
170                  <dt>
171                    <span class="sect2">
172                      <a href="elections.html#winningelections">Winning Elections</a>
173                    </span>
174                  </dt>
175                  <dt>
176                    <span class="sect2">
177                      <a href="elections.html#switchingmasters">Switching Masters</a>
178                    </span>
179                  </dt>
180                </dl>
181              </dd>
182              <dt>
183                <span class="sect1">
184                  <a href="permmessages.html">Permanent Message Handling</a>
185                </span>
186              </dt>
187              <dd>
188                <dl>
189                  <dt>
190                    <span class="sect2">
191                      <a href="permmessages.html#permmessagenot">When Not to Manage
192                            Permanent Messages</a>
193                    </span>
194                  </dt>
195                  <dt>
196                    <span class="sect2">
197                      <a href="permmessages.html#permmanage">Managing Permanent Messages</a>
198                    </span>
199                  </dt>
200                  <dt>
201                    <span class="sect2">
202                      <a href="permmessages.html#permimplement">Implementing Permanent
203                    Message Handling</a>
204                    </span>
205                  </dt>
206                </dl>
207              </dd>
208            </dl>
209          </dd>
210          <dt>
211            <span class="chapter">
212              <a href="txnapp.html">2. Transactional Application</a>
213            </span>
214          </dt>
215          <dd>
216            <dl>
217              <dt>
218                <span class="sect1">
219                  <a href="txnapp.html#appoverview">Application Overview</a>
220                </span>
221              </dt>
222              <dt>
223                <span class="sect1">
224                  <a href="simpleprogramlisting.html">Program Listing</a>
225                </span>
226              </dt>
227              <dd>
228                <dl>
229                  <dt>
230                    <span class="sect2">
231                      <a href="simpleprogramlisting.html#repconfiginfo_cxx">
232                            Class: RepConfigInfo
233                            
234                    </a>
235                    </span>
236                  </dt>
237                  <dt>
238                    <span class="sect2">
239                      <a href="simpleprogramlisting.html#repmgr_cxx">Class: RepMgr</a>
240                    </span>
241                  </dt>
242                  <dt>
243                    <span class="sect2">
244                      <a href="simpleprogramlisting.html#usage_cxx">Function: usage()</a>
245                    </span>
246                  </dt>
247                  <dt>
248                    <span class="sect2">
249                      <a href="simpleprogramlisting.html#main_cxx">Function: main()</a>
250                    </span>
251                  </dt>
252                  <dt>
253                    <span class="sect2">
254                      <a href="simpleprogramlisting.html#repmgr_init_cxx">Method: RepMgr::init()</a>
255                    </span>
256                  </dt>
257                  <dt>
258                    <span class="sect2">
259                      <a href="simpleprogramlisting.html#doloop_cxx">Method: RepMgr::doloop()</a>
260                    </span>
261                  </dt>
262                  <dt>
263                    <span class="sect2">
264                      <a href="simpleprogramlisting.html#printstocks_c">
265                            
266                            Method: RepMgr::print_stocks()
267                            
268                    </a>
269                    </span>
270                  </dt>
271                </dl>
272              </dd>
273            </dl>
274          </dd>
275          <dt>
276            <span class="chapter">
277              <a href="repapp.html">3. The DB Replication Framework</a>
278            </span>
279          </dt>
280          <dd>
281            <dl>
282              <dt>
283                <span class="sect1">
284                  <a href="repapp.html#rep_init_code">
285                Starting and Stopping Replication
286            </a>
287                </span>
288              </dt>
289              <dd>
290                <dl>
291                  <dt>
292                    <span class="sect2">
293                      <a href="repapp.html#election_flags">Managing Election Policies</a>
294                    </span>
295                  </dt>
296                  <dt>
297                    <span class="sect2">
298                      <a href="repapp.html#thread_count">Selecting the Number of Threads</a>
299                    </span>
300                  </dt>
301                </dl>
302              </dd>
303              <dt>
304                <span class="sect1">
305                  <a href="repmgr_init_example_c.html">Adding the Replication Framework to
306                    
307                    SimpleTxn
308            </a>
309                </span>
310              </dt>
311              <dt>
312                <span class="sect1">
313                  <a href="fwrkpermmessage.html">Permanent Message Handling</a>
314                </span>
315              </dt>
316              <dd>
317                <dl>
318                  <dt>
319                    <span class="sect2">
320                      <a href="fwrkpermmessage.html#fmwrkpermpolicy">Identifying Permanent Message Policies</a>
321                    </span>
322                  </dt>
323                  <dt>
324                    <span class="sect2">
325                      <a href="fwrkpermmessage.html#fmwrkpermtimeout">Setting the Permanent Message Timeout</a>
326                    </span>
327                  </dt>
328                  <dt>
329                    <span class="sect2">
330                      <a href="fwrkpermmessage.html#perm2fmwrkexample">Adding a Permanent Message Policy to 
331                            
332                            RepMgr
333                            
334                    </a>
335                    </span>
336                  </dt>
337                </dl>
338              </dd>
339              <dt>
340                <span class="sect1">
341                  <a href="electiontimes.html">Managing Election Times</a>
342                </span>
343              </dt>
344              <dd>
345                <dl>
346                  <dt>
347                    <span class="sect2">
348                      <a href="electiontimes.html#electiontimeout">Managing Election Timeouts</a>
349                    </span>
350                  </dt>
351                  <dt>
352                    <span class="sect2">
353                      <a href="electiontimes.html#electretrytime">Managing Election Retry Times</a>
354                    </span>
355                  </dt>
356                </dl>
357              </dd>
358              <dt>
359                <span class="sect1">
360                  <a href="fmwrkconnectretry.html">Managing Connection Retries</a>
361                </span>
362              </dt>
363              <dt>
364                <span class="sect1">
365                  <a href="heartbeats.html">Managing Heartbeats</a>
366                </span>
367              </dt>
368            </dl>
369          </dd>
370          <dt>
371            <span class="chapter">
372              <a href="fwrkmasterreplica.html">4. Replica versus Master Processes</a>
373            </span>
374          </dt>
375          <dd>
376            <dl>
377              <dt>
378                <span class="sect1">
379                  <a href="fwrkmasterreplica.html#determinestate">Determining State</a>
380                </span>
381              </dt>
382              <dt>
383                <span class="sect1">
384                  <a href="processingloop.html">Processing Loop</a>
385                </span>
386              </dt>
387              <dt>
388                <span class="sect1">
389                  <a href="exampledoloop.html">Example Processing Loop</a>
390                </span>
391              </dt>
392              <dd>
393                <dl>
394                  <dt>
395                    <span class="sect2">
396                      <a href="exampledoloop.html#runningit">Running It</a>
397                    </span>
398                  </dt>
399                </dl>
400              </dd>
401            </dl>
402          </dd>
403          <dt>
404            <span class="chapter">
405              <a href="addfeatures.html">5. Additional Features</a>
406            </span>
407          </dt>
408          <dd>
409            <dl>
410              <dt>
411                <span class="sect1">
412                  <a href="addfeatures.html#delayedsync">Delayed Synchronization</a>
413                </span>
414              </dt>
415              <dt>
416                <span class="sect1">
417                  <a href="manageblock.html">Managing Blocking Operations</a>
418                </span>
419              </dt>
420              <dt>
421                <span class="sect1">
422                  <a href="noautoinit.html">Stop Auto-Initialization</a>
423                </span>
424              </dt>
425              <dt>
426                <span class="sect1">
427                  <a href="c2ctransfer.html">Client to Client Transfer</a>
428                </span>
429              </dt>
430              <dd>
431                <dl>
432                  <dt>
433                    <span class="sect2">
434                      <a href="c2ctransfer.html#fmwrkpeerserver">Identifying Peers</a>
435                    </span>
436                  </dt>
437                </dl>
438              </dd>
439              <dt>
440                <span class="sect1">
441                  <a href="bulk.html">Bulk Transfers</a>
442                </span>
443              </dt>
444            </dl>
445          </dd>
446        </dl>
447      </div>
448    </div>
449    <div class="navfooter">
450      <hr />
451      <table width="100%" summary="Navigation footer">
452        <tr>
453          <td width="40%" align="left"> </td>
454          <td width="20%" align="center"> </td>
455          <td width="40%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
456        </tr>
457        <tr>
458          <td width="40%" align="left" valign="top"> </td>
459          <td width="20%" align="center"> </td>
460          <td width="40%" align="right" valign="top"> Preface</td>
461        </tr>
462      </table>
463    </div>
464  </body>
465</html>
466