I’m happy to announce the 1.0 release of RDF.rb and related Ruby gems. This release has been a long time coming, and the library has actually been quite stable for some time.
RDF.rb is a Ruby Gem implementing core [RDF] concepts, such as Graph, Repository, Statement, and Query. It also supports core readers and writers (parsers and serializers) for N-Triples and N-Quads.
Through other gems, more readers and writers are implemented, including:
- JSON-LD using the JSON::LD gem.
- Microdata using the RDF::Microdata gem.
- Notation3 using the RDF::N3 gem.
- RDF/JSON using the RDF::JSON gem.
- RDF/XML using the RDF::RDFXML gem.
- RDFa using the RDF::RDFa gem.
- TriG using the RDF::TriG gem.
- TriX using the RDF::TriX gem.
- Turtle using the RDF::Turtle gem.
There are also a number of storage adaptors for popular backends, including the following:
- MongoDB using the RDF::Mongo gem.
- Sesame using the RDF::Sesame gem.
- Virtuoso using the RDF::Virtuoso gem.
- AllegroGraph using the RDF::AllegroGraph gem.
I first became involved with RDF when working on the Connected Media Experience (CME) design (see blog entry). Having designed a proprietary metadata standard for Gracenote and Warner Music Group (later for CME), through review with Lucas Gonze, I was introduced to the Music Ontology, which had done an extremely thorough modeling of the music domain. This caused significant debate in the CME community, which lead to an updated design based on RDF, and many of the ideas from the Music Ontology.
During the same review, I was also introduced to RDFa as a mechanism of embedding music metadata within a web page. Since CME is endeavoring to create a standard for enhanced digital media packages, HTML5 and RDFa are natural technologies to utilize.
My methodology for approaching architectures and specifications is based on parallel prototyping, to validate the details of a design, and sometimes serve as the bases for an implementation. For several years (starting in 2007) I had been using Ruby on Rails and was quite invested in the Ruby. My first attempts to integrate RDFa into the implementation made use of the Raptor parser, which unfortunately was not up-to-date with respect to the RDFa 1.0 specification current at the time. Additionally, I found that the Ruby Bindings suffered from memory leaks, and went to look for a native Ruby implementation. This lead to Tom Morris’ Reddy gem. This was a port of the Python rdflib package to Ruby, which was going in the right direction, but had fallen into disuse. I created my own fork, and later released as RdfContext which had complete implementations for RDF/XML, RDFa 1.0, and Notation3 (N3-rdf level).
In the mean time, Arto Bendiken and Ben Lavender had been working on RDF.rb, taking a different approach closer to Sesame. The design of RDF.rb is quite elegant, making effective use of natural Ruby idioms, and taking an approach based heavily on using Ruby module extensions. After a prod by Nick Humfrey who had started a port of my RDF/XML parser, I jumped in and ported the bulk of my RDF parsers and serializers, eventually adding several more, to make the RDF.rb platform one of the most complete in terms of standards support across all major (and minor) serialization formats. In 2010, I was asked to join the RDF.rb core development team, and soon became the primary maintainer after Arto and Ben became fully committed with Dydra.
Arto and I finally got together recently to move all of the gems primary repositories to the Ruby RDF organization on GitHub, and release them as 1.0. The next significant release should be 1.1, to coincide with the release of the RDF 1.1 specs from the W3C.