. . . . "%META:TOPICPARENT{name=\"VirtGraphReplication\"}%\n\n---+ Replication Example: 2-node Bi-directional Topology\n\n%TOC%\n\n---++ Introduction\n\nThe following Guide demonstrates the Virtuoso RDF Bi-directional Graph Replication, e.g.,\n%BR%%BR%%BR%%BR%\n\n---++Prerequisites\n\n---+++Database INI Parameters\n\nSuppose there are 2 Virtuoso instances respectively with the following ini parameters values:\n\n 1. virtuoso1.ini:\n\n...\n[Database]\nDatabaseFile = virtuoso1.db\nTransactionFile = virtuoso1.trx\nErrorLogFile = virtuoso1.log\n...\n[Parameters]\nServerPort = 1111\nSchedulerInterval = 1\n...\n[HTTPServer]\nServerPort = 8891\n...\n[URIQA]\nDefaultHost = localhost:8891\n...\n[Replication]\nServerName = db1\n...\n\n 1. virtuoso2.ini:\n\n...\n[Database]\nDatabaseFile = virtuoso2.db\nTransactionFile = virtuoso2.trx\nErrorLogFile = virtuoso2.log\n...\n[Parameters]\nServerPort = 1112\nSchedulerInterval = 1\n...\n[HTTPServer]\nServerPort = 8892\n...\n[URIQA]\nDefaultHost = localhost:8892\n...\n[Replication]\nServerName = db2\n...\n\n \n\n---+++Database DSNs\n\nUse the ODBC Administrator on your Virtuoso host (e.g., on Windows, *Start* menu -> *Control Panel* -> *Administrative Tools* -> Data Sources (ODBC); on Mac OS X, /Applications/Utilities/OpenLink ODBC Administrator.app) to create a System DSN for db1 and db2 with names db1 and db2 respectively.\n\n---+++Install Conductor package\n\nOn each of the 2 Virtuoso instances install the [[http://s3.amazonaws.com/opldownload/uda/vad-packages/6.1/virtuoso/conductor_dav.vad][conductor_dav.vad]] package.\n\n\n---++Create Publication on db2\n\n 1. Go to http://localhost:8892/conductor and log in as dba\n 1. Go to Conductor -> Replication -> Transactional -> Publications\n%BR%%BR%%BR%%BR%\n 1. Click Enable RDF Publishing\n 1 As result publication with the name RDF Publication should be created\n%BR%%BR%%BR%%BR%\n 1 Click the link which is the publication name. \n 1 You will be shown the publication items page\n%BR%%BR%%BR%%BR%\n 1 Enter for Graph IRI:\n\nhttp://example.org\n\n%BR%%BR%%BR%%BR%\n 1 Click Add New\n 1 The item will be created and shown in the list of items for the currently viewed publication. \n%BR%%BR%%BR%%BR%\n\n\n---++Create subscription from db1 to db2's Publication\n\n 1 Log in at http://localhost:8891/conductor\n 1 Go to Replication -> Transactional -> Subscriptions \n%BR%%BR%%BR%%BR%\n 1 Click New Subscription\n%BR%%BR%%BR%%BR%\n 1 From the list of \"Specify new data source\" select Data Source db2\n%BR%%BR%%BR%%BR%\n 1 Enter for db2 dba user credentials\n%BR%%BR%%BR%%BR%\n 1 Click \"Add Data Source\"\n 1 As result db2 will be shown in the \"Connected Data Sources\" list. \n%BR%%BR%%BR%%BR%\n 1 Select db2 the \"Connected Data Sources\" list and click \"Publications list\"\n%BR%%BR%%BR%%BR%\n 1 As result will be shown the list of available publications for the selected data source. Select the one with name \"RDF Publication\" and click \"List Items\".\n%BR%%BR%%BR%%BR%\n 1 As result will be shown the \"Confirm subscription\" page. \n%BR%%BR%%BR%%BR%\n 1 The sync interval by default is 10 minutes. For the testing purposes, we will change it to 1 minute.\n%BR%%BR%%BR%%BR%\n 1 Click \"Subscribe\"\n 1 The subscription will be created. \n%BR%%BR%%BR%%BR%\n\n---++Create Publication on db1\n\n 1. Go to http://localhost:8891/conductor and log in as dba\n 1. Go to Conductor -> Replication -> Transactional -> Publications\n%BR%%BR%%BR%%BR%\n 1. Click Enable RDF Publishing\n 1 As result publication with the name RDF Publication should be created\n%BR%%BR%%BR%%BR%\n 1 Click the link which is the publication name. \n 1 You will be shown the publication items page\n%BR%%BR%%BR%%BR%\n 1 Enter for Graph IRI:\n\nhttp://example.org\n\n%BR%%BR%%BR%%BR%\n 1 Click Add New\n 1 The item will be created and shown in the list of items for the currently viewed publication. \n%BR%%BR%%BR%%BR%\n\n\n---++Create subscription from db2 to db1's Publication\n\n 1 Log in at http://localhost:8892/conductor\n 1 Go to Replication -> Transactional -> Subscriptions \n%BR%%BR%%BR%%BR%\n 1 Click New Subscription\n%BR%%BR%%BR%%BR%\n 1 From the list of \"Specify new data source\" select Data Source db1\n%BR%%BR%%BR%%BR%\n 1 Enter for db1 dba user credentials\n%BR%%BR%%BR%%BR%\n 1 Click \"Add Data Source\"\n%BR%%BR%%BR%%BR%\n 1 As result db1 will be shown in the \"Connected Data Sources\" list. Select it and click \"Publications list\"\n%BR%%BR%%BR%%BR%\n 1 As result will be shown the list of available publications for the selected data source. Select the one with name \"RDF Publication\" and click \"List Items\".\n%BR%%BR%%BR%%BR%\n 1 As result will be shown the \"Confirm subscription\" page. \n%BR%%BR%%BR%%BR%\n 1 The sync interval by default is 10 minutes. For the testing purposes, we will change it to 1 minute.\n%BR%%BR%%BR%%BR%\n 1 Click \"Subscribe\"\n 1 The subscription will be created. \n%BR%%BR%%BR%%BR%\n\n\n---++Insert Data into a Named Graph on the db2 Virtuoso Instance\n\n 1. Log in at http://localhost:8892/conductor\n 1 Go to Linked Data -> Quad Store Upload \n%BR%%BR%%BR%%BR%\n 1 In the shown form:\n 1 Tick the box for Resource URL and enter your resource URL, e.g.:\n\nhttp://www.openlinksw.com/dataspace/person/kidehen@openlinksw.com#this\n\n 1 Enter for Named Graph IRI:\n\nhttp://example.org\n\n%BR%%BR%%BR%%BR%\n 1 Click Upload\n 1 A successful upload will result in a shown message.\n%BR%%BR%%BR%%BR%\n 1 Check the count of the inserted triples by executing a query like the following against the SPARQL endpoint, \nhttp://localhost:8892/sparql:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n%BR%%BR%%BR%%BR%\n 1 Should return 57 as total.\n%BR%%BR%%BR%%BR%\n\n\n---++Check data on the Destination instance db1\n\n 1 To check the starting count, execute from db1's SPARQL Endpoint:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n 1 Should return 57 as total.\n%BR%%BR%%BR%%BR%\n\n---++Add new data on db2\n\n 1 Disconnect db1.\n 1 On the Host Virtuoso Instance db2 go to Conductor -> Database -> Interactive SQL enter the following statement:\n\nSPARQL INSERT INTO GRAPH \n { \n \n \n \n } ;\n\n%BR%%BR%%BR%%BR%\n 1 Click \"Execute\"\n 1 As result the triples will be inserted\n%BR%%BR%%BR%%BR%\n 1 Check the count of the destination instance graph's triples by executing the following query like against the SPARQL endpoint, \nhttp://localhost:8892/sparql:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n 1 Should return 58 as total.\n%BR%%BR%%BR%%BR%\n\n---++Check data on the Destination instance db1\n \n 1 Start instance db1\n 1 To confirm that the triple count has increased by the number of inserted triples, execute the following statement on db1's SPARQL Endpoint:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n 1 Should return 58 as total.\n%BR%%BR%%BR%%BR%\n\n---++Add new data on db1\n\n 1 Disconnect db2.\n 1 On the Host Virtuoso Instance db1 go to Conductor -> Database -> Interactive SQL enter the following statement:\n\nSPARQL INSERT INTO GRAPH \n { \n \t\n \t\n \n } ;\nSPARQL INSERT INTO GRAPH \n { \n \t\n \t\n \n } ;\n\n%BR%%BR%%BR%%BR%\n 1 Click \"Execute\"\n 1 As result the triples will be inserted\n%BR%%BR%%BR%%BR%\n 1 Check the count of the destination instance graph's triples by executing the following query like against the SPARQL endpoint, \nhttp://localhost:8891/sparql:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n 1 Should return 60 as total.\n%BR%%BR%%BR%%BR%\n\n---++Check data on the Destination instance db2\n \n 1 Start instance db2\n 1 To confirm that the triple count has increased by the number of inserted triples, execute the following statement on db2's SPARQL Endpoint:\n\nSELECT COUNT(*) \n FROM \nWHERE { ?s ?p ?o }\n\n 1 Should return 60 as total.\n%BR%%BR%%BR%%BR%\n\n---++Related\n\n * [[VirtGraphReplicationStar][Replication Example: Star Topology]]\n * [[VirtGraphReplicationChain][Replication Example: Chain Topology]]\n * [[VirtGraphReplicationPSQL][Set up RDF Replication via procedure calls]] \n * [[http://ods.openlinksw.com/wiki/ODS/VirtPubSubHub][Example of Linked Data Usage of PubSubHubbub Implementation]]\n * [[VirtRdfReplScenarios][Exploit Virtuoso's Replication Functionality Web based Solutions]]" . . . . . . . . . . . . . . . . . . . "2017-06-13T05:44:55Z" . . . . . . . "2017-06-13T05:44:55.879709"^^ . "VirtGraphReplicationBiDirectional" . . . . . "2017-06-13T05:44:55.879709"^^ . . . . . . . "VirtGraphReplicationBiDirectional" . . . . "VirtGraphReplicationBiDirectional" . . . . . . . . . . . . . . . . . . . . "2017-06-13T05:44:55Z" . . . . . "d0699e287925b92514e0bbfaaeae44a0" . . .