Moving perlrdf to Moose
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.
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.