---+Virtuoso Graph Replication Guide
%TOC%
---++Introduction
The following guide demonstrates how to replicate graphs from one Virtuoso instance to (an)other Virtuoso instance(s), using the RDF Replication Feature.
Terms used in this guide:
* Host Virtuoso Instance, aka the publisher: the instance where we will insert RDF data into a Named Graph; then create a publication of this graph.
* Destination Virtuoso Instance, aka the subscriber: the instance which will subscribe to the publication from the Host Virtuoso Instance.
The basic outline:
1 First, use the Virtuoso Conductor on a Host Virtuoso Instance to publish a named graph.
1 Then, use the Virtuoso Conductor on a Destination Virtuoso Instance to subscribe to deltas from the published graph.
1 Finally, see how a change in the publisher's graph will appear in the subscriber's graph.
Note: If using a Virtuoso clustered server configuration and data is being loaded on multiple nodes of the cluster ie not just on the master node, the Virtuoso replication "ServerName" in the Virtuoso configuration files must be the same across all publisher nodes of the cluster and subscriptions only need to be made to the master node of the publishing cluster where the replication logs are maintained.
---++Replication Topologies
Typical replication topologies are Chains, Stars, and Bi-directional. These (and many others) can be achieved with Virtuoso, by setting each relevant node to "Publish" and/or "Subscribe".
---+++Star Replication Topology
In a Star, there is one Publisher, and many Subscribers.
%BR%%BR%%BR%%BR%
To set up a Star Replication:
1 Configure Instance #1 to Publish.
1 Configure Instance #2 to Subscribe to #1.
1 Configure Instance #3 to Subscribe to #1.
1 Repeat as necessary.
---++++Example
* [[VirtGraphReplicationStar][Star Replication Topology Example]]
---+++Chain Replication Topology
In a Chain, there is one original Publisher, to which there is only one Subscriber. That Subscriber may also serve as a Publisher, again with only one Subscriber. The chain ends with a Subscriber which does not Publish.
%BR%%BR%%BR%%BR%
To set up a Chain Replication:
1 Configure Instance #1 to Publish.
1 Configure Instance #2 to Subscribe to #1.
1 Configure Instance #2 to Publish.
1 Configure Instance #3 to Subscribe to #2.
1 Configure Instance #3 to Publish.
1 Repeat as necessary.
---++++Examples
* [[VirtGraphReplicationChain][Chain Replication Topology Example]]
* [[VirtGraphReplicationPSQL][Chain Replication Topology Example using stored procedure calls]]
---+++Bi-directional Replication Topology
In a bi-directional topology, there are 2 instances, each of which is both a Publisher and a Subscriber.
%BR%%BR%%BR%%BR%
To set up a Bi-directional Replication:
1 Configure Instance #2 to Publish.
1 Configure Instance #1 to Subscribe to #2.
1 Configure Instance #1 to Publish.
1 Configure Instance #2 to Subscribe to #1.
1 Repeat as necessary.
---++++Example
* [[VirtGraphReplicationBiDirectional][Bi-directional Replication Topology Example]]
---++Related
* [[http://ods.openlinksw.com/wiki/ODS/VirtPubSubHub][Example of Linked Data Usage of PubSubHubbub Implementation]]
* [[VirtRdfReplScenarios][Exploit Virtuoso's Replication Functionality Web based Solutions]]
* [[VirtClusteringDiagrams][Diagrams of Virtuoso Shared-Nothing Elastic Clustering]]