<docbook><section><title>VirtGraphReplication</title><title>Virtuoso Graph Replication Guide</title>Virtuoso Graph Replication Guide
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Introduction</bridgehead>
<para>The following guide demonstrates how to replicate graphs from one Virtuoso instance to (an)other Virtuoso instance(s), using the RDF Replication Feature.</para>
<para>Terms used in this guide: </para>
<itemizedlist mark="bullet" spacing="compact"><listitem><emphasis>Host Virtuoso Instance</emphasis>, aka the publisher: the instance where we will insert RDF data into a Named Graph; then create a publication of this graph.
</listitem>
<listitem><emphasis>Destination Virtuoso Instance</emphasis>, aka the subscriber: the instance which will subscribe to the publication from the Host Virtuoso Instance.</listitem>
</itemizedlist><para>The basic outline: </para>
<orderedlist spacing="compact"><listitem>First, use the Virtuoso Conductor on a Host Virtuoso Instance to publish a named graph.
</listitem>
<listitem>Then, use the Virtuoso Conductor on a Destination Virtuoso Instance to subscribe to deltas from the published graph.
</listitem>
<listitem>Finally, see how a change in the publisher&#39;s graph will appear in the subscriber&#39;s graph.</listitem>
</orderedlist><emphasis>Note:</emphasis> 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 &quot;ServerName&quot; 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.<bridgehead class="http://www.w3.org/1999/xhtml:h2">Replication Topologies</bridgehead>
 Typical replication topologies are Chains, Stars, and Bi-directional.
 These (and many others) can be achieved with Virtuoso, by setting each relevant node to &quot;Publish&quot; and/or &quot;Subscribe&quot;.<bridgehead class="http://www.w3.org/1999/xhtml:h3">Star Replication Topology</bridgehead>
<para>In a Star, there is one Publisher, and many Subscribers.</para>
<figure><graphic fileref="VirtGraphReplication/topo-star.png" /></figure><para>To set up a Star Replication:</para>
<orderedlist spacing="compact"><listitem>Configure Instance #1 to Publish.
</listitem>
<listitem>Configure Instance #2 to Subscribe to #1.
</listitem>
<listitem>Configure Instance #3 to Subscribe to #1.
</listitem>
<listitem>Repeat as necessary.</listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Example</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtGraphReplicationStar">Star Replication Topology Example</ulink></listitem>
</itemizedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Chain Replication Topology</bridgehead>
<para>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.</para>
<figure><graphic fileref="VirtGraphReplication/topo-chain.png" /></figure><para>To set up a Chain Replication:</para>
<orderedlist spacing="compact"><listitem>Configure Instance #1 to Publish.
</listitem>
<listitem>Configure Instance #2 to Subscribe to #1.
</listitem>
<listitem>Configure Instance #2 to Publish.
</listitem>
<listitem>Configure Instance #3 to Subscribe to #2.
</listitem>
<listitem>Configure Instance #3 to Publish.
</listitem>
<listitem>Repeat as necessary.</listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h4">Examples</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtGraphReplicationChain">Chain Replication Topology Example</ulink> </listitem>
<listitem><ulink url="VirtGraphReplicationPSQL">Chain Replication Topology Example using stored procedure calls</ulink></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3">Bi-directional Replication Topology</bridgehead>
<para>In a bi-directional topology, there are 2 instances, each of which is both a Publisher and a Subscriber.</para>
<figure><graphic fileref="VirtGraphReplication/topo-bidirectional.png" /></figure><para>To set up a Bi-directional Replication:</para>
<orderedlist spacing="compact"><listitem>Configure Instance #2 to Publish.
</listitem>
<listitem>Configure Instance #1 to Subscribe to #2.
</listitem>
<listitem>Configure Instance #1 to Publish.
</listitem>
<listitem>Configure Instance #2 to Subscribe to #1.
</listitem>
<listitem>Repeat as necessary.</listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4">Example</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtGraphReplicationBiDirectional">Bi-directional Replication Topology Example</ulink></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://ods.openlinksw.com/wiki/ODS/VirtPubSubHub">Example of Linked Data Usage of PubSubHubbub Implementation</ulink> </listitem>
<listitem><ulink url="VirtRdfReplScenarios">Exploit Virtuoso&#39;s Replication Functionality Web based Solutions</ulink> </listitem>
<listitem><ulink url="VirtClusteringDiagrams">Diagrams of Virtuoso Shared-Nothing Elastic Clustering</ulink></listitem>
</itemizedlist></section></docbook>