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 27 Jan '10, 12:34

billroberts's gravatar image

billroberts
81639
accept rate: 47%


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.

link

answered 08 Feb '10, 16:31

Gregg%20Kellogg's gravatar image

Gregg Kellogg
1266
accept rate: 33%

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.

link

answered 25 Apr '10, 23:17

Arto%20Bendiken's gravatar image

Arto Bendiken
28226
accept rate: 20%

-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

(27 Apr '10, 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.

(27 Apr '10, 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.

(02 Jan '11, 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.

link

answered 26 Apr '10, 12:27

Ross%20Singer's gravatar image

Ross Singer
412
accept rate: 0%

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

link

answered 05 Jul '10, 12:00

davidseth's gravatar image

davidseth
511
accept rate: 0%

thanks - looks interesting

(05 Jul '10, 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.

link

answered 26 Apr '10, 03:04

Harshal's gravatar image

Harshal
10116
accept rate: 0%

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

link

answered 11 May '11, 13:37

Genadinik's gravatar image

Genadinik
96519
accept rate: 66%

-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!

link

answered 03 Feb '11, 09:09

Data%20Center's gravatar image

Data Center
0
accept rate: 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:

×13
×10

Asked: 27 Jan '10, 12:34

Seen: 3,318 times

Last updated: 18 Jul '11, 06:47