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

Overview

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

Fast
Small
Not creating functionality in advance of needing it
Modular
Use whatever system functionality is available or select at build
Embeddable
Can be linked into a low-memory system for e.g. phones
Configurable
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
2005

#include <stdweb.h>

Semantic Web Layer Cake  
 
 
 
 
 
 
 
stdrdf
 
 
stdxml
stduri

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

SPARQL

Demos Part 1 — Parsing in Raptor

Parsing in raptor

# online: count triples
$ rapper -c http://librdf.org/redland.rdf

# online: get triples from home page
$ rapper -g -q -o turtle http://www.dajobe.org/

# online: What was it doing?
$ rapper -g -q -c --trace http://www.dajobe.org/

# 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 :)

Thanks

Redland: http://librdf.org/

Slides (to appear at):
http://www.dajobe.org/talks/200905-redland/

Questions?

Emergency Command Line Results

$ rapper -c http://librdf.org/redland.rdf
rapper: Parsing URI http://librdf.org/redland.rdf with parser rdfxml
rapper: Serializing with serializer ntriples
rapper: Parsing returned 40 triples
$ rapper -g -q -o turtle http://www.dajobe.org/

results: home.ttl

$ rapper -g -q -c --trace http://www.dajobe.org/
rapper: Processing URI http://www.dajobe.org/
rapper: Processing URI http://www.dajobe.org/foaf.rdf
rapper: Processing URI http://journal.dajobe.org/journal/comments.rdf
rapper: Processing URI http://www.dajobe.org/xslt/grokXFN.xsl
$ rapper -g -c --trace index.html 
rapper: Parsing URI file:///Users/dajobe/websites/www.dajobe.org/talks/200905-redland/index.html with parser guess
rapper: Serializing with serializer ntriples
rapper: Processing URI file:///Users/dajobe/websites/www.dajobe.org/talks/200905-redland/slides.xslt
rapper: Guessed parser name 'guess'
rapper: Parsing returned 56 triples