Getting Started with Replicated Berkeley DB Applications

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html

Oracle, Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: http://forums.oracle.com/forums/forum.jspa?forumID=271

4/12/2010


Table of Contents

Preface
Conventions Used in this Book
For More Information
1. Introduction
Overview
Replication Environments
Replication Databases
Communications Layer
Selecting a Master
Replication Benefits
The Replication APIs
Replication Manager Overview
Replication Base API Overview
Holding Elections
Influencing Elections
Winning Elections
Switching Masters
Permanent Message Handling
When Not to Manage Permanent Messages
Managing Permanent Messages
Implementing Permanent Message Handling
2. Transactional Application
Application Overview
Program Listing
Class: RepConfigInfo
Class: excxx_repquote_gsg_simple
Function: usage()
Function: main()
Method: SimpleTxn::init()
Method: SimpleTxn::doloop()
Method: SimpleTxn::print_stocks()
3. The DB Replication Manager
Starting and Stopping Replication
Managing Election Policies
Selecting the Number of Threads
Adding the Replication Manager to RepMgr
Permanent Message Handling
Identifying Permanent Message Policies
Setting the Permanent Message Timeout
Adding a Permanent Message Policy to RepMgrGSG
Managing Election Times
Managing Election Timeouts
Managing Election Retry Times
Managing Connection Retries
Managing Heartbeats
4. Replica versus Master Processes
Determining State
Processing Loop
Example Processing Loop
Running It
5. Additional Features
Delayed Synchronization
Managing Blocking Operations
Stop Auto-Initialization
Client to Client Transfer
Identifying Peers
Bulk Transfers