Replication In Distributed Real Time Database System

Introduction

A database system is used to provide efficient data storage facilities for the application which requires data for processing. A database management system provides access to users with an interface of data stored on database for storage and retrieval. The management system takes care of data accessing concurrently with maintaining the integrity of the data. It stores the data over a few more servers to overcome the problem of corrupted data and power failure. The biggest problem of a database system is scalability and performance. When the size of the database becomes bigger, then the performance of the database starts decreasing and at some point performance becomes minimal. Replication is the most used technique to increase the performance of a database system by keeping the database at different servers. Workload of servers can be minimized by maintaining the database at different servers.

Replication Methods

Some of the replication methods and details are as follows,

Snapshot Replication

Snapshot replication is a technique in which original copy of data is obtained from one database and moved to database on same server or different server. Snapshot replication technique updates the data periodically.

Transactional Replication

In transactional scheme, replication agent exists between the main data item and its replica. Replication agent monitors the changes in database server and updates the data available on other servers.

Transaction based replication

Transaction based replication technique collects all the transactions at any data sites in the system before executing or committing at any replica and sends the transaction to another replica.

Merge Replication

Merge replication technique is used when databases are not online all the time. In some cases, databases are not online all the time but the operation performed in offline mode changes occurs in individual database system but when they are connected over the internet to each other a merge replication agent checks both the location & update the information accordingly.

Eager replication

In eager replication technique updates are transferred to other replicas in a way that user does not get a notification of complete replication until sufficient copies of replica have been updated. All the replica in the Eager replication remains consistent.

Lazy Replication

Lazy replication maintains the other replica in the communication system when the transaction has committed on one data item. In lazy replication, the transaction completion time decreases but consistency of data is not maintained.

Primary copy replication

In this technique, all the clients communicate with the primary server. If a client wants to make an update on data items, then it communicates with the primary server & only the primary server can propagate update to all other replicas. 

Update Everywhere Replication

In update everywhere replication, there is no concept of primary replica. Each replica of a data item in the system is equally preferred. In this replication method, updating a  transaction can be executed on any replica instead of only one replica in case of primary copy replication. The node which is containing the update transaction should have a mechanism to propagate the Update transaction to every replica in the communication system to maintain the consistency of database system.

Conclusion

Data replication is an easy solution when data is highly distributed and we must take care about database system performance & availability of data. Each replication techniques has its own advantages and disadvantages. The primary copy technique is good for maintaining redundancy. At some point the performance of primary copy technique minimizes because update is done in primary database. Update everywhere is the technique when we want to decrease the load of a site within the system. Update everywhere replication technique requires the synchronization and coordination mechanism to maintain the consistency of the database.