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#main_c">Function: main()</a>
232                    </span>
233                  </dt>
234                  <dt>
235                    <span class="sect2">
236                      <a href="simpleprogramlisting.html#create_env_c">Function: create_env()</a>
237                    </span>
238                  </dt>
239                  <dt>
240                    <span class="sect2">
241                      <a href="simpleprogramlisting.html#env_init_c">Function: env_init()</a>
242                    </span>
243                  </dt>
244                  <dt>
245                    <span class="sect2">
246                      <a href="simpleprogramlisting.html#doloop_c">Function: doloop()</a>
247                    </span>
248                  </dt>
249                  <dt>
250                    <span class="sect2">
251                      <a href="simpleprogramlisting.html#printstocks_c">
252                            Function: print_stocks()
253                            
254                            
255                    </a>
256                    </span>
257                  </dt>
258                </dl>
259              </dd>
260            </dl>
261          </dd>
262          <dt>
263            <span class="chapter">
264              <a href="repapp.html">3. The DB Replication Framework</a>
265            </span>
266          </dt>
267          <dd>
268            <dl>
269              <dt>
270                <span class="sect1">
271                  <a href="repapp.html#rep_init_code">
272                Starting and Stopping Replication
273            </a>
274                </span>
275              </dt>
276              <dd>
277                <dl>
278                  <dt>
279                    <span class="sect2">
280                      <a href="repapp.html#election_flags">Managing Election Policies</a>
281                    </span>
282                  </dt>
283                  <dt>
284                    <span class="sect2">
285                      <a href="repapp.html#thread_count">Selecting the Number of Threads</a>
286                    </span>
287                  </dt>
288                </dl>
289              </dd>
290              <dt>
291                <span class="sect1">
292                  <a href="repmgr_init_example_c.html">Adding the Replication Framework to
293                    simple_txn
294                    
295            </a>
296                </span>
297              </dt>
298              <dt>
299                <span class="sect1">
300                  <a href="fwrkpermmessage.html">Permanent Message Handling</a>
301                </span>
302              </dt>
303              <dd>
304                <dl>
305                  <dt>
306                    <span class="sect2">
307                      <a href="fwrkpermmessage.html#fmwrkpermpolicy">Identifying Permanent Message Policies</a>
308                    </span>
309                  </dt>
310                  <dt>
311                    <span class="sect2">
312                      <a href="fwrkpermmessage.html#fmwrkpermtimeout">Setting the Permanent Message Timeout</a>
313                    </span>
314                  </dt>
315                  <dt>
316                    <span class="sect2">
317                      <a href="fwrkpermmessage.html#perm2fmwrkexample">Adding a Permanent Message Policy to 
318                            rep_mgr
319                            
320                            
321                    </a>
322                    </span>
323                  </dt>
324                </dl>
325              </dd>
326              <dt>
327                <span class="sect1">
328                  <a href="electiontimes.html">Managing Election Times</a>
329                </span>
330              </dt>
331              <dd>
332                <dl>
333                  <dt>
334                    <span class="sect2">
335                      <a href="electiontimes.html#electiontimeout">Managing Election Timeouts</a>
336                    </span>
337                  </dt>
338                  <dt>
339                    <span class="sect2">
340                      <a href="electiontimes.html#electretrytime">Managing Election Retry Times</a>
341                    </span>
342                  </dt>
343                </dl>
344              </dd>
345              <dt>
346                <span class="sect1">
347                  <a href="fmwrkconnectretry.html">Managing Connection Retries</a>
348                </span>
349              </dt>
350              <dt>
351                <span class="sect1">
352                  <a href="heartbeats.html">Managing Heartbeats</a>
353                </span>
354              </dt>
355            </dl>
356          </dd>
357          <dt>
358            <span class="chapter">
359              <a href="fwrkmasterreplica.html">4. Replica versus Master Processes</a>
360            </span>
361          </dt>
362          <dd>
363            <dl>
364              <dt>
365                <span class="sect1">
366                  <a href="fwrkmasterreplica.html#determinestate">Determining State</a>
367                </span>
368              </dt>
369              <dt>
370                <span class="sect1">
371                  <a href="processingloop.html">Processing Loop</a>
372                </span>
373              </dt>
374              <dt>
375                <span class="sect1">
376                  <a href="exampledoloop.html">Example Processing Loop</a>
377                </span>
378              </dt>
379              <dd>
380                <dl>
381                  <dt>
382                    <span class="sect2">
383                      <a href="exampledoloop.html#runningit">Running It</a>
384                    </span>
385                  </dt>
386                </dl>
387              </dd>
388            </dl>
389          </dd>
390          <dt>
391            <span class="chapter">
392              <a href="addfeatures.html">5. Additional Features</a>
393            </span>
394          </dt>
395          <dd>
396            <dl>
397              <dt>
398                <span class="sect1">
399                  <a href="addfeatures.html#delayedsync">Delayed Synchronization</a>
400                </span>
401              </dt>
402              <dt>
403                <span class="sect1">
404                  <a href="manageblock.html">Managing Blocking Operations</a>
405                </span>
406              </dt>
407              <dt>
408                <span class="sect1">
409                  <a href="noautoinit.html">Stop Auto-Initialization</a>
410                </span>
411              </dt>
412              <dt>
413                <span class="sect1">
414                  <a href="c2ctransfer.html">Client to Client Transfer</a>
415                </span>
416              </dt>
417              <dd>
418                <dl>
419                  <dt>
420                    <span class="sect2">
421                      <a href="c2ctransfer.html#fmwrkpeerserver">Identifying Peers</a>
422                    </span>
423                  </dt>
424                </dl>
425              </dd>
426              <dt>
427                <span class="sect1">
428                  <a href="bulk.html">Bulk Transfers</a>
429                </span>
430              </dt>
431            </dl>
432          </dd>
433        </dl>
434      </div>
435    </div>
436    <div class="navfooter">
437      <hr />
438      <table width="100%" summary="Navigation footer">
439        <tr>
440          <td width="40%" align="left"> </td>
441          <td width="20%" align="center"> </td>
442          <td width="40%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
443        </tr>
444        <tr>
445          <td width="40%" align="left" valign="top"> </td>
446          <td width="20%" align="center"> </td>
447          <td width="40%" align="right" valign="top"> Preface</td>
448        </tr>
449      </table>
450    </div>
451  </body>
452</html>
453