On RESTful programming @ QCon London 2008

Posted by Michael Hunger on Mar 13, 2008 in code, conference |

As the Haskell session with Lennart Augustsson was unfortunately canceled, Mathias and I decided to attend the Architectural Implications of RESTful design talk by Peter Rodgers of 1060research. It was very insightful.

The basic principles of the talk were:
1) all resources are named by an URI
2) resources are immutable and copied
3) you can construct arbitrary URI which present a computation and use other URIs as parameters
(e.g. active:imageOperation+operation@fllcc:/doc/rotate45.xml+image@http://imageurl)

With these precodition Peter showed a kind of functional programming approach. You just write (or have tools write) your programm (function, expression) as a cascade of URIs.

It was a real eye-opener, just like in a functional programming languages your functions don’t have sideeffects and therefore an URI presenting an expression is always referrring to the same value (as long as the resources used are really immutable, one may propagate changes). So it is very easy to cache them based on usage count and expensiveness of computation. Even with a very limited dynamic cache this kind of program runs faster that the traditional imperative one which is recomputed over and over.

Another advantage is that you address cross cutting concerns by partitioning the address space of the URIs and putting zones around them which contain the aspects (AOP, e.g. security, transactions).

So with a very simple approach and a powerful runtime used for routing, caching and executing or retrieving the resources pointed to by the URIs – NetKernel it’s another tool in our polyglot language toolbelt.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • Netvibes
  • PDF
  • Ping.fm

Tags:

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2007-2012 Better Software Development All rights reserved.
Multi v1.4.5 a child of the Desk Mess Mirrored v1.4.6 theme from BuyNowShop.com.