Wednesday, 16. August 2006

making sesame2 SPARQL protocol conformant

At the moment we need a SPARQL conformant interface to Sesame2, and as there is none I know of, the power of open source allows us to write one.
openrdf

My first question is: did somebody already write a Servlet that does map Sesame2 servers to the SPARQL protocol?


At the moment sesame2 does not support full SPARQL querying, but it will soon. We don't have to insist on SPARQL as query language, we can pass in SERQL queries and treat them like they were SPARQL, but we have to start with a conformant servlet :-)

Then some longer questions I also asked on the Sesame developer mailinglist:

We think that a SPARQL protocol conformant HTTP servlet is most important for any use of Sesame2 and are willing to invest 10 hours a week into this, more precisely, a clever student worker. We hope to get this done until the end of September.

We would implement a SPARQL protocol conformat query server and a SPARQL protocol conformant query client (issue tracker) for the reading operations of a HTTPSail. For updates of the model, we would stick to the current implementation of the latest CVS of sesame2.

want to know what the sparql protocol is?

I understand that these are MANY questions, I tried to think of all the calamities we are going to face in the next months. And I expect that some hackers out there already handled half of these questions, so don't hesitate to write me, or comment here, or to the sesame devel list.

* The org.openrdf.sesame.server.http.RepositoryServlet is not conformant to the SPARQL protocol,
as defined in the WSDL, or?
http://www.w3.org/TR/rdf-sparql-protocol/#query-bindings-http
the protocol described at org.openrdf.sesame.server.http.protocol.txt does not say anything about sparql

* If not, does anybody know how to generate stubs for the servlets automatically (so that they strictly conform to the protocol)?

* If not, we would examine the Jena / Joseki implementation, as it serves as reference implementation.

* When we implement a SPARQL conformat servlet - can we put it directly into the package org.openrdf.sesame.server.http.SparqlReadServlet, directly in the latest CVS, to have the best uptake and feedback possible?

* If yes, is there also a parser for query results, that can be used on the Client side HTTP sail to read results written by the server?

* What is the status of the HTTP Client? Did anybody do since we last mailed? if yes, please add comments to this ticket:
http://www.openrdf.org/issues/browse/SES-205

* Is the query string already part of the Query object? Jeen said this is a prerequisite for this hack. If not, Jeen: could you do this? This is such a core thing that I don't want to touch it and for you its probably only 50 lines of code.
I mean the solution 1) suggested here:
http://www.openrdf.org/issues/browse/SES-205#action_10533

* Can Sesame2 serialize Query results according to the SPARQL protocol?
I see the QueryResultFormat.SPARQL which would indicate that.

* last but not least: any news about SPARQL query support?

* Do you have a debug environment to test the existing servlets from org.openrdf.sesame.server.http?

* Does the WebClient work? (the code looks SOOO COOL! spring rocks)
- I cannot find any code in the webclient project that actually *changes* triples... hm.

* When Sebastian starts hacking, whom can he jabber/icq for help?
QR barcode by i-nigma.com/CreateBarcodes
leobard - 16. Aug, 17:37

a wiki page

on that is available here:
http://gnowsis.opendfki.de/wiki/SesameDeveloping

I will collect some thoughts on how to do it there.

Damian (guest) - 16. Aug, 17:53

Try joseki, arq, and sesame?

It isn't that difficult to plug sesame into jena as a graph. That should do the trick. You could also try hooking ARQ into sesame directly, although that's less trivial.

leobard - 21. Aug, 09:12

we tried jena and joseki

last year. The gnowsis 0.0 version, and 0.8 version both used Jena. The SPARQL support in Jena is quite a hack on top of the DataSet implementation. The problem here is that Jena doesn't support named graphs "naturally" in the Model / Graph abstraction layer but only on top. So, if you are unlucky, named graphs will take endlessly in evaluating queries.

We also stacked Jena and ARQ on top of Sesame, which is also useless, as you then have the SPARQL query dissected into find(spo) calls that get forwarded, whereas you would want the store to handle the whole query, etc.
http://gnowsis.opendfki.de/wiki/SesameToJena

A nice hack is Richard Cyganiak's sparql2sql, which was published here:
http://jena.sourceforge.net/sparql2sql/

We also tried it, but it has not such a big community as Sesame, and at the end the Jena Database mapping was - at that time - somehow "mediocre". The literals and resources in the object table are marked with "l:" and "r:" (or something similar), so every call to the db involved heavy string parsing .... they could've just separated into table columns, etc etc etc... rant .. rant ... slow ... slow ...

Sesame2 has named graphs in from bottom to top, and a transaction oriented architecture. I feel more comfortable there now. Lets see what happens this time .... ;-)
Jeen (guest) - 17. Aug, 16:03

Most of this stuff is actually already there in Sesame 2

I already replied in some detail sesame developers list to this
(see https://sourceforge.net/mailarchive/message.php?msg_id=36390015 ). but it can't hurt to repeat it in short here I guess: most of the stuff you mention is already there in Sesame 2. There is a servlet that implements SPARQL protocol (a superset actually), and there are parsers and writers for serialized query results (in SPARQL, binary and JSON format).

Damian, I would expect that using ARQ on top of Sesame would result in very bad performance for anything bigger than a toy example, really. For good query performance the engine really needs low-level access to the store...

speednews.it (guest) - 1. Sep, 16:24

speednews.it - web information directory


Trackback URL:
https://leobard.twoday.net/stories/2536840/modTrackback

icon

semantic weltbild 2.0

Building the Semantic Web is easier together

and then...

foaf explorer
foaf

Geo Visitors Map
I am a hard bloggin' scientist. Read the Manifesto.
www.flickr.com
lebard's photos More of lebard's photos
Skype Me™!

Search

 

Users Status

You are not logged in.

I support

Wikipedia Affiliate Button

Archive

August 2006
Sun
Mon
Tue
Wed
Thu
Fri
Sat
 
 
 3 
 6 
 9 
10
11
13
14
15
17
18
19
20
21
22
26
27
28
29
30
31
 
 
 

Credits


austriaca
Chucknorrism
digitalcouch
gnowsis
Jesus
NeueHeimat
route planning
SemWeb
travel
zoot
Profil
Logout
Subscribe Weblog