RDF::Query 2.000

March 22nd, 2008 4:39 PM

RDF::Query 2.000 hit the CPAN a few days ago, and I thought I’d post a quick announcement. I already hinted at some of the changes in the previous post about beta releases, but to sum it up, here are some of the important bits:

  • RDF::Query now passes all SPARQL syntax tests and all but 4 eval tests (all four of which are, I believe, optional tests). The relevant EARL reports are here: syntax, eval.
  • The API for executing a query has been changed to be more clean and consistent. Most importantly, the return value from the execute method is now always a RDF::Trine::Iterator object, and for binding results (what you get back from a SELECT query) the things the iterator returns are now hashrefs mapping variable names to RDF::Trine::Node objects.
  • RDF::Query now provides an extended SPARQL grammar (requested by the name ‘sparqlp’ in the constructor [suggestions for better names welcome]) that provides access to some new functionality. Currently, the main thing it exposes is access to ARQ-like SERVICE blocks, allowing basic query federation. Under the hood, these federated queries try to make use of some work I’ve been doing on efficient federation, identity reasoning, and Bloom filters (more on that later). In the coming months, I’m hoping to add more features that will be exposed through this new parser to try out some new ideas and to keep pace with some of the interesting work being done in other projects (see the SPARQL Extensions ESW wiki page for some ideas).
  • Under the hood, there have been tremendous code changes since the 1.x line of RDF::Query. The code has been vastly improved, cleaned, and fixed so that it’s easier to read and modify. Perhaps most importantly, it’s now much easier to extend the system to do new things (like extending the syntax and adding new evaluation classes such as SERVICE).