~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/ref/rep/ex.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Ex_repquote: a replication example</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<table width="100%"><tr valign=top>
13
 
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Berkeley DB Replication</dl></h3></td>
14
 
<td align=right><a href="../../ref/rep/faq.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/rep/ex_comm.html"><img src="../../images/next.gif" alt="Next"></a>
15
 
</td></tr></table>
16
 
<p>
17
 
<h1 align=center>Ex_repquote: a replication example</h1>
18
 
<p>Ex_repquote, found in the <b>examples_c/ex_repquote</b> subdirectory
19
 
of the Berkeley DB distribution, is a simple but complete demonstration of a
20
 
replicated application.  The application is a mock stock ticker.  The
21
 
master accepts a stock symbol and an integer value as input, stores this
22
 
information into a replicated database; the clients display the contents
23
 
of the database every few seconds.
24
 
<p>The ex_repquote application's communication infrastructure is based on
25
 
TCP/IP sockets, and uses POSIX 1003.1 style networking/socket support.
26
 
As a result, it is not as portable as the Berkeley DB library itself.  The
27
 
Makefile created by the standard UNIX configuration will build the
28
 
ex_repquote application on most platforms.  Enter "make ex_repquote" to
29
 
attempt to build it.
30
 
<p>The synopsis for ex_repquote is as follows:
31
 
<pre>ex_repquote [<b>-MC</b>] [<b>-h home</b>] [<b>-m host:port</b>] [<b>-o host:port</b>] [<b>-n sites</b>] [<b>-p priority</b>]</pre>
32
 
<p>The options to ex_repquote are as follows:
33
 
<p><dl compact>
34
 
<p><dt><b>-M</b><dd>Configure this process as a master.
35
 
<p><dt><b>-C</b><dd>Configure this process as a client.
36
 
<p><dt><b>-h</b><dd>Specify a home directory for the database environment; by
37
 
default, the current working directory is used.
38
 
<p><dt><b>-m</b><dd>Listen on port "port" of host "host" for incoming connections.
39
 
<p><dt><b>-o</b><dd>Attempt to connect to another member of the replication group which is
40
 
listening on host "host" at port "port".  Members of a replication group
41
 
should be able to find all other members of a replication group so long
42
 
as they are in contact with at least one other member of the replication
43
 
group.
44
 
<p><dt><b>-n</b><dd>Specify the total number of sites in the replication group.
45
 
<p><dt><b>-p</b><dd>Set the election priority.  See <a href="../../api_c/rep_elect.html">DB_ENV-&gt;rep_elect</a> for more
46
 
information.
47
 
</dl>
48
 
<p>A typical ex_repquote session begins with a command such as the
49
 
following, to start a master:
50
 
<p><blockquote><pre>ex_repquote -M -p 100 -n 4 -h DIR1 -m localhost:5000</pre></blockquote>
51
 
<p>and several clients:
52
 
<p><blockquote><pre>ex_repquote -C -p 50 -n 4 -h DIR2 -m localhost:5001 -o localhost:5000
53
 
ex_repquote -C -p 10 -n 4 -h DIR3 -m localhost:5002 -o localhost:5000
54
 
ex_repquote -C -p  0 -n 4 -h DIR4 -m localhost:5003 -o localhost:5000</pre></blockquote>
55
 
<p>In this example, the client with home directory DIR4 can never become
56
 
a master (its priority is 0).  Both of the other clients can become
57
 
masters, but the one with home directory DIR2 is preferred.  Priorities
58
 
are assigned by the application and should reflect the desirability of
59
 
having particular clients take over as master in the case that the
60
 
master fails.
61
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/rep/faq.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/rep/ex_comm.html"><img src="../../images/next.gif" alt="Next"></a>
62
 
</td></tr></table>
63
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
64
 
</body>
65
 
</html>