|
There was some discussion of this question here: http://stackoverflow.com/questions/931548/the-state-of-rdf-in-ruby where Dave Beckett notes that the Ruby bindings for his Redland library have not been updated for a while (though probably still work). Can anyone comment on whether the Ruby Redland bindings work correctly in recent versions of Ruby? I've also been experimenting with RdfContext from Gregg Kellogg http://github.com/gkellogg/rdf_context What library do you use and what are its pros and cons? |
|
I started RdfContext due to frustrations with the Redland Ruby Bindings. The primary issues for me were installation problems across different platforms, which is a real problem when you're developing a gem as a utility for non-programmers to use. A buggy Rdfa parser (which has since been updated and is now state-of-the-spec). And garbage collection issues, which didn't affect operation, but left complaints all over the place. Redland's still the way to go for straight-out performance, but I felt that a pure-Ruby approach was necessary. The works not done; more stores could be added, and performance can be improved. I'm working on updating the N3 parser to take advantage of Quoted Graphs and be more compliant. I'd also like to add a SPARQL engine and work on better Rails integration. |
|
The active pure-Ruby projects at this moment are RDF.rb, RdfContext and RDFObjects, and the most convenient Redland binding for Ruby is Redleaf. I'm the lead developer for RDF.rb, so that's what I use. In brief, RDF.rb's pros are:
The cons are primarily the lack of a SPARQL engine at present (a SPARQL client already exists, however). If you wish to learn more, there are several in-depth tutorials available for RDF.rb:
The public-rdf-ruby@w3.org mailing list has also undergone something of a revival in the last month, so I'd highly recommend that anyone who cares about RDF in Ruby subscribe to the list and participate in the ongoing discussions. -1
@Arto Bendiken I think your RDF.rb project is pretty interesting, but surely it's not "100% pure Ruby" since you rely on Redland to parse RDF/XML and Turtle? Ian RDF.rb itself is indeed 100% pure Ruby with no native dependencies. RDF::Raptor, which you refer to, is an external add-on plugin that happens to rely on Raptor. It is not to be considered part of RDF.rb itself, but rather part of the RDF.rb ecosystem. We draw a clear line between the core library and plugins, so that plugins (http://rubygems.org/search?query=rdf-) can have any dependencies they want. For instance, people working with JRuby may create JRuby-dependent plugins that rely on Jena or Sesame, but that's not going to affect nor interest any RDF.rb users not working with Java. Note that in RDF.rb 0.3.0 (and the related linkeddata Gem), the Redland parsers are replaced with RDF::N3, RDF::RDFXML, and RDF::RDFa. RDF::N3 is a pure-ruby gem, with RDF::RDFXML and RDF::RDFa just requiring Nokogiri. Not pure-ruby, but with help from the community, REXML could also be used as an alternative parser with Nokogiri isn't available. |
|
ActiveRDF pretty much requires that you have a persistence layer with a SPARQL endpoint, which, in my case, at least, isn't always a given when I'm just trying to parse and work with some RDF. It's also very Rails-centric. The major difference between RDFObjects (full disclosure, I am the main developer) and RDF.rb and RdfContext is that its intention is to abstract the graphs away into something more idiomatically Ruby-ish (aligning it more, API-wise, with ActiveRDF). The other two stick pretty closely to RDF for their interfaces. Like RdfContext, the only reason I started RDFObjects was a completely inability to get the Redland bindings working. I'm not sure I can subscribe to any of them being "pure-Ruby", per se, since RDFObjects and RdfContext require Nokogiri and RDF.rb requires raptor to work with anything but ntriples or JSON (basically), but these are certainly much lower barriers than the Redland bindings have presented. Anyway, it's nice to see an ecosystem building (finally) around RDF for Ruby. |
|
Take a look at the excellent Spira Project. "It's time to breathe life into your linked data." And a blog post with further info: http://blog.datagraph.org/2010/05/spira |
|
Hi Eric, You have a wide knowledge in this kind of topic.. Basically, the Ruby interface is a little bit difficult for me to handle but I would like to give you some details about this.I'm always use particular Ruby version/program.-with-ruby=ruby1.8. You need to install it system wide do this as root via sudo just like this; root# make install. Then you must to test the program if it is running.The URI of the content (as file:/path/to/content) and the syntax name (say, rdfxml):sample syntax: # If installed ruby example.ruby file:../data/dc.rdf rdfxml # In source tree ruby -I. -Ilib example.ruby file:../data/dc.rdf rdfxml So far, I've used RDF.rb for RDF library, it uses Ruby's dynamic system of mixins to create a library that's very easy to use. For further info.check out the Data center.. thanks! |

