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.
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 ). 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.
The synopsis for both programs is as follows:
where “ex_rep_xxx” is either “ex_rep_mgr” or “ex_rep_base”. The only difference is that:
specifying -M or -C is optional for ex_rep_mgr, but one of these options must be specified for ex_rep_base.
The options apply to either version of the program except where noted. They are as follows:
-h
Specify a home directory for the database environment.
Listen on local host “host” at port “port” for incoming connections.
-M
Configure this process as a master.
-C
Configure this process as a client.
-r
Identifies the helper site used for joining the group.
-R
Identifies a remote peer to be used for joining the group. This peer is used for syncing purposes. See Client-to-client synchronization for more information.
-a
-b
Indicates that bulk transfer should be used. See for more information.
-n
Specify the total number of sites in the replication group (ex_rep_base only).
-p
Set the election priority. See Elections for more information.
-v
Indicates that additional informational and debugging output should be enabled.
A typical ex_rep_mgr session begins with a command such as the following, to start a master:
and several clients: