Redland :
Free Software / Open Source RDF

Dave Beckett

This talk is personal opinion.
I am not speaking on behalf of my employer.
The slides are presented via S5


What Is Redland?

Redland RDF Application Framework   Set of Libraries   Toolkit   Whatever!

Redland is a set of mature RDF open source libraries written in C providing a foundation layer of technology for semantic web applications with language bindings to Perl, PHP, Python, Ruby and others.

Vision: RDF "in a box" for developers

Aiming for: lowest possible barrier to using RDF technology

RDF in a box — Two Key Requirements

  1. Available (Portable) to your system
  2. Available in your programming language

Key Requirement 1 — Portable

Key Requirement 2 — Language Availability

Other Important Requirements

Not creating functionality in advance of needing it
Use whatever system functionality is available or select at build
Can be linked into a low-memory system for e.g. phones
GNU autotools to configure modules and parts
Minimal dpendencies
Just an XML parser (if you do not want to read URIs)
Memory use
No leaks, overflows. Handles low memory use (embedded)
Web standards compliant
Friendly licence(s)
LGPL 2.1+ / GPL 2.1+ / Apache 2+

Redland from Semantic Web @Bristol

The name: Redland is an area of Bristol, UK (wikipedia)
Not Redlands, Los Angeles or Redland, Florida or ...

FOAF, RDQL and Turtle were created here.

5 RDF W3C Recommendation editors work(ed) here.

Jena Java Semantic Web toolkit was created here at HP Labs.
(Actually Jena was created the same month as Redland, June 2000).

... and I lived there, at the time working at the Institute for Learning and Research Technology, University of Bristol

Semantic Web Stack

Semantic Web Layer Cake Tim Berners-Lee

#include <stdweb.h>

Semantic Web Layer Cake  

Redland Scope in Semantic Web Stack

Semantic Web Layer Cake with Redland Scope

Redland Components

Redland libraries uses

What you get in the Redland box

API Style — Object-based C

Data flow and constructs

Redland Documentation

Web development language bindings

Expectation is to use libraries with one line of code

$ python
Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
<<< import RDF

Or none:

$ perl -MRDF::Redland '...'

You can always use the command line:

$ rdfproc
Redland RDF processor utility 1.0.9
Copyright 2000-2008 David Beckett. Copyright 2000-2005 University of Bristol
Try `rdfproc --help' for more information.

More of which shortly...

RDF Graph Query


Demos Part 1 — Parsing in Raptor

Parsing in raptor

# online: count triples
$ rapper -c

# online: get triples from home page
$ rapper -g -q -o turtle

# online: What was it doing?
$ rapper -g -q -c --trace

# offline: parse the slides
$ rapper -g -q -o turtle index.html

# offline: what just happened?
rapper -g -c --trace index.html
or Triplr

rapper parsing — What just happened?

rapper execute example

Demos Part 2 — Querying in Rasqal

Querying in rasqal

# online: use planetrdf query
$ roqet example.rq
or run the query via the web (example.rq)

roqet querying — What just happened?

roqet execute example

Get Redland

Ongoing Work

For anything else, I prefer patches in diff -urN form :)



Slides (to appear at):


Emergency Command Line Results

$ rapper -c
rapper: Parsing URI with parser rdfxml
rapper: Serializing with serializer ntriples
rapper: Parsing returned 40 triples
$ rapper -g -q -o turtle

results: home.ttl

$ rapper -g -q -c --trace
rapper: Processing URI
rapper: Processing URI
rapper: Processing URI
rapper: Processing URI
$ rapper -g -c --trace index.html 
rapper: Parsing URI file:///Users/dajobe/websites/ with parser guess
rapper: Serializing with serializer ntriples
rapper: Processing URI file:///Users/dajobe/websites/
rapper: Guessed parser name 'guess'
rapper: Parsing returned 56 triples