An important part of incorporating replication into your application is planning the appropriate topology for synchronizing data and design changes. A replication topology defines the communication that exists among members of the replica set, along with the logic that determines how synchronization occurs among the various members of the replica set.
If you’re using Microsoft Replication Manager to perform replication, all members ultimately update one another by using the topology that you create when you graphically link the replicas in the Replication Manager window. When you create a replication topology with Replication Manager, the latency in the chaining can be important. If A and B synchronize, and then B and C synchronize, and then A and B synchronize again, the time lag between synchronizations can be important. For example, if A and B synchronize, and then A and C synchronize, and then B and C synchronize, A is provided with the current information sooner. The programmer and database administrator must work together to determine the order in which updates are dispersed throughout the database.
If you’re using only DAO programming to implement replication, your code must ensure that all members of the replica set are synchronized. This might involve creating a custom replication schedule and synchronizing each member according to the schedule. One way to do this is by storing a list of all replica set members in a table or initialization file.
If you are creating partial replicas, either with the Partial Replica Wizard or through DAO programming, you can only synchronize partial replicas with other replicas that contain all the replicated data, such as the Design Master or another full replica. You cannot synchronize a partially replicated database with another partial replica since each partial replica contains only a subset of the replicated data.
The following diagram shows alternative topologies that can be created:
Figure 7.2 Replica set topologies
Other types of topologies exist. As the hybrid topology in the diagram suggests, there is an almost limitless variety of combinations and configurations. The type of topology you pick usually depends on your application; however, the star topology is usually the best for most applications.