<docbook><section><title>VirtPubSubHub</title><title>Example of Linked Data Usage of PubSubHubbub Implementation</title>Example of Linked Data Usage of <ulink url="PubSubHubbub">PubSubHubbub</ulink> Implementation
<para>The following example demonstrates how to use Virtuoso&#39;s implementation of the <ulink url="http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html">draft PubSubHubBub Protocol</ulink> to handle Linked Data.</para>
<para>We extend the idea of tracking a feed to track Linked Data resource URIs.</para>
<para>To reveal the hub to subscribers, we propose Linked Data resources return the following HTTP header -- </para>
<programlisting>Link: &lt;http://cname/psh/subscribe.vsp&gt;; rel=&quot;hub&quot;
</programlisting><para>-- or include the following in an HTML &lt;head&amp;/lt; (or similar) element -- </para>
<programlisting>&lt;link rel=&quot;hub&quot; uri=&quot;http://cname/psh/subscribe.vsp&quot;&gt;
</programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Endpoints</bridgehead>
<para>The PubSubHubBub package installed on a system would define the following endpoints :</para>

<table><title /><tgroup><thead /><tbody>
<row><entry> http://cname/psh/subscribe.vsp  </entry><entry> subscription endpoint  </entry></row>
<row><entry> http://cname/psh/publish.vsp  </entry><entry> publishing endpoint  </entry></row>
<row><entry> http://cname/psh/  </entry><entry> index to UI of the simple test clients  </entry></row>
<row><entry> http://cname/psh/callback.vsp  </entry><entry> default built-in client callback endpoint  </entry></row>
</tbody></tgroup></table>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example of use of the built-in demo client</bridgehead>
<orderedlist spacing="compact"><listitem>As a very first step we use a simple client to subscribe to a SIOC document containing data for an ODS-Weblog.
 In our tests we subscribe to the Linked Data document &lt;<ulink url="http://ec2-174-129-156-25.compute-1.amazonaws.com/dataspace/demo/weblog/demo%27s%20Weblog/sioc.rdf">http://ec2-174-129-156-25.compute-1.amazonaws.com/dataspace/demo/weblog/demo%27s%20Weblog/sioc.rdf</ulink>&gt;.
<figure><graphic fileref="VirtPubSubHub/step1.png" /></figure> </listitem>
<listitem>The Weblog post is as follows: <figure><graphic fileref="VirtPubSubHub/step2.png" /></figure> </listitem>
<listitem>During the subscription process, the client will get the initial state of the SIOC feed, so we can execute the following query to see all post titles: <figure><graphic fileref="VirtPubSubHub/step3.png" /></figure> </listitem>
<listitem>In the query result is the title of the existing Weblog post: <figure><graphic fileref="VirtPubSubHub/step4.png" /></figure> </listitem>
<listitem>Next we add a new blog post to force a change to the SIOC data: <figure><graphic fileref="VirtPubSubHub/step5.png" /></figure> </listitem>
<listitem>Using a simple publishing UI, we notify the Hub the data has changed: <figure><graphic fileref="VirtPubSubHub/step6.png" /></figure> </listitem>
<listitem>The Hub takes the delta and notifies the subscribers: <figure><graphic fileref="VirtPubSubHub/step7.png" /></figure> </listitem>
<listitem>Again we execute the same SPARQL query as in the earlier step, and now we can see the data contains the new blog post title: <figure><graphic fileref="VirtPubSubHub/step8.png" /></figure></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtODSPubSubHub">Setting up PubSubHub in ODS</ulink> </listitem>
<listitem><ulink url="VirtFeedPubSubHub">Feed subscription via PubSubHub protocol Example</ulink> </listitem>
<listitem><ulink url="VirtPubSubHubACL">Setting Up PubSubHub to use WebID Protocol or IP based control lists</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtGraphReplication">Virtuoso Graph Replication Guide</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSPARQLSSL">Creating and Using a SPARQL-SSL based Endpoint</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAuthServerUI">Set WebID Protocol ACLs using the Virtuoso Authentication Server UI</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAuthFOAFSSLACL">WebID Protocol ACLs Tutorial</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtOAuthSPARQL">SPARQL OAuth Tutorial</ulink> </listitem>
<listitem><ulink url="VirtODSFOAFSSL">WebID Protocol Support in OpenLink Data Spaces</ulink> </listitem>
<listitem><ulink url="ODSPkiSetup">Guide to Setting up a X.509 certificate issuer and HTTPS listener and Generating ODS user certificates</ulink> </listitem>
<listitem><ulink url="OdsKeyImport">CA Keys Import using Conductor</ulink> </listitem>
<listitem><ulink url="ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID Guide</ulink> </listitem>
<listitem><ulink url="ODSBriefcaseFOAFSSLShareFile">ODS Briefcase WebID Protocol Share File Guide</ulink> </listitem>
<listitem><ulink url="http://esw.w3.org/topic/foaf+ssl">WebID Protocol Specification</ulink> </listitem>
<listitem><ulink url="https://foaf.me/simpleLogin.php">Test WebID Protocol Certificate page</ulink> </listitem>
<listitem><ulink url="http://test.foafssl.org/cert/">WebID Protocol Certificate Generation page</ulink> </listitem>
<listitem><ulink url="https://demo.openlinksw.com/sparql-ssl">Virtuoso Demo SPARQL-SSL Endpoint</ulink></listitem>
</itemizedlist></section></docbook>