Berkeley DB Reference Guide:
Berkeley DB Replication

PrevRefNext

Replication FAQ

  1. Does Berkeley DB provide support for forwarding write queries from clients to masters?

    No, it does not. The Berkeley DB RPC server code could be modified to support this functionality, but in general this protocol is left entirely to the application. Note, there is no reason not to use the communications channels the application establishes for replication support to forward database update messages to the master, Berkeley DB does not require that those channels be used exclusively for replication messages.

  2. Can I use replication to partition my environment across multiple sites?

    No, this is not possible. All replicated databases must be equally shared by all environments in the replication group.

  3. How can I distinguish Berkeley DB messages from application messages?

    There is no way to distinguish Berkeley DB messages from application-specific messages, nor does Berkeley DB offer any way to wrap application messages inside of Berkeley DB messages. Distributed applications exchanging their own messages should either enclose Berkeley DB messages in their own wrappers, or use separate network connections to send and receive Berkeley DB messages. The one exception to this rule is connection information for new sites; Berkeley DB offers a simple method for sites joining replication groups to send connection information to the other database environments in the group (see Connecting to a new site for more information).

  4. How should I build my send function?

    This depends on the specifics of the application. One common way is to write the rec and control arguments' sizes and data to a socket connected to each remote site. On a fast, local area net, the simplest method is likely to be construct broadcast messages. Each Berkeley DB message would be encapsulated inside an application specific message, with header information specifying the intended recipient(s) for the message. This will likely require a global numbering scheme, however, as the Berkeley DB library has to be able to send specific log records to clients apart from the general broadcast of new log records intended for all members of a replication group.

  5. Can I use replication to replicate just the database environment's log files?

    Yes. If the DB_REP_LOGSONLY flag is specified to DB_ENV->rep_start, the client site acts as a repository for logfiles (see Log file only clients for more information).


PrevRefNext

Copyright Sleepycat Software