login about faq
6
4

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?

asked Jan 27 '10 at 12:34

billroberts's gravatar image

billroberts
77619


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.

answered Feb 08 '10 at 16:31

Gregg%20Kellogg's gravatar image

Gregg Kellogg
1266

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:

  • 100% pure Ruby with minimal dependencies and no bloat.
  • 100% free and unencumbered public domain software.
  • Extremely well-commented source code.
  • Compatible with Ruby 1.8.x, Ruby 1.9.x, and JRuby.
  • Provides a clean RDF object model and related APIs.
  • Fully modularized with a lean core, most non-core functionality available as add-on plugin gems.
  • Supports parsing and serializing N-Triples, Turtle, RDF/XML, RDF/JSON, and TriX data.
  • Supports accessing and storing RDF data in SQLite, PostgreSQL, MongoDB, Cassandra, Sesame, RedStore, and the Talis Platform.

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.

answered Apr 25 '10 at 23:17

Arto%20Bendiken's gravatar image

Arto Bendiken
24225

-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

(Apr 27 '10 at 10:15) Ian Ian's gravatar image

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.

(Apr 27 '10 at 17:19) Arto Bendiken Arto%20Bendiken's gravatar image

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.

(Jan 02 '11 at 20:28) Gregg Kellogg Gregg%20Kellogg's gravatar image

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.

answered Apr 26 '10 at 12:27

Ross%20Singer's gravatar image

Ross Singer
412

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

answered Jul 05 '10 at 12:00

davidseth's gravatar image

davidseth
511

thanks - looks interesting

(Jul 05 '10 at 14:08) billroberts billroberts's gravatar image

As an alternative, you can explore ActiveRDF. A fork is being developed by enthusiasts on GitHub. I had used it a couple of years ago. Hope that helps.

answered Apr 26 '10 at 03:04

Harshal's gravatar image

Harshal
1016

I am in the beginning stages of trying out RDF.rb based on the suggestions of some people on this site.

answered May 11 '11 at 13:37

Genadinik's gravatar image

Genadinik
9259

-1

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!

answered Feb 03 '11 at 09:09

Data%20Center's gravatar image

Data Center
0

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×11
×9

Asked: Jan 27 '10 at 12:34

Seen: 1,890 times

Last updated: Jul 18 '11 at 06:47