serving linked data

Gregory Williams greg at evilfunhouse.com
Sat Dec 5 22:56:24 CET 2009


On Dec 5, 2009, at 1:49 PM, Kjetil Kjernsmo wrote:

> Yeah, I've thought about too, but not done anything. It would be nice to 
> have.
> 
> My idea was to implement a system that would have only 303-URIs. 
> 
> The same handler (or whatever, mod_perl seems to be going out) would handle 
> two servers, both e.g. http://id.example.org/dahut and 
> http://rdf.example.org/dahut . The former would be the URI of the actual 
> thing, the latter an information resource about it. The actual data would 
> be in an RDF database.
> 
> If a client chooses to dereference http://id.example.org/dahut, the server 
> would internally a do a DESCRIBE on the Request-URI and if it returns a 
> result, cache the result, and respond with a 303 with 
> Location: http://rdf.example.org/dahut which would return 200 with the 
> already (mem)cached result. If the DESCRIBE returned no result, the server 
> would return a 404.

I've put what I hacked up onto github:

http://github.com/kasei/perlrdf/blob/master/RDF-LinkedData/lib/RDF/LinkedData.pm

Some initial thoughts:

- I'm not using DESCRIBE (or RDF::Query at all), but it does a very simple bounded description on outgoing links. The bounded description stuff is based on unreleased (but in git) RDF::Trine code.

- The URLs used look like http://example/thing, http://example/thing/page, and http://example/thing/data.

- I'd be happy for this package to also include a non-mod_perl implementation, but I'm mostly interested in mod_perl for now (and so would consider changing the name of the module to ::LinkedData::ModPerl or something).

I've got a sample server running this code and serving some data.gov data here:

http://myrdf.us/datagov/dataset/957/reactor/vermont_yankee

Anyone have thoughts on the path of least resistance for doing the HTML generation? Template Toolkit?

.greg



More information about the Dev mailing list