[plt-scheme] Implementing web services

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Aug 10 10:49:35 EDT 2007

Anton has a good take on this:

  http://ll4.csail.mit.edu/slides/rest-slides.pdf

My view is, IIRC, the same. :-)

Web services (designed to be accessed from programs) are slightly
different to web applications designed to be used by humans.  The
former don't have back buttons and can reasonably be made to enter
large amounts of data at once.  This reduces the need to store state
on the server.  When looking at web apps, state tends to be either:

  - global to all browser windows and long lived.  E.g. login information

  - local to a browser window and short lived.  E.g. details of the
current flight on an airline search application

The former is best handled by cookies, the later by continuations.
Note that many pages don't have any local state and so needn't consume
memory on the server.

So essentially:

In a REST every URL (entry point / API call) is atomic -- it does one
thing and that action finishes as soon as the response is served

A more nuanced view allows some actions to extend over multiple
client/server interactions.  Continuations are good for these cases.

N.

On 8/10/07, Grant Rettke <grettke at acm.org> wrote:
>
> Noel what is your take on the REST style implementation of services?
>
> I heard a presentation on it a few nights ago.


Posted on the users mailing list.