I've been working on an RDF API for Drupal 6.x for a few months now, but have been reluctant to much discuss it publicly until such time that I had something that was viable and (dare I say it) usable. Given that I've been fortunate enough to recently find funding for part of this work, and that certain key people (thanks Boris and Ivan) have encouraged me to be less of an introvert, I will in the immediate future be doing a series of posts about the project.
The project is currently in an early alpha status and consists of an ensemble of interrelated Drupal modules, four of which are currently downloadable from the RDF project page. The diagram to the right shows the intended components of the final version (note that RDFbus is a separate project).
Compared to the earlier RDF-related projects for Drupal, the RDF API is minimal and not overly ambitious. Its main purpose is simply to provide a uniform API and storage abstraction layer for querying and storing RDF statements in repositories, letting other Drupal modules hook into this to provide the actual implementation of storage backends and any other higher-level functionality. The RDF API exports a number of Drupal hooks, through which other modules can implement e.g. repositories, parsers and serializers for RDF formats, and namespace abbreviations.
I started the project before the ARC2 library was available, but have recently rewritten parts of it to use ARC. While the core RDF API isn't dependent on ARC and provides a more Drupal-like procedural interface, it will also automatically load up ARC if it has been installed, facilitating ARC usage on Drupal. In addition, ARC is explicitly needed e.g. for the RDF Import and and RDF Export modules, as the RDF API itself provides serialization functionality only for the programmer-oriented RDF/PHP and RDF/JSON formats.
Here are some early sneak peeks of the administration interface provided by these modules, showing the data query & export screens, the various settings and the repository management screen, and the status report entry indicating whether the ARC2 library has been installed or not:
The API is still ongoing rapid evolution and refactoring, and there are components (such as the RDF Schema and SPARQL modules shown on the diagram) which I've not published yet; I'd recommend that anyone interested in this project subscribe to the RSS feed of the CVS commits.
There is already one published Drupal 6.x module that requires the RDF API as a dependency, namely the Skype Status module, which retrieves users' Skype online presence information from Skype's public RDF-based presence service, using the RDF API to parse the data and cache it as a named graph in a local RDBMS-backed repository provided by the RDF DB module. While this is a trivial module, it can perhaps be useful as an example of RDF API usage for the moment, and I would point any interested developers at its source code for reference.
I'm interested in collaborating with the authors of the existing RDF projects for Drupal as they move forward to Drupal 6.x. For developers, introducing the RDF API as a dependency will mean not having to worry about many of the incidental details of RDF, including reading and writing e.g. RDF/XML, thus freeing up more time to concentrate on the higher-level functionality. Additionally, there is clear opportunity for network effects in case we manage to standardize on a uniform API. I've already began discussions with Jonathan and Dan, and would love to hear from anyone else. I will also be at FOSDEM 2008, and I'm easy to recognize - I'll be the guy wearing sunglasses when coding ;-)
More information to follow.