Reputation: 28419
I'd like to learn more about RDF/SPARQL implementation internals, but most of the frameworks are (necessarily) somewhat complicated by real-world performance and implementation consideratins. I am curious if there is a "reference" implementation that would be suitable as a low-level teaching tool? What is the RDF/SPARQL implementation that is the smallest/cleanest from a code standpoint?
Upvotes: 3
Views: 2366
Reputation: 10639
Don't be afraid to start. Take any RDF engine, define a task and program it! I recommend you to start with Sesame.
Upvotes: 5
Reputation: 194
start with sesame: it's simple and good for parsing (using Rio) and as a triplestore. The default installation is divided in two web application: one for the endpoint, and one for do some management/query on that. Please consider that sesame has defined an abstract interface called Sail, that several vendors does implement. So you could use with little effort the same interface, storing your data actually for example on jena, virtuoso, allegrograph, bigowlim or even on other king of graphdb such as neo4j via the tinkerpop stack.
Upvotes: 1
Reputation: 380
Dave Beckett's Redland is a great way to start.
Features:
Redland is a set of free software C libraries that provide support for the Resource Description Framework (RDF).
* Modular, object based libraries and APIs for manipulating the RDF graph, triples, URIs and Literals.
* Storage for graphs in memory and persistently with Sleepycat/Berkeley DB, MySQL 3-5, PostgreSQL, AKT Triplestore, SQLite, files or URIs.
* Support for multiple syntaxes for reading and writing RDF as RDF/XML, N-Triples and Turtle Terse RDF Triple Language, RSS and Atom syntaxes via the Raptor RDF Parser Library.
* Querying with SPARQL and RDQL using the Rasqal RDF Query Library.
* Data aggregation and recording provenance support with Redland contexts.
* Language Bindings in Perl, PHP, Python and Ruby via the Redland Bindings package.
* Command line utility programs rdfproc (RDF), rapper (parsing) and roqet (query).
* Portable, fast and with no known memory leaks.
Upvotes: 1
Reputation: 28655
Finding a small and clean SPARQL implementation is going to be hard since the language is quite complex and expressive and most implementations (my own included) add a variety of extensions to the syntax as demanded by customers/perceived usage scenarios.
AFAIK Jena's documentation provides the most comprehensive description of how a SPARQL implementation actually functions but like you say it's rather complex.
In terms of just understanding and teaching SPARQL getting your head around the SPARQL Algebra is very important. If you understand the algebra you can work out by hand how a query should translate into algebra and then work through executing it by hand - obviously I don't recommend trying this for anything other than relatively simple queries on very small datasets!
Another key thing to teach is that the language is not procedural, an implementation is free to reorder and adjust the query in any way it sees fit provided this does not change the actual meaning of the query.
Upvotes: 3
Reputation: 32715
I have not seen mention of an official reference implementation.
But maybe this will help... have you taken a look at the "SPARQL Query Language Implementation Report"? It compares 14 SPARQL implementations against a common test suite.
http://www.w3.org/2001/sw/DataAccess/impl-report-ql
Upvotes: 2