The Sun BabelFish Blog
Don't panic !
RESTful Web Services: the book
RESTful Web Services is a newly published book that should be a great help in giving people an overview of how to build web services that work with the architecture of the Web. The authors of the book are I believe serious RESTafarians. They hang out (virtually) on the yahoo REST discuss newsgroup. So I know ahead of time that they will most likely never fail on the REST side of things. Such a book should therefore be a great help for people desiring to develop web services.
As an aside, I am currently reading it online via Safari Books, which is a really useful service, especially for people like me who are always traveling and don't have space to carry wads of paper around the world. As I have been intimately involved in this area for a while - I read Roy Fielding's thesis in 2004, and it immediately made sense of my intuitions - I am skipping through the book from chapter to chapter as my interests guide me, using the search tool when needed. As this is an important book, I will write up my comments here in a number of posts as I work my way through it.
What of course is missing in Roy's thesis, which is a high level abstract description of an architectural style, are practical examples, which is what this book sets out to provide. The advantage of Roy's level of abstraction is that it permitted him to make some very important points without loosing himself in arbitrary implementation debates. Many implementations can fit his architectural style. That is the power of speaking at the right level of abstraction: it permits one to say something well, in such a way that it can withstand the test of time. Developers of course want to see how an abstract theory applies to their everyday work, and so a cook book such as "RESTful Web Services" is going to appeal to them. The danger is that by stepping closer to implementation details, certain choices are made that turn out to be in fact arbitrary, ill conceived, non optimal or incomplete. The risk is well worth taking if it can help people find their way around more easily in a sea of standards. This is where the rubber hits the road.
Right from the beginning the authors, Sam Ruby and Leonard Richardson coin the phrase "Resource Oriented Architecture".
Why come up with a new term, Resource-Oriented Architecture? Why not just say REST? Well, I do say REST, on the cover of this book, and I hold that everything in the Resource-Oriented Architecture is also RESTful. But REST is not an architecture: it's a set of design criteria. You can say that one architecture meets those criteria better than another, but there is no one "REST architecture."
The emphasis on Resources is I agree with them fundamental. Their chapter 4 does a very good job of showing why. URIs name Resources. URLs in particular name Resources that can return representations in well defined ways. REST stands for "Representation of State Transfer", and the representations transferred are the representations of resources identified by URLs. The whole thing fits like a glove.
Except that where there is a glove, there are two, one for each hand. And they are missing the other glove, so to speak. And the lack is glaringly obvious. Just as important as Roy Fielding's work, just as abstract, and developed by some of the best minds on the web, even in the world, is RDF, which stands for Resource Description Framework. I emphasize the "Resource" in RDF because for someone writing a book on Resource Oriented Architecture, to have only three short mentions of the framework for describing resources standardized by non less that the World Wide Web Consortium is just ... flabbergasting. Ignoring this work is like trying to walk around on one leg. It is possible. But it is difficult. And certainly a big waste of energy, time and money. Of course since what they are proposing is so much better than what may have gone on previously, which seems akin to trying to walk around on a gloveless hand, it may not immediately be obvious what is missing. I shall try to make this clear in the series of notes.
Just as REST is very simple, so is RDF. It is easiest to describe something on the web if you have a URL for it. If you want to say something about it, that it relates to something else for example, or that it has a certain property, you need to specify which property it has. Since a property is a thing, it too is easiest to speak about if it has a URL. So once you have identified the property in the global namespace you want to say what its value is, you need to specify what the value of that property is, which can be a string or another object. That's RDF for you. It's so simple I am able to explain it to people in bars within a minute. Here is an example, which says that my name is Henry:
<http://bblfish.net/people/henry/card#me> <http://xmlns.com/foaf/0.1/name> "Henry Story" .
Click on the URLs and you will GET their meaning. Since resources can return any number of representations, different user agents can get the representation they prefer. For the name relation you will get an html representation back if you are requesting it from a browser. With this system you can describe the world. We know this since it is simply a generalization of the system found in relational databases, where instead of identifying things with table dependent primary keys, we identify them with URIs.
So RDF, just as REST, is at its base very easy to understand and furthermore the two are complementary. Even though REST is simple, it nevertheless needs a book such as "RESTful web services" to help make it practical. There are many dispersed standards out there which this books helps bring together. It would have been a great book if it had not missed out the other half of the equation. Luckily this should be easy to fix. And I will do so in the following notes, showing how RDF can help you become even more efficient in establishing your web services. Can it really be even easier? Yes. And furthermore without contradicting what this book says.
Posted at 06:09AM Jun 07, 2007 [permalink/trackback] by Henry Story in General | Comments[10]
Note on comments:
- I know the forms below are a little small. We have asked for years for this to be changed, but I don't think it's going to happen soon. In Apple's Safari you can resize the entry box with you mouse. For people using other browsers click on this javascript link, that should allow you to resize your form.
- Comments are moderated, so they will take a little time to appear. Currently moderation means I have to read them personally. Hopefully with OpenId deployment, this will become more automated.
- HTML markup no longer works here, due to some decision made somewhere. Sorry about that.
- If you are having trouble posting, it may be that you need javascript to be enabled. I don't think javascript should be needed for submitting a form, but that's the way it is here.
- Check your comments by using the preview button...


Posted by Kevin on June 07, 2007 at 10:37 AM CEST #
Posted by Jon Hanna on June 07, 2007 at 11:11 AM CEST #
Posted by Stefan Tilkov's Random Stuff on June 07, 2007 at 11:39 AM CEST #
And yet RDF is not simple at all. Taking your foaf card I'm look at the "knows" collection:
After transforming it into triples I can see that it creates
It's confusing that the three sybling nodes are predecates of the same anonymous item. After looking at your super simple example you'd expect something like:
The name, type, and other items are in the other foaf doc. in rdf we repeat ourselves a lot.
One thing I have found is that converting rdf into triples is helpfull in getting that simple feeling back. I'm still confused as to why we need rdfs subclass and then owl subclasses.
Taylor [ markup added by bblfish ]Posted by Taylor on June 07, 2007 at 08:51 PM CEST #
xxx relation [ = uri; other:rel "something"; ] .which is what I wanted all along. So I just rewrote the N3 which generates the rdf+xml and regenerated the rdf. If you now get the N3 you get a nicely readable format too.Posted by Henry Story on June 07, 2007 at 10:04 PM CEST #
Posted by Bill de hOra on June 08, 2007 at 12:15 AM CEST #
Posted by Alex James on June 08, 2007 at 02:06 AM CEST #
Posted by Roger Marin on July 31, 2007 at 05:16 PM CEST #
I wrote up an example in a recent post "RESTful Semantic Web Services". The first part of that post I am very confident of. The second part, relating to SPARQL queries is a research idea, so please be lenient :-)
There is a well known way to relate SOAP and RDF via OWL-S. But this requires people to know both RDF and SOAP, which does not make things simple enough in my opinion. The above article I think points to a way in which one can avoid SOAP completely, but that is an open research question. Have a look at that blog post, and let me know what you think.
Posted by Henry Story on July 31, 2007 at 07:00 PM CEST #
"It would have been a great book if it had not missed out the other half of the equation. Luckily this should be easy to fix. And I will do so in the following notes, showing how RDF can help you become even more efficient in establishing your web services."
I perused many other posts of your blog, but I was unable to find where you did the mentioned fix. Could you point the exact place or, alternatively, elaborate on this subject?
Posted by Marcio Faria on November 07, 2009 at 06:50 PM CET #