Implementing bi-directional data replication
My supervisor wants a system developed where there is an online interface with the database at our data center and a local interface that does almost everything the online one does with a local database.
The question then comes in with replication when products/items are edited/updated in either place they must replicate to the other location, however, what if items are both edited on the same day? I suppose real-time replication can happen but what would happen if there is a severance of connection (Internet downtime) so updates cannot be done so often. What do large corporations do? It is hard to conceive and build this when one set of data is not a slave to another?
There are some companies that offer bidirectional data replication
. While they may work for your implementation, I would be careful. There are several potential obstacles toward successfully implementing this technology:
- Opportunities for data inconsistency -- are there periods when the data is being merged together where it is corrupt? What happens if the system goes down during a reconciliation?
- Performance impact -- what will the impact be to my production systems?
issues -- how much data can it replicate? What if I need to send more than that?
- Does the tool replicate the kind of data you want it to -- some only replicate file system data, not databases
- What happens when two people modify the same record at the same time?
- Are there periods when I'd get different replies to the same query, depending on my location?
- Cost -- this is a fairly specialized need and you'll likely wind up paying more for it than you would for a more traditional technology.
While it is certainly possible that some product on the market has conquered these obstacles, I'd be very careful in my evaluation of them.
I believe that a better and simpler solution would be to have networked access to a single instance of a centralized database and send all updates to that instance. Then, replicate the database using more conventional and mature replication tools
to the remote site.
I think you'll be happier with that solution in the long run.
Evan L. Marcus
Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our
This was first published in February 2004