Not logged in : Login

About: ODSPubSubHubBubDownstream     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • ODSPubSubHubBubDownstream
maker
Title
  • ODSPubSubHubBubDownstream
isDescribedUsing
has creator
content
  • %TOC% ---++ODS PubSubHubBub Downstream API ---+++What The API is used in the ODS Application Downstream UI part and can be called as: <verbatim> PSH.DBA.ods_cli_subscribe ( in inst_id int, in hub varchar, in mode varchar, in topic varchar ) </verbatim> ---++++Parameters The API entry parameters are as follows: * <code>inst_id</code>: the ODS instance Id integer * <code>hub</code>: the hub url * <code>mode</code>: 'subscribe' or 'unsubscribe' * <code>topic</code>: the feed URL to subscribe ---+++Why The API should be called in the ODS Applications downstream UIs in order to allow push subscriptions. For ex. it is used in ODS Weblog in downstream ui. ---+++How When subscribed, a record into following table will be added so the UI can show them and to be possible to unsubscribe : <verbatim> create table "DB"."DBA"."WA_PSH_SUBSCRIPTIONS" ( "PS_INST_ID" INTEGER, -- ODS instance Id "PS_URL" VARCHAR, -- the feed Url "PS_TS" TIMESTAMP, -- modification date/time "PS_HUB" VARCHAR, -- the Hub endpoint Url PRIMARY KEY ("PS_INST_ID", "PS_URL") ); </verbatim> Also the ODS define it's own callback: <verbatim> </psh/odscb.vsp?inst=<instanceid> </verbatim> This should not be used separately as subscription API already use it. Since every application defines own tables to import data from feeds every application should have a stored procedure in following pattern : <verbatim> PSH.DBA.ods_<application type>_psh_cbk (feed_url, content, instance_id) </verbatim> &lt;application type&gt;is one of : * weblog, * calendar, * mail, etc. same convention used in the ods rdf views and sioc data. The above will be called when Hub pushes the feed changes, thus every application should call inside whatever logic it has to make new record. ---+++Code <verbatim> create procedure PSH.DBA.ods_cli_subscribe ( in inst_id int, in hub varchar, in mode varchar, in topic varchar ) { declare token, subsu, callback, head, ret varchar; if (__proc_exists ('PSH.DBA.cli_subscribe') is null) signal ('42000', 'The PubSubHub package is not installed'); if (hub is not null) { token := md5 (uuid ()); callback := sprintf ('http://%s/psh/odscb.vsp?inst=%d', WA_GET_HOST (), inst_id); PSH..cli_subscribe ('dba', mode, topic, 'feed', null, token); subsu := sprintf ('%s?hub.callback=%U&hub.mode=%U&hub.topic=%U&hub.verify=sync&hub.verify_token=%U', hub, callback, mode, topic, token); commit work; ret := http_get (subsu, head); if (head[0] not like 'HTTP/1._ 20_ %') { signal ('39000', 'The Hub rejects subscription request, please verify you are allowed to use it.'); } } if (mode = 'subscribe') insert replacing DB.DBA.WA_PSH_SUBSCRIPTIONS (PS_INST_ID, PS_HUB, PS_URL) values (inst_id, hub, topic); else delete from DB.DBA.WA_PSH_SUBSCRIPTIONS where PS_INST_ID = inst_id and PS_URL = topic; commit work; } ; </verbatim> ---++Related
id
  • 54852c91b363d938a77aa998115affba
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • ODSPubSubHubBubDownstream
links to
atom:source
atom:author
atom:published
  • 2017-06-13T06:03:40Z
atom:updated
  • 2017-06-13T06:03:40Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git150 as of Jan 20 2025


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3332 as of Feb 27 2025, on Linux (x86_64-generic-linux-glibc212), Single-Server Edition (15 GB total memory, 2 GB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software