The Versant Async Server (V/Async) add-on module for Versant Database Engine supports both master-slave and peer-to-peer asynchronous replication between multiple object servers. This can be used to replicate data to a distributed recovery site or to replicate data between multiple local object servers for increased performance and reliability.
Overview
In many applications, there is a need to replicate data, to improve availability, to improve performance by geographically co-locating databases with the applications that access the databases, isolate decision support systems from online production systems, and to help in recovery from failures using warm-standby systems.
Why Asynchronous Replication?
Replication can be achieved in two ways: synchronous, where consistency of data between replicas is strictly maintained, and asynchronous, where data consistency is loosely maintained. Synchronous replication increases the duration of application transactions and cannot be completed until all the replicas have been brought to the same state. Asynchronous replication does not prolong the transaction much, as it updates the replicas in a separate transaction from the application transaction. Therefore, asynchronous replication is most suitable where certain latency before achieving consistency among replicas is permissible.
Default and Advanced Mode
V/Async provides two modes of replication for Versant Database Engine, Default and Advanced.
The Default mode uses Versant APIs for replication and supports only Master-Slave configuration. This mode is suitable for LAN and WAN based replication where network is fast and reliable.
The Advanced mode provides snapshot-based replication and supports peer-to-peer and Master-Slave configurations. This mode is suitable for WAN based replication where the network is slow and unreliable. The Advanced mode provides customizable messaging, transport mechanism and conflict detection and resolution.
Core Features
V/Async offers the following core features available in both the Default as well as Advanced mode:
Flexible Configuration
The architecture allows for various Master-Slave configurations such as:
- Master-Slave configuration with one master primary site and multiple fragmented slave replica sites
- Master-Slave configuration with multiple primary sites and one consolidated replica site
Programming Language Support
Objects created using any of the Versant language interfaces can be replicated to and from Versant databases.
Logical Partitioning
Databases can be partitioned logically for replication. The partitioning is based on a class, a set of classes, a set of objects, or a predicated extent of a class that is specified using a query.
Differential Update
Only objects that have been created, modified or deleted are replicated. The Versant Object Database event notification is used to register for these events. A so called 'event daemon' in the database server at each site monitors changes and creates the replication requests.
Batch Replication
Objects that are modified in a batch of user transactions are replicated in a single replication transaction. Irrespective of whether a replication is transactional or batch based only the part of the transaction that is of interest to that site is applied at the receiving site.
Event or API-Based Replication
Automatic and explicit replication methods are available. The automatic mode uses Versant event notification to monitor updates to database objects, and automatically creates replication requests. The set of objects to be monitored can be specified in various ways.
Applications using the Java or the C++ API can also create replication requests explicitly.
The second method, therefore, has more control over specifying the set of objects to be replicated and the timing of replication.
Recovery from Failures
All the objects representing meta data used by Versant Asynchronous Replication are stored persistently to facilitate recovery and synchronization after network or machine failures.
Administrative Tools
The product includes a set of command line utilities to help administer the replication sites and to check and fix corrupted meta data.
Logging
Logging facility is provided to report errors and status of replication. To preserve application events, events are raised irrespective of whether the updates occurred due to replication from other sites or due to an application. However, it is guaranteed that changes are replicated only once to all the target sites.
Additional Features Provided with Advanced Replication
Peer-to-Peer Configuration
Besides supporting Master-Slave configurations, VOD advanced replication supports N-way peer-to-peer or symmetric replication with mechanisms for update conflict detection and resolution.
Conflict Detection and Resolution
You can avoid update conflicts by allowing changes to objects to occur at a single designated site. In applications where this restriction cannot be supported, Versant Asynchronous Replication allows update conflicts to be detected and resolved. In order to detect update conflicts, an administrator can assign ownership of database objects to primary sites. Updates made to objects at non-primary sites are propagated to the primary site for replication. The primary site is then a single point where update conflicts can be detected and resolved regardless of where the update actually occurred. The target sites receive their updates only from the owner site. Versant Asynchronous Replication provides a default mechanism for detecting conflicts. You can optionally customize the detection and resolution of conflicts by implementing the interfaces specified for conflict detection and resolution.
Conflict Prevention and Avoidance
Mechanisms are provided for preventing conflicts by synchronously replicating to the owner sites, from where replication is carried out asynchronously to the other sites. Conflict avoidance is supported by enabling the administrator to assign ownership of database objects to their primary sites, and avoiding updates to those objects at the other sites.
Customizable Transport
Interfaces are provided to customize the transport mechanism used. Default implementation uses Java sockets. Versant connections are not used to communicate from one site to another. The default supports replication over a LAN as well as a WAN.
Customizable Message Format
Message formats can be customized to support replication of parts of database objects instead of replicating objects (Java-serialized) in their entirety as default.
Explicit Replication
In Explicit mode, replication operates in two states, active and passive. In active state, replication requests are only consolidated without actually replicating the data. Whenever the state is changed from active to passive, objects specified by the consolidated requests are replicated first and then processing of replication requests is started.