[plt-scheme] web programming, continuation, CPS transform, etc.

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Apr 30 17:52:32 EDT 2007

On Apr 30, 2007, at 5:24 PM, Yin-So Chen wrote:

> Hi all -
>
> I ran across the paper http://www.ccs.neu.edu/scheme/pubs/ase2001- 
> gfkf.pdf (Automatic Restructuring Programs for the Web) and am very  
> intrigued by its findings.  I have suspected that a continuation- 
> based web server has scalability limitations described by the  
> paper, and the paper for me provided the aha answer, until I read a  
> subsequent paper that also talks about CPS not being the nirvana  
> ( http://www.ccs.neu.edu/scheme/pubs/icfp05-pcmkf.pdf).  I am still  
> digesting the second paper as it far stretches my theoretical  
> knowledge, but I am wondering about the followings:
>
> 1) Although these paper were published a while ago, it seems that  
> the findings have not made their way into PLT web server  
> implementation - is that correct?  i.e. I want to confirm that the  
> limitation described in the papers still exist in PLT web server  
> (at least as of v360).

The Web server moved to Brown (Graunk to Jay) but Brown moved to  
other things. Pettyjohn moved after his MS and I haven't found a  
student who is interested in taking this on as a research project. In  
a sense Ja owns it.


> 2) None of these paper actually publish the implementations - I am  
> curious if the implementations are available somewhere?  If they  
> are not for whatever reasons, I understand, but just want to know  
> if it was my own inability to find the source (but definitely  
> interested to study how it's done, see #3).

The closest to a paper-based explanation of the existing Web server  
is in Graunke et al (http://www.ccs.neu.edu/scheme/pubs/#esop2001- 
gkvf) which has morphed into a journal paper (http://www.ccs.neu.edu/ 
scheme/pubs/#hosc-07).


> 3) Are there good links/pointers/implementations on CPS and ANF  
> transformation?  I can't find a good description of ANF (my google  
> terms are probably wrong).  With CPS I can find techniques from  
> readscheme, but they appear more for manual transformation.  For  
> automated transformation it seems that the transformer must know  
> scheme well ( i.e. knowledge of if, cond, let, etc) and appears  
> very complex, and it also seem like operations like map, loop, or  
> error handling are very difficult to transform into CPS.


See http://www.ccs.neu.edu/scheme/pubs/#fsdf-pldi for the paper that  
introduced ANF. Theoretically it was discovered in Sabry-Felleisen  
[LISP 92].


> 4) Is PLT web server moving toward the paper's findings?  If not,  
> why not?


Partly due to manpower. See above. To some extent, we really need to  
design a full-fledged web language based on Scheme that makes good  
use of continuations.

At the same time, AJAX has relieved the need for many uses of  
continuations. So perhaps this research has explored as much as  
possible and will need to be resumed when the dust has settled on the  
(limittations of) AJAX.

-- Matthias




> 5) I am sure to have many follow-ons, but don't want to overwhelm  
> the list with questions ;)
>
> Thanks,
> yinso
>
>
> -- 
> http://www.yinsochen.com
> ...continuous learning...
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.