Programming the Semantic Web

Author: Toby Segaran , Colin Evans, and Jamie Taylor
Publisher: O'Reilly, 2009
Pages: 298
ISBN: 978-0596153816
Aimed at: Anyone involved in the design and development of Web 3
Rating: 4
Pros: Good explanation of the ideas with examples
Cons: Raises lots of questions about future of Web 3 
Reviewed by: Mike James

The semantic web is a simple idea that is capable of being turned into something very complex by over-theorising. This book aims to explain the ideas and illustrate the sorts of practical programming things that can be achieved.

It starts off with the basics – that a semantic data structure is a graph that can be broken down into triples – object, predicate and subject. It then explains how RDF can be used to describe triples and indeed complete semantic networks.

From here things proceed by simple examples of how RDF models can be serialised using RDF/XML and alternatives and how existing semantic databases can be used.

The big problem is that the idea is simple but talk of semantics and ontologies can make it sound complicated. There is also the problem that the basic idea is wrapped up in so many layers of standards, languages and tool kits that it can seem like an over-complex mess.

All of the examples in this book are in Python, as are the most of the tools described. The examples are fairly obvious and don’t particularly give a clue as to how the semantic web might actually prove to be useful. We have a film database and an implementation of the well known “Six degrees of Kevin Bacon” game to illustrate the searching and general processing of graphs. Other examples include the Friend-of-a-Friend type database, which is fun but again fairly obvious, and not particularly general. Where are the killer applications for the semantic web?

The authors cover RDF and its possible serialisations they explain SPARQL, the semantic form of SQL, but only up to Version 1. They also deal with modelling and frameworks such as Sesame and tools such as graphviz – mostly in Python but with some Java. The big problem is that the subject is so new that there isn’t any promise that any of the toolkits or utilities has a long life ahead of them.

It is also true that when working with semantic data modelling decisions that seem good in the initial phases only really become clearly insufficient, because they result in incorrect inferences, later on when lots of data has been added. The book has little to say on this subject and we probably need some new technologies to allow semantic data to be refactored easily or better to allow the inevitable false inferences to automatically refactor the structure.

Occasionally you get the feeling that the models being built are far from good and that they are simply being presented as illustrations rather than something you might attempt to use in the real world. The book does cover importing legacy relational database data into an RDF graph and this is useful. Even the final example, a job website, doesn’t really convince that semantic data is going to have an important role in the very near future.

When you strip away the hype and the philosophy what we have is the fairly standard and traditional use of data structures to represent complicated data and the corresponding processing algorithms. While the book does a lot to introduce the beginner to the jargon and technologies of the semantic web, it doesn’t go far enough. On the other hand, if you want a practical introduction and are happy using Python this might be for you.

Last Updated ( Tuesday, 06 October 2009 )