sparql

sparql

SPARQL + pubsubhubbub = sparqlPuSH

There have been lots of discussion recently regarding dynamics and notification in the Semantic Web realm, including various vocabularies for describing changes and approaches for notifying them - as Leigh recently blogged about it.
Last month, while visiting Kno.e.sis, Pablo an I worked on an approach using pubsubhubbub for RDF changes notification, that I'm happy to announce today.

The result is sparqlPuSH, an interface that can be plugged on any SPARQL endpoint and that broadcast notifications to clients interested in what's happening in the store using the pubsubhubbub protocol. At a glance, anyone can register a particular query to the RDF store (e.g. list all microblog posts, or list any changes made by X, using the Changesets vocabulary) and results are provided in an RSS / Atom feed that is then sync-ed using pubsubhubbub: each time new data corresponding the register query is added into the store, the store itself notifies the interested parties of such updates.
Practically, this means that you can be notified in real-time of any change happening in a SPARQL endpoint.

The following video describes how the approach works as well as shows a related use-case and you can download its source at http://code.google.com/p/sparqlpush/.
It can be used as an interface on the top of any SPARQL endpoint and also comes with an ARC2 interface (if you're using a different endpoint, the interactions happen via HTTP and use requires that your endpoint provides JSON SPARQL query results).

We believe that a push system like this for RDF notification can change lots of things regarding RDF data management and how to make sense of it, in real-time. In addition, we hope that such approach could be generalised not only to SPARQL endpoints, but to resource themselves, so that one resource can ping a pubsubhubbub hub when it changes, the notifications being then broadcasted to interested parties.

A proposal for Semantic OMB

From what I read on Twitter, it seems there's a bit of confusion regarding SMOB. Indeed, while SMOB provides a framework for Open and Semantic Microblogging, it does not define a new protocol, but simply uses SPARQL/Update over HTTP to exchange information between hubs (posting / removing notices and following / followers). Hence, this is not something that competes against OMB, the OpenMicroBlogging specification.

Actually, OMB is something we planned to look at for a long time, as briefly discussed when Status.net / OMB was presented in the W3C Social Web XG telco. I've finally took the time to analyse the full spec and checked how it compares with the distributed microblogging implementation of SMOB, and more generally with the vision of Semantic Web / Linked Data (SW/LD) microblogging services.

So here is a proposal for "Semantic OMB" (on Status.net wiki) that describes how the current OMB protocol fits with the previous idea. In particular, it aligns the terminology with existing classes / properties from well-known ontologies, and discusses how some current parts of the spec should be updated. It also discuss how OMB operations can be mapped to SPARQL/Update queries, based on the ones that currently happen in SMOB for cross-hubs synchronisation.

As you can see when browsing it, besides the terminology mappings, most of the things are compliant and there are only a few things that shall be discussed, in order to:

  • enable a better "distributed-ness" by keeping profiles owned by their users and not necessarily creating remote accounts;
  • making some mandatory elements being optional, as they are contained in the data that is exchange between services thanks to the Linked Data principles.

Thanks to these small updates, it could provide a protocol enabling SW/LD systems to be designed based on the OMB protocol, while having a sufficient abstraction level to comply with OMB systems using other technologies for data modeling and exchange. I'd be more than happy to see such features in an upcoming OMB release, and hopefully see deeper links between OMB and SW/LD efforts, as both aims to achieve the same goal of openness and interoperability. Comments and feedback are welcome on the related thread on the OMB mailing-list.

dbrec - Intelligent music recommendations for and from the Web of Data

In addition to the Social Semantic Web, you probably know that one of my main research interest concerns Linked Data, not only in publishing but also in consuming it. And well, I also enjoy music and the possibilities that LOD offers in that context, as we've wrote with Yves mid-2008.

So, I recently worked deeper on the use of Linked Data for music recommendations and I'm happy to announce dbrec, a service providing recommendations for the 39,000+ artists available in the DBpedia dataset (i.e. identified as instances of dbpedia-owl:MusicalArtist or dbpedia-owl:Band). The recommendations are computed using an algorithm for Linked Data Semantic Distance and take into account the various links that connect two resources, either directly (e.g. artists having played together) or indirectly (e.g. being on the same label or having covered the same song). Moreover, dbrec, explains the recommendations to the user, by keeping in mind the various links that have been used to compute the recommendations. For instance, the following screenshot shows why Big Brother and the Holding Company is suggested for a search on Janis Joplin.

dbrec is fully based on Semantic Web and Linked Data technologies and, in addition, exposes all the recommendations publicly (under a Creative Commons license) in RDFa using the dedicated LDSD ontology. For more details, you can check the homepage of the service, and start exploring the recommendations. Hey ! Ho ! Let's Go !

SMOB v2.0

About 2 years ago, we designed SMOB, a Semantic Microblogging client and server application, in order to demonstrate how Semantic Web and vocabularies like FOAF and SIOC could be used to provide a more open microblogging experience.

While we did not improve is much since then, there have been a lot of work on it these last months (about 250 SVN commits since end of October, when we decided to revive it) and I'm happy to announce that SMOB v2.0 is now officilay out, after some internal beta-testing during the last weeks.

Overall, it has been a complete code rewriting and architecture redesign since the previous release. While the initial version relied on clients and servers to respectively publish and aggregate data, this new version is based on the concept of distributed and independent hubs that communicate each other to exchange data, being microblog posts as well as followers / following lists.

As you can guess, SMOB is entirely based on Semantic Web and Linked Data technologies. Then, each hub locally stores its data as native RDF (using ARC2, also providing a SPARQL endpoint per hub) and the communication between hubs is provided via SPARQL/Update over HTTP. In addition, each hub provides RDFa information about itself and the microblog posts it contains, using SIOC, FOAF and OPO as well as interlinking with the Linking Open Data cloud using MOAT and CommonTag. Regarding that later aspect, the UI has also been improved and the system now suggest URIs from DBpedia and Sindice (new wrappers can easily be added) as soon as you use any #tag when writing your posts, and the mappings between tags and URIs are remembered for further usage in other posts. Finally, new content is posted to Sindice to enable discovering and querying microblog posts across the (Semantic) Web.

For those who want to get a preview before installing their own hub, here are two screenshots of the interface, the first one about publishing data, where you can see #tag mappings, as well as broadcasting to Twitter.

And in that second one, you can see a list of posts, with links to RDF data, hashtags mapped to URIs, etc.

You can also have a look at my SMOB hub here.

SMOB v2.0 is available through its download page and is licensed under the terms of the GNU GPL as its previous release. In addition, we are happy to provide commercial support for it, such as development of new features or custom integration of SMOB for enterprise microblogging purposes. For any enquiry about these commercial services, simply send an e-mail to at alexandre.passant[AT]deri.org, indicating [SMOB Support] in the subject line.

Oh, and finally, SMOB graduated and now got its own domain at http://smob.me. Enjoy Semantic Microblogging !

A simple PHP library for 4Store

I was recently playing with 4store, the new RDF-store engine by Steve Harris / Garlik, after having used 3store for a few years in a previous project.
As I don't want to use the HTTP server right now, but need to manage data input / query in PHP, I wrote a tiny lib that you can get here. It provides methods to import and delete graphs, as well as running SPARQL queries, and eventually outputs results with the requested content-type (XML, JSON or text). Then, adding graphs and querying data can be simply done as follows:

$s = new FStore('demo');
$s->import('http://rdfs.org/sioc/ns');
$s->query("select ?s where { <http://rdfs.org/sioc/ns#Item> ?s ?o }");
$s->delete('http://rdfs.org/sioc/ns');

First Public Working Draft of SPARQL New Features and Rationale

I'm pleased to announce that the W3C SPARQL Working Group has just published the First Public Working Draft of SPARQL New Features and Rationale, i.e. description and motivations of the new features to be included in the next version of SPARQL.


The W3C SPARQL Working Group has published the First Public Working Draft of SPARQL New Features and Rationale. This document provides an overview of the main new features of SPARQL and their rationale. This is an update to SPARQL adding several new features that have been agreed by the SPARQL WG. These language features were determined based on real applications and user and tool-developer experience. (Via W3C Semantic Web Activity News)

If you're implementing SPARQL engines, please note that the current syntaxes for each features are example syntax, and then should not be considered as final in any way. Any comments regarding this draft are welcomed by e-mail to public-rdf-dawg-comments@w3.org.

SPARCool screencast

Here is a screencast I've just made about SPARCool for tomorrow's SFSW Challenge, as I'm unfortunately not in ESWC this year.
The list of challenge submissions and related papers is online and here's the SPARCool one.

SPARCool supports JSONP callbacks

While I was wondering how to embed SPARCool results in webpages without having to rely on server-scripting (namely PHP) nor facing AJAX cross-domain security issues, I got two requests asking if it could support JSONP. I figured out it was exactly what I was looking for, so a big thanks to Claudia and Rob for suggesting it !

It was quite straightforward to implement, and SPARCool now supports JSONP callbacks. So, one can call results using AJAX to dynamically embed SPARCool results in webpages (for instance, jQuery provides an easy way to use JSONP with it). It hence allows to construct dynamic pages using Linked Data resources without having to type any line of SPARQL code (e.g. listing members of a project, description of a resource, etc.). For instance, check the updated sparcool.net page and the new example at the bottom, listing - on runtime - all the members of the Clash, via a DBpedia through a SPARCool URL.

Enjoy !

Introducing SPARCool

As WWW2009 is starting tomorrow, with a tutorial on the Web of Data in the morning and the LDOW2009 workshop the whole day, I'm happy to introduce SPARCool.

SPARCool is a simple webservice (à-la Triplr) that allows to run basic SPARQL queries on any URI that follows some of the Linked Data principles (i.e. being dereferencable and returning RDF information about the entity) thanks to a simple URL pattern: http://sparcool.net/format/predicate[;l=lang]/URI. For instance, as described on the website, http://sparcool.net/j/dbp:abstract;l=en/http://dbpedia.org/resource/Semantic_Web will return (in JSON) answers for the following query:


PREFIX dbp: <http://dbpedia.org/property/>
SELECT ?value
FROM <http://dbpedia.org/resource/Semantic_Web>
WHERE {
<http://dbpedia.org/resource/Semantic_Web> dbpedia:abstract ?value .
FILTER (lang(?value) = "en") .
}

You can get the results in various formats, one of them being HTML (so that results can be included in any webpages), as well as redirecting the the first answer of a query, as in http://sparcool.net/r/foaf:img/http://dbpedia.org/resource/Ramones, useful for images and hyperlinks. SPARCool is powered thanks to roqet wrapped in a PHP script (source-code should be released soon).

If you're attending our (i.e. Michael and myself) "Hello Open World" tutorial tomorrow morning, this is the kind of application you should be able to write after it. And BTW, if you're in Madrid and want to have a chat, I'll be here tomorrow and thursday (for the SemSearch workshop) as well as, obviously, the LOD gathering tomorrow evening.

Call for suggested features by the SPARQL Working Group

As already e-mailed and blogged, the SPARQL Working Group is currently gathering a list of features to extend the current state of SPARQL.

Feedback outside the WG is highly welcome, so if you're using some particular extension or hacked some new features (whatever it is regarding language, protocol, etc.) and you think they should be taken into consideration by the WG, please follow the guidelines and add your own by next tuesday. The WG will then decide which features it will focus on.

Syndicate content