InfoQ

News

SPARQL Update to Complete RESTful SOA Scenario

Posted by Thomas Bandholtz on May 06, 2008 12:02 PM

Community
SOA
Topics
Semantic Web ,
REST
Tags
Update ,
Web 2.0 ,
RDF ,
W3C ,
Mashups ,
Collaborative Technologies
The LinkingOpenData Community Project has accomplished a global RESTful SOA scenario giving access to over two billion interlinked statements (RDF triples) from some 50 distributed providers such as DBpedia, Geonames, MusicBrainz, WordNet, the DBLP bibliography, or the 2000 U.S. Census. All this data is published in the Resource Description Framework (RDF) format. Each data set is structured as a named graph which can be accessed by a "Cool URI", using a simple HTTP GET (see my previous posting). A detailled tutorial for contributors can be found in How to Publish Linked Data on the Web. As datasets are widely interlinked between different sources, all this makes a large (if not huge) machine readable Web. If the provider also implements a SPARQL endpoint, may be using RDBMS-based tools such as D2R Server, clients may use the powerful SPARQL Query Language for RDF against the data.

Even humans can get an impression using an RDF Browser such as the Tabulator Firefox add-on. The latest talk about LinkedData highlights more sophisticated application patterns like domain-specific LinkedData mashups, mobile geospatial entry-points, semantic search engines, data fusion, aggregation and drill down tools, which will certainly appear on the scene soon.

However, there one serious limitation so far: this stunning network provides read access only. Currently this is addressed by the upcoming SPARQL Update language. While SPARQL Query has been developed by the W3C RDF Data Access Working Group since 2004 and finally came to W3C Recommendation in January this year, several issues had to be postponed, among them aggregate functions, and the update language. Recently Andy Seaborne (well-known Jena developer) and Geetha Manjunath, both from HP, published version 5 of a language for updating RDF graphs, (also known as "SPARUL"), which may push this topic forward. This language draft provides the following facilities:

* Insert new triples to an RDF graph.
* Delete triples from an RDF graph.
* Perform a group of update operations as a single action.
* Create a new RDF Graph to a Graph Store.
* Delete an RDF graph from a Graph Store.

So this resembles to the missing PUT, POST, DELETE implementation of Linked Data. But what is a Graph Store? Defined as "a repository of RDF graphs managed by a single service" it serves as the endpoint to which any SPARQL statement will be posted. Remember that each graph is an RDF dataset which should be represented by a URI itself - so why not send a HTTP POST/PUT/DELETE to this "Cool URI" directly?

The draft from HP does not raise nor answer this question, but the SPARQL Update Wiki gives some hints in its Q&A section:

SPARQL is read-only and so can be mapped into URIs (and therefore GET) without breaking too many principles of Web architecture.
REST-style HTTP operations could play a bigger role in operations for adding, updating, and removing entire named graphs.
While PUT and POST are generally useful, neither REST nor the Web architecture precludes the use of other methods which might better facilitate "atomic updates to large graphs".
Please try to avoid making the same mistakes as Web services; application protocols were not made to be "bound onto", because doing so requires masking most of their value.

The concept of resources may not be the same in RDF and REST. This has been discussed from 2006 in the trouble with "binding" and REST without RDF is only half as bad as SOAP, until February this year in Bridging the semantic Web and Web 2.0 with REST without any final conclusion. Why is it important?

The so far certainly RESTful Web of Linking Open Data provides an outstanding real world pattern for RESTful SOA - as long as there is only read access. Imagine enterprises can easily publish their data internally in the same way, and so cross-enterprise organizations could do (assumed that security requirements are as well satisfied). When it comes to UPDATE in Linking Open Data, this most probably will be realized using SPARQL Update. While this is a language not an application protocol, it is based on assumptions on such a protocol, e.g. by addressing the Graph Store and not the Graph. So it might by worthy to "avoid making the same mistakes as Web services".

No comments

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.