diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-02-17 17:25:57 +0000 |
|---|---|---|
| committer | <> | 2015-03-17 16:26:24 +0000 |
| commit | 780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch) | |
| tree | 598f8b9fa431b228d29897e798de4ac0c1d3d970 /docs/programmer_reference/rep_ex.html | |
| parent | 7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff) | |
| download | berkeleydb-master.tar.gz | |
Diffstat (limited to 'docs/programmer_reference/rep_ex.html')
| -rw-r--r-- | docs/programmer_reference/rep_ex.html | 238 |
1 files changed, 126 insertions, 112 deletions
diff --git a/docs/programmer_reference/rep_ex.html b/docs/programmer_reference/rep_ex.html index 3e5f9e62..f458dbc1 100644 --- a/docs/programmer_reference/rep_ex.html +++ b/docs/programmer_reference/rep_ex.html @@ -14,7 +14,7 @@ <body> <div xmlns="" class="navheader"> <div class="libver"> - <p>Library Version 11.2.5.3</p> + <p>Library Version 12.1.6.1</p> </div> <table width="100%" summary="Navigation header"> <tr> @@ -22,9 +22,7 @@ </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="rep_faq.html">Prev</a> </td> - <th width="60%" align="center">Chapter 12. - Berkeley DB Replication - </th> + <th width="60%" align="center">Chapter 12. Berkeley DB Replication </th> <td width="20%" align="right"> <a accesskey="n" href="rep_ex_comm.html">Next</a></td> </tr> </table> @@ -38,180 +36,196 @@ </div> </div> </div> - <p>Ex_rep, found in the <code class="filename">examples_c/ex_rep</code> subdirectory -of the Berkeley DB distribution, is a simple but complete demonstration of a -replicated application. The application is a mock stock ticker. The -master accepts a stock symbol and a numerical value as input, and -stores this information into a replicated database; either master or -clients can display the contents of the database, given an empty input -line.</p> - <p>There are two versions of the application: ex_rep_mgr uses Replication -Manager, while ex_rep_base uses the replication Base API. This is -intended to demonstrate that, while the basic function of the -application is the same in either case, the replication support -infrastructure differs markedly.</p> - <p>The communication infrastructure demonstrated with ex_rep_base has the -same dependencies on system networking and threading support as does -the Replication Manager (see the <a class="xref" href="rep.html#rep_intro" title="Replication introduction">Replication introduction</a>). The Makefile created by the standard UNIX -configuration will build the ex_rep examples on most platforms. Enter -"make ex_rep_mgr" and/or "make ex_rep_base" to build them.</p> - <p>The synopsis for both programs is as follows:</p> - <code class="literal">ex_rep_xxx <span class="bold"><strong>-h home</strong></span> <span class="bold"><strong>-l host:port</strong></span> [<span class="bold"><strong>-MC</strong></span>] [<span class="bold"><strong>-r host:port</strong></span>] [<span class="bold"><strong>-R host:port</strong></span>] [<span class="bold"><strong>-a all|quorum</strong></span>] [<span class="bold"><strong>-b</strong></span>] [<span class="bold"><strong>-n sites</strong></span>] [<span class="bold"><strong>-p priority</strong></span>] [<span class="bold"><strong>-v</strong></span>]</code> <p> - where "ex_rep_xxx" is either "ex_rep_mgr" or "ex_rep_base". The only - difference is that: -</p> + Ex_rep, found in the <code class="filename">examples/c/ex_rep</code> + subdirectory of the Berkeley DB distribution, is a simple but + complete demonstration of a replicated application. The + application is a mock stock ticker. The master accepts a stock + symbol and a numerical value as input, and stores this + information into a replicated database; either master or + clients can display the contents of the database, given an + empty input line. + </p> + <p> + There are two versions of the application: ex_rep_mgr uses + Replication Manager, while ex_rep_base uses the replication + Base API. This is intended to demonstrate that, while the + basic function of the application is the same in either case, + the replication support infrastructure differs + markedly. + </p> + <p> + The communication infrastructure demonstrated with + ex_rep_base has the same dependencies on system networking and + threading support as does the Replication Manager (see the + <a class="xref" href="rep.html#rep_intro" title="Replication introduction">Replication introduction</a>). + The Makefile created by the standard UNIX configuration will + build the ex_rep examples on most platforms. Enter "make + ex_rep_mgr" and/or "make ex_rep_base" to build them. + </p> + <p> + The synopsis for both programs is as follows: + </p> + <code class="literal">ex_rep_xxx <span class="bold"><strong>-h home</strong></span> + <span class="bold"><strong>-l host:port</strong></span> [<span class="bold"><strong>-MC</strong></span>] [<span class="bold"><strong>-r + host:port</strong></span>] [<span class="bold"><strong>-R + host:port</strong></span>] [<span class="bold"><strong>-a + all|quorum</strong></span>] [<span class="bold"><strong>-b</strong></span>] + [<span class="bold"><strong>-n + sites</strong></span>] [<span class="bold"><strong>-p + priority</strong></span>] [<span class="bold"><strong>-v</strong></span>]</code> + <p> + where "ex_rep_xxx" is either "ex_rep_mgr" or "ex_rep_base". + The only difference is that: + </p> <div class="itemizedlist"> <ul type="disc"> <li> <p> - specifying <span class="bold"><strong>-M</strong></span> or - <span class="bold"><strong>-C</strong></span> is optional for ex_rep_mgr, - but one of these options must be specified for ex_rep_base. - </p> + specifying <span class="bold"><strong>-M</strong></span> or + <span class="bold"><strong>-C</strong></span> is optional + for ex_rep_mgr, but one of these options must be + specified for ex_rep_base. + </p> </li> <li> - <p> - The <span class="bold"><strong>-n</strong></span> option is not supported - supported by ex_rep_mgr. That option specifies the number of - nodes in the replication group. When you use the Replication - Manager, this number is automatically determined for you. - </p> + <p> + The <span class="bold"><strong>-n</strong></span> option is + not supported supported by ex_rep_mgr. That option + specifies the number of nodes in the replication + group. When you use the Replication Manager, this + number is automatically determined for you. + </p> </li> </ul> </div> - <p> - The options apply to either version of the program except where noted. - They are as follows: -</p> + <p> + The options apply to either version of the program except + where noted. They are as follows: + </p> <div class="variablelist"> <dl> <dt> <span class="term"> - <span class="bold"> - <strong>-h</strong> - </span> + <span class="bold"><strong>-h</strong></span> </span> </dt> - <dd>Specify a home directory for the database environment.</dd> + <dd> + Specify a home directory for the database + environment. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-l</strong> - </span> + <span class="bold"><strong>-l</strong></span> </span> </dt> - <dd>Listen on local host "host" at port "port" for incoming connections.</dd> + <dd> + Listen on local host "host" at port "port" for + incoming connections. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-M</strong> - </span> + <span class="bold"><strong>-M</strong></span> </span> </dt> - <dd>Configure this process as a master.</dd> + <dd> + Configure this process as a master. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-C</strong> - </span> + <span class="bold"><strong>-C</strong></span> </span> </dt> - <dd>Configure this process as a client.</dd> + <dd> + Configure this process as a client. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-r</strong> - </span> + <span class="bold"><strong>-r</strong></span> </span> </dt> <dd> - Identifies the helper site used for joining the group. - </dd> + Identifies the helper site used for joining the + group. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-R</strong> - </span> + <span class="bold"><strong>-R</strong></span> </span> </dt> - <dd> - Identifies a remote peer to be used for joining the group. This - peer is used for syncing purposes. See - <a class="xref" href="rep_mastersync.html#rep_c2c_sync" title="Client-to-client synchronization">Client-to-client synchronization</a> - for more information. - </dd> + <dd> + Identifies a remote peer to be used for joining + the group. This peer is used for syncing purposes. See + <a class="xref" href="rep_mastersync.html#rep_c2c_sync" title="Client-to-client synchronization">Client-to-client synchronization</a> for more + information. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-a</strong> - </span> + <span class="bold"><strong>-a</strong></span> </span> </dt> <dd> - Specify repmgr acknowledgement policy of all or quorum. See - <a href="../api_reference/C/repmgrset_ack_policy.html" class="olink">DB_ENV->repmgr_set_ack_policy()</a> for more information (ex_rep_mgr - only.) - </dd> + Specify repmgr acknowledgement policy of all or + quorum. See <a href="../api_reference/C/repmgrset_ack_policy.html" class="olink">DB_ENV->repmgr_set_ack_policy()</a> for more + information (ex_rep_mgr only.) + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-b</strong> - </span> + <span class="bold"><strong>-b</strong></span> </span> </dt> <dd> - Indicates that bulk transfer should be used. See <a class="xref" href="rep_bulk.html" title="Bulk transfer">Bulk transfer</a> for more - information. - </dd> + Indicates that bulk transfer should be used. + See <a class="xref" href="rep_bulk.html" title="Bulk transfer">Bulk transfer</a> for more information. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-n</strong> - </span> + <span class="bold"><strong>-n</strong></span> </span> </dt> - <dd> - Specify the total number of sites in the replication group - (ex_rep_base only). - </dd> + <dd> + Specify the total number of sites in the + replication group (ex_rep_base only). + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-p</strong> - </span> + <span class="bold"><strong>-p</strong></span> </span> </dt> - <dd>Set the - election priority. See - <a class="xref" href="rep_elect.html" title="Elections">Elections</a> for more - information. - </dd> + <dd> + Set the election priority. See <a class="xref" href="rep_elect.html" title="Elections">Elections</a> + for more information. + </dd> <dt> <span class="term"> - <span class="bold"> - <strong>-v</strong> - </span> + <span class="bold"><strong>-v</strong></span> </span> </dt> - <dd>Indicates that additional informational and debugging output should be enabled.</dd> + <dd> + Indicates that additional informational and + debugging output should be enabled. + </dd> </dl> </div> - <p>A typical ex_rep_mgr session begins with a command such as the -following, to start a master:</p> + <p> + A typical ex_rep_mgr session begins with a command such as + the following, to start a master: + </p> <pre class="programlisting">ex_rep_mgr -M -p 100 -h DIR1 -l localhost:30100</pre> - <p>and several clients:</p> + <p> + and several clients: + </p> <pre class="programlisting">ex_rep_mgr -C -p 50 -h DIR2 -l localhost:30101 -r localhost:30100 ex_rep_mgr -C -p 10 -h DIR3 -l localhost:30102 -r localhost:30100 ex_rep_mgr -C -p 0 -h DIR4 -l localhost:30103 -r localhost:30100</pre> <p> - In this example, the client with home directory DIR4 can never become a - master (its priority is 0). Both of the other clients can become - masters, but the one with home directory DIR2 is preferred. Priorities - are assigned by the application and should reflect the desirability of - having particular clients take over as master in the case that the - master fails. -</p> + In this example, the client with home directory DIR4 can + never become a master (its priority is 0). Both of the other + clients can become masters, but the one with home directory + DIR2 is preferred. Priorities are assigned by the application + and should reflect the desirability of having particular + clients take over as master in the case that the master fails. + </p> </div> <div class="navfooter"> <hr /> |
