Changes between Initial Version and Version 1 of StateOfPerlAndRdf

2010/02/12 15:56:38 (14 years ago)

state of RDF in Perl


  • StateOfPerlAndRdf

    v1 v1  
     1= The State of RDF support in Perl = 
     4== Experimenting == 
     6tkappler created a git repository to experiment with RDF in Perl, see what existing modules can do, etc. Biohackathoners, please fork and contribute! 
     9== Existing modules == 
     11Also see! 
     14=== RDF::Trine === 
     16[ RDF::Trine] is a complete RDF package written in Perl. It is the only one that has parsers for RDF serializations other than RDF/XML (including JSON), and that has a SPARQL wrapper. It implements the 
     17[ SPARQL protocol] and can thus talk to any SPARQL endpoint. 
     19Last release: 0.117, 2010-02-04. 
     21 istkappler in touch with the author, Gregory Williams, and it's a pleasure to work with him. Some patches contributed. Here's some of his advice that I intend to include in some more in-depth, step-by-step writeups. 
     23> In general you should be using RDF::Query for retrieving patterns 
     24> that are more complex than a single triple pattern. get_pattern 
     25> exists mostly for RDF::Query to use when the underlying store is 
     26> expected to be able to execute a complex join query more efficiently 
     27> than the perl implementation (for example, the DBI-based storage 
     28> backend). It's never been a part of the code that has felt very 
     29> stable, so I'd suggest always using the RDF::Query interface for 
     30> situations where get_statements doesn't do as much as you need. 
     33See the `trine-*.pl` files for code snippets. 
     36=== RDF::Redland === 
     38[ RDF::Redland] is a wrapper for the [Redland C library]( Looks 
     39pretty complete. 
     41I couldn't build it as I have the new version 0.9.17 of librasqal, the query library for Redland, which is API incompatible with its predecessor on which RDF::Redland apparently depends. 
     44=== Test::RDF === 
     46[ Test::RDF] supports checking for data validity, and comparing two graphs for equivalence. It does not explain the differences when they are not equal, however. Builds on RDF::Redland. 
     49=== RDF::Core === 
     51Another pure Perl RDF framework. [ CPAN]. Last release: 0.51, 2007-02-19, which probably means that it's not very 
     52much used or supported. Use RDF::Trine unless you have a good reason not to. 
     56 * A pretty complete RDF package written in Perl, including parser and 
     57  serializer, model with its own query language, and storage with 
     58  either Berkeley DB, in-memory, or PostgreSQL as backend. 
     59 * It's unfortunate that it has its own query language, should be 
     60  SPARQL. 
     61 * RDF/XML serialization and parsing only. 
     62 * Has a Schema module to work with RDFS, didn't try it. 
     63 * Greg Williams of RDF::Trine, the other, more complete and up-to-date 
     64  RDF framework, tried to contribute to RDF::Core but was 
     65  "[met with resistance, rejection, or frustratingly long delays](". Not 
     66  good. 
     69=== Onto-Perl === 
     71[ ONTO-PERL] by fellow Biohackathoner Erick Antezana can translate between OBO, OBO-in-OWL, and RDF (among other things). 
     74=== Wrappers === 
     76 * [ RDF-Sesame] is a wrapper for the REST API of [Sesame](, to 
     77  ask [SerQL]( 
     78  queries and get the results in tabular form. 
     80 * [ MOBY], a BioMoby client, has MOBY::RDF. 
     83== Future Work == 
     85A lot. Add if you think of something. 
     87UniProt has a very simple RDF reader that only works with UniProt RDF. It's still useful as it's very easy to use, tkappler is working on packaging it up.