Applications that use the distributed primary fragments model include distributed tables that contain both primary and replicated data. The Replication Server at each site distributes modifications made to local primary data to other sites and applies modifications received from other sites to the data that is replicated locally.
Figure 1-4 diagrams the flow of data for distributed primary fragments.
Figure 1-4: Distributed primary fragments model
The tasks needed to set up a distributed primary fragment system are similar to those for creating a basic primary copy system, with the following exceptions and additions:
Your application should avoid or handle cases where multiple sites update the same data at the same time. Sybase recommends that each fragment have a single “owner” site.
Databases can be both primary and replicate. Make sure that tables with the same structure exist at both primary and replicate sites.
Create routes from each primary site to all sites that subscribe to its data.
Create a replication definition at any site where there is primary data, even if it is a “remote” site.
Create subscriptions at each site for the replication definitions at the other sites. If n is the number of sites, create n-1 subscriptions for each replication definition.