Chinese - Simplified   Dutch   English - United States   French   German   Greek   Portuguese - Iberian   Spanish  

Home




Usenet Posting #8 - Trigeminal Software, Inc. (English)


Subject: INFO: About replica intelligence....
(Originally posted 5/13/99)
Which one is smarter?

Imagine you have four replicas that synchronize in a ring topology, meaning that Redmond synchronizes with Chicago which synchronizes with New York, which synchronizes with Philadelphia, which then synchronizes with Redmond, and so on (not that the replicas synchronize themselves, but that the people at that site perform the synchronization). Philadelphia, after the synchronization with New York, will have all the data from the other replicas, so that when you synchronize it with Redmond, Philadelphia knows that it has received the data that Redmond sent to Chicago way back at the beginning of the loop. The reason for this is that each replica keeps track of what "generation" it is up to in the other replicas in the set. In this way, Philadelphia knows that it has just received the data from Redmond (through the other replicas) and none of that data needs to be sent again. In this way, the smartest replica is the "source" of the synchronization.

Now what would happen if one day you tried to reverse the direction and synchronize Redmond to Philadelphia (say that the phones were down when Philadelphia tried to synchronize and the people in Redmond want to make sure that the data was synchronized without waiting until tomorrow)? The Redmond replica "knows" from the last time Philadelphia synchronized with it what generation it is at, but it has no way of knowing what Philadelphia has been doing since then. Redmond would then try to send all the data since that last time to Philadelphia, thinking that poor Philadelphia hadn't received any data since then. There is no danger to data integrity in this (since the Jet Engine will disregard the "older" records in Redmond in favor of the newer ones if any changes have been made, and it will know to delete the record if it is in the MSysTombstones table), but it can lead to a much longer phone connection between the two sites.

This is always an important point to keep in mind with replication, and why I usually like to design all of my synchronization functions in a way that lets me dynamically decide which one is "smarter" so I can always minimize the time needed for a synchronization in both local and long-distance situations.

Back to Usenet Musings


Problems with this site? Please contact the webmaster@trigeminal.com
with your comments, questions, or suggestions.