Empress Markets

News & Events


Press Releases

Product Profile

Success Stories

Technical News

White Papers

Join Mailing List

For More Info


      Empress Technical News -  October 2010

        Empress Continuous Mode Replication
    Efficiently Replicate Data with Empress Embedded Database


    Nowadays, data seems to be everywhere. But is your data there when you need it most? Users have been asking for immediate access to accurate and reliable data anytime and anyplace. Database replication is often used to satisfy this need.

    Database replication is the act of copying data between different databases. In addition to copying, database replication encompasses analysis, administration and monitoring for data consistency across multiple databases. Using replication, databases become distributed and users can take advantage of that to increase the availability and performance of their distributed databases.

    The benefits of using database replication are many:


    1.     Higher data availability:
              An application can access a local database instead of a remote one, which may be occasionally inaccessible.

    2.     Reduce network traffic with a local database
              Access to a local database reduces network traffic while off loading database lock contention.

    3.     Distribute system load to multiple locations:
            Queries can be performed on databases at multiple locations, so that the query load on a single location is reduced.

    4.     Recovery from system failure:

              In the case of system failure at one location, a backup of original database can reside at several different sites.

    5.     Provide database copies automatically in a network:

              Data can be automatically distributed to remote sites in a network, instead of manually or transferring physical media

    6.     Distribute partial data as needed
              If users need to access part of the data in the database, partial replication could put different data in distributed databases.


    Empress Replication
    Empress Replication
    creates a set of database tables as replicates (copies) of a master table and keeps the set synchronized to the master table. Figure 1 illustrates the components of Empress Replication architecture with the set of tables in separate databases in different locations

    A Master Table is a database table that serves as a source of data, which may be updated. A Table is a read-only database table that gets a copy of data that is in a Master Table. All data updates are made to a Master Table and are later propagated to Replicate Tables.

    In Figure 1, data from Host A is replicated to Hosts B, C and D and synchronized. The origin of data is called Replication Master Table (RMT) and the copy is called Replication Replicate Table (RRT).

    Figure 1: Empress Replication Architecture


    A table can be a Master or a Replicate Table, and it can act as a Replication Master Table (RMT) or as a Replication Replicate Table (RRT). For example, the Replicate Table in the host C in 1 acts as the RRT during the request from Host C, but acts as the RMT for the request from Host D.

    Replication Synchronization updates an RRT with changed data from its RMT. The Synchronization requests are made by an Empress Synchronization Client (emprepsync). The Replication Master Server listens to synchronization requests from its clients and provides data from an RMT. In Figure 1 two Replication Master Servers propagate data to all the Hosts: the Server in Host A and the Server in Host C.

    A synchronization request can be made manually, or can be automated. The RRT side does not have to be always connected to a Replication Master Server, but only for duration of synchronization.

    Empress replication is an asynchronous replication. Hence, there will always be some lag between RMT and its RRT as defined by a   frequency of synchronization. All Replicate Tables have the same structure as the Master Table.

    Subset Replication is a special feature of Empress Replication. A replicate table is normally created as a replica of an entire RMT, but it may also be created as a subset of an RMT by specifying a conditional expression using an SQL WHERE Clause. This way Empress supports replication of partial database data as horizontal partitioning of the original database.


    Empress Standard Mode Replication
    Empress replication is asynchronous data replication. In other words there is always a lag between the database transaction committing insertions, updates or deletions in the Master table and the effects of that transaction on replicate tables.

    Every time the synchronization process is invoked by the utility emprepsync in 2, it takes time to spawn the process, initialize Empress database internal structures, connect to the proper Replication Master Server, open communication, etc. All those operations are necessary for synchronization to take place but create an overhead when the synchronization process has to be repeated many times as described in Figure 2.


    Figure 2: Empress Standard Mode Replication


    Empress Continuous Mode Replication
    Empress Embedded Database provides another Replication Client utility called Figure 3, to minimize the effect of lag. emprepsyncd is the Replication Synchronization daemon, which synchronizes the data of Replicate Table, with the data of their corresponding replication Master Table continuously until it is stopped by  the ‘stop’  instruction.

    When the connection with Replication Master Server is successfully established, emprepsyncd will keep the connection open and continue to use the same connection to  synchronize data.

    Figure 3 below shows Empress Replication in continuous mode using



    Figure 3: Empress Continuous Mode Replication


    Examples of Empress Replication
    The following Empress commands demonstrate the ability to start and stop Replication synchronization clients in a continuous and non-continuous mode.


    Non-Continuous Mode Replication
    emprepsync [option] RDB RTAB [RTAB...]

    where option is:
            force synchronization
            display progress of synchronization process


    Continuous Mode Replication
                                              [-v] RDB RTAB { INTERVAL | stop }

                              progress of synchronization process

    RDB                        Replicate database name
                          Replicate table name
            interval in seconds



    In order to continuously replicate data in the database repairs from a master table personnel every 0.3 seconds, one would invoke the Empress utility in the following way:

    emprepsyncd repairs personnel 0.3



    Instead of Summary

    Empress Software brings high performance Empress Continuous Mode Replication Client to satisfy user needs where the speed of data synchronization between master data and replicas is of the utmost importance.


    Empress Software Inc.


GSA Contracts
Privacy Policy 
Contact US

Empress RDBMS
Empress Servers
Empress API
Free Trial 
Empress iPad Apps

Mobile Apps Development
Technical Support

Training Courses
Empress Extreme  

Business Alliances
Partner Programs  
GSA Program
Distributors Program

Empress Markets
News and Events
Press releases
Technical News
Success Stories

        USA: 301-220-1919                 Canada & International:       905-513-8888         
Copyright © 2014           Empress Software Inc.            Join Empress Mailing List