Moving perlrdf to Moose

August 30th, 2012 10:20 PM

Earlier this week I spent a few days at the Preikestolen Mountain Lodge at the Moving to Moose hackathon. I got to meet some great people from the perl5 and perl6 communities, hack on the perlrdf toolkit, and see a couple of great talks.

Lysefjord Cairn || Panasonic DMC-GF1 | Lumix G 20/F1.7 | 1/50s | f13 | ISO100
Lysefjord Cairn

Along with other members of the perlrdf community, I worked on updating our RDF toolkit (RDF::Trine) to use the Moose object system. Chris Prather helped us settle on a design that will simplify code, allow for easy implementation of new parsers, serializers, and stores, and provide a way for implementors to greatly improve the quality of SPARQL query plans produced by RDF::Query.

Ruben Verborgh did some amazing optimization work (with help from Shawn Moore and dtrace) on the pure-perl Turtle and N-Triples parser that yielded two orders of magnitude improvement in parsing speed on some large inputs.

Toby Inkster started converted the classes for nodes and statements to use Moose. Konstantin Baierer worked on modeling the type system in Moose allowing coercion of common objects and unboxed types to their RDF object equivalents. Together they went on to improve the extensibility of the parsing and serializing code, which will make it easier to support custom file formats in the future.

Kjetil Kjernsmo refactored several modules meant to manage XML namespaces into the new URI::NamespaceMap package.

Overall I’m thrilled with the progress we made, and think the new design will allow us to keep improving our code and growing as a community. If you’re interested in more information, join us on irc or the mailing list.