Posted
by
timothy
on Tuesday September 23, 2003 @11:00AM
from the tools-applied dept.

briandonovan writes "World Wide Web Consortium (W3C) Director Tim Berners-Lee and his compatriots would like to transform the current Web into a 'Semantic Web' where 'software agents roaming from page to page can readily carry out sophisticated tasks for users' using 'structured collections of information and sets of inference rules.' The Resource Description Framework (RDF), designed as a language for expressing information about resources on the Web, and allied technologies are the result to date of ongoing efforts at the W3C to furnish Semantic Web proponents with the requisite tools. While it's far too early to predict whether TimBL's grand vision will be realized, RDF/XML (the XML serialization of RDF) is already in widespread use, having been incorporated into a surprising array of applications." Read on below for briandonovan's link-stuffed review of O'Reilly's Practical RDF.

Great introduction to RDF, an assortment of tools and utilities for working with RDF, and some real-world applications.

RDF first hit my radar screen a couple of years ago while I was working on a barebones tool to manage my personal website. I was writing the code to generate RSS feeds ("What is RSS?") for my site and had to choose whether to support RSS 0.9x (non-RDF) or RSS 1.0 (RDF-based) or both. Long story short: I went with RSS 1.0 and was able to implement the feeds, but never got any further into RDF afterwards. I couldn't make headway through the RDF-related working drafts rapidly enough to justify the time that I was spending, there weren't any worthwhile-looking books available at the time, and the few online tutorials that I found were sorely lacking -- possibly because the specs themselves were still evolving as the RDF Core Working Group hashed out some remaining issues.

Fast forward a few years: the dust in RDF-land seems to be settling a bit (although new working drafts of all of the current RDF specs were released on September 5th, most of the changes from previous versions appear to be relatively minor) and, with the publication of Shelley Powers' Practical RDF: Solving Problems with the Resource Description Framework, there's finally a good book available on the subject.

