Showing posts with label unthreaded. Show all posts
Showing posts with label unthreaded. Show all posts

27 February 2010

Most RESTful reading

A co-worker has been using "Protocol State Machines" as a way to describe RESTful architectures a lot lately so I started Googling around a bit. This turned into a few days worth of reading arbitrary articles. I am always surprised by how much of this discussion I missed over the past few years.

It all started with CRUD is bad for REST over at SOA Zone. Interestingly enough, this quoted an post that I read a few years ago by Tim Ewald. As an aside, Tim is the aforementioned "co-worker". Another interesting note is that I scrawled something similar on an office whiteboard a little while back "REST is not CRUD" based on a former weekend spent reading similar topics. But I digress.

Tim's post lead to a response entitled "My Bow-Legged Master" by Bill de hÓra that is equally well written. Next I went on to a hilarious linked post by Ryan Tomayko about scalability and LAMP. Ryan posted about the evils of multi-threaded programming in an earlier entry named Unicorn is UNIX which I liked very much. I'll get back to this in a second. Somewhere in the web of documents, I came across "RETRO: A (hopefully) RESTful Transaction Model" which is a lot more than I feel like digesting on a Saturday morning with my coffee. It looks like a very interesting post from the middle of last year by Alexandros Marinos. Save it as a bookmark and come back to it I guess...

The RETRO discussion blog contained an interesting link in the blog list that caught my eye. It was a presentation from PyCon 2010 entitled "Threading is not a Model". If you have some time to burn, check out the various talks from PyCon. They are interesting even if you are not a Python person. You should definitely listen to Dude, Where's my Database?. This is not directly related to REST. Threading and REST an inextricably linked (more later) but this presentation did not directly hit on it. However, it is a really clear description of why threading is not really such a good idea all of the time. Back to that RESTful thing now...

For some reason the post from Ryan evoked my memory of his Unicorn post. When I read this a few months back, it set off a storm in my head. This reminded me of a similar article that I read years back named "The Problem with Threads". This is all starting to come together for me.

RESTful thinking is all about Shared Nothing architectures and stateless clients. The complexity of multi-threaded programming is just another instance of the same shared state problem that RESTful thinking is trying to dissuade us away from. Many people see relational databases as a similar exposition of the shared data problem - I believe that this is where a lot of the NoSQL stuff is coming from. Anyway... I'm starting to see a lot of commonality between RESTful/Shared-nothing architectures and the multiprocess programming instead of multithreaded programming. That's more than enough for one morning of reading.