Chapter 7, the first in the tools-focused portion of Practical RDF is dedicated to (mostly Java-based) editors, parsers, validators, browsers, etc. for desktop use. Next, she dives into Jena, the Java RDF toolkit that began life as the labor of love of HP Labs researcher Brian McBride before being elevated to the status of a formal HP Labs project under their Semantic Web Research umbrella. Another HP Labs Semantic Web project, Damian Steer's BrownSauce, a slick little Java-based RDF browser, was introduced back in Chapter7. Means for manipulating RDF/XML in Perl (RDF::Core, part of Ginger Alliance's PerlRDF project), PHP (RAP, the RDF API for PHP), and Python (RDFLib) are addressed in Chapter 9. RDF query engines/languages are taken up next -- rdfDB QL, the query language of R.V. Guha's rdfDB (written in C); SquishQL, implemented in the Java-based Inkling query engine (built atop PostgreSQL); RDQL, used within Jena; and Sesame, a JSP/Servlet querying engine that supports both RDQL and its own query language, RQL, and can be deployed atop MySQL or PostgreSQL. Powers rounds out this part of her book with a chapter that deals briefly with the leftovers. Drive, an RDF API for C#, is briefly discussed along with RDF APIs for less fashionable programming languages : Nokia's Wilbur for CLOS, XOTcl for Tcl, and RubyRDF for Ruby. Redland, an RDF toolkit written in C with Java, Perl, PHP, Python, Ruby, and Tcl wrappers, is covered at some length (about half a dozen pages) and a couple more are given over to Redfoot, a Python RDF framework consisting of RDFLib (mentioned earlier in the Perl/PHP/Python chapter), a small-footprint HTTP server (according to the changelog at redfoot.net, they're using Medusa), and a native scripting language called Hypercode that lives within CDATA blocks in RDF/XML (example).

The last third of Practical RDF is devoted to uses of RDF and begins with a chapter on the OWL Web Ontology Language, an extension to RDF that's designed to supply more constraints for RDF vocabularies than can be provided by RDF Schema alone. This chapter would have been better situated after Chapter 5, which addresses RDF Schema, and feels a bit out of place here. RSS 1.0, the RDF-based syndication format, gets a chapter all of its own, beginning with a short synopsis of the evolution of RSS and the rift between the RSS 0.9x/2.0 and RSS 1.0 camps, progressing through descriptions of the RSS elements, some discussion of the use of modules, RSS autodiscovery, and aggregators (Amphetadesk, Meerkat, and NetNewsWire are mentioned), and finishing with an example RSS file (a syndicated list of book recommendations), producing RSS 1.0 using the Informa RSS Library (a set of Java classes), and merging two RSS 1.0 files using the XML::RSS Perl module. Two "Applications Based on RDF" (commercial and noncommercial) chapters top off the book. Noncommercial applications of RDF are visited first : Mozilla, where history and bookmarks, among other classes of information, are stored in RDF; the Creative Commons licensing scheme, whose proponents encourage content creators to embed RDF snippets into their documents and applications to provide information about the work itself and the restrictions placed on its reuse under the particular CC license that they've chosen; a Java and PostgreSQL based digital library system jointly developed by MIT and HP that uses RDF; and FOAF (Friend-of-a-Friend), an RDF vocabulary designed to express personal information and interpersonal relationships. Among the list of commercial applications utilizing RDF that comprises the final chapter in the book is Chandler, the same as yet very-alpha personal information manager that's managed to garner multiplementions on this site.

The Verdict

The real meat of Practical RDF, for me, was in Chapters 1 through 6 (plus the OWL chapter, Chapter 12). This is not to say that the material in the last 2/3 of the book isn't useful or interesting. The section on RDF software tools is a great annotated survey of what's out there right now ... and I would imagine that installing and testdriving each of the software applications featured in those chapters must have been an extremely time-consuming process. The chapters describing real-world applications of RDF could be useful to someone trying to convince a manager that RDF is a viable, widely-used technology. Given a choice, though, I would rather have seen those pages spent on additional coverage of RDF, RDFS, and OWL with more example RDF vocabularies developed (like PostCon, which the author formulated, then refined through RDFS and OWL). The displaced material could have been made available online at the author's site for the book. A lot of that information will become less accurate over time as the software evolves and people come up with more applications for RDF anyway.

All nitpicking aside, though, if you're looking for a book on RDF, then you can't go wrong with Shelley Powers' Practical RDF.

RDF is quite pratical - with or without the book. There are several hundred websites explaning how to use RDF in your application. There are classes for JAVA/PHP etc for this purpose.
A interesting use of RSS is to integrate it with the IMAP, and get the latest email show up on your portal page.

the OWL Web Ontology Language, an extension to RDF that's designed to supply more constraints for RDF vocabularies than can be provided by RDF Schema alone

Er...no. OWL allows you to define relationships between different RDF vocabularies. It has nothing to do with RDF Schema and sounds like it is in the correct place in the book. Please read this chapter again more carefully.

For a research project I've actually been doing a bit of reading about RDF and OWL yesterday. When you do, you occasionally come across these types of remarks.

> java + XML = demand for 4+ghz CPUs

Let's make one thing clear: RDF is not an instantiation of the XML syntax. You can use XML to transfer RDF statements, but for reasoning other, internal, representations are to be preferred.

As I'm working on a Prolog project that needs RDF I use the SWI-Prolog RDF library, which, according tothis recent paper (pdf)* [psy.uva.nl] speeds up processing 22 folds compared to using the RDF/XML serialization syntax. Please note that Mozilla uses Prolog+RDF as well.

I enjoyed this book review - useful, and the links to tools are useful.

One tool not mentioned: the semantic web library for
Swi-Prolog [swi-prolog.org]
that provides a high level toolkit for dealing with RDF, Owl, etc. Since the hoped-for use of RDF is applications that make logical inferences, Prolog seems like a good language to use:-)

The Jena and Sesame packages are written in Java and also are very good tools.

The big problem is getting people to use RDF - this technology can only be useful if enough people use it (think FAX machines).

I believe that the earliest large scale adoption of Semantic Web technologies will really be on company LANs and be used for organizing company/.organizational information.

Think of shifting from information technology to knowledge management technology.

Ahem. Could you please elaborate more on this? If I am not mistaken RDF is good for creating links to physical resources with a certain kind of criteria that can be shared between different kind of applications.

What you are describing is the most common and original application of RDF--streaming content. RDF itself is also an XML-compatible syntax and a schema (box and arrow diagram) for that syntax. The intended interpretation of the syntax is the description of "models". That is, the RDF is a metamodel and its schema is a meta-metamodel.

Think of it like a for layer model. You have your message (data), the structure of your message (metadata), the structure of your metadata (RDF), and the structure of RDF (RDF schema). Why 4 layers? Because everyone gets tired after 3--you don't need more than pointer to pointer to void in C: **mydata. Data plus two levels of abstraction is enough--you reach closure since a pointer to a pointer is still a pointer.

Of course data describing data is also data, so you could stop at three levels. But everyone likes to think about models, not data, so you get three levels of models. RDF Schema is just a model for describing metamodels. Nothing to do with content at all, except as an application.

Sorry, I have to disagree with this, having developed ontologies in both DAML and OWL. Both build on RDF and RDF Schema. An OWL ontology uses subClassOf, subPropertyOf, domain, range, et al out of the rdfs (RDF Schema) namespace.