[plt-scheme] Continuations

From: Akhilesh Mritunjai (mritun.lists at gmail.com)
Date: Thu Nov 16 08:48:49 EST 2006

Thanks Matthew and Dr Krishnamurthi for your replies. I have been
studying the paper mentioned for about a week... haven't finished yet
:) (Great paper!!!)

C Stack is a bad news :( But anyways... there has to be a way.

I have been looking at transformations, but a transparent,
non-invasive scheme might be better in a long term... or it may not be
a issue at hand.

The context of the question is infact, PLT Scheme servlets. I
basically want to study feasibility of coming up with an enterprise
strength web development framework + DSL, which I know is a long shot
(but hell, what do I lose if I miss ?). My analysis, thus far, says
Scheme needs to come out of classrooms.

(DSL -> "invasive scheme may not be an issue")

The issues related to continuations are among other things -
persistence, load balancing and fail-over (ignoring the most powerful
one - easy development).

- Akhilesh

On 15/11/06, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> > I think others have worked on transforming programs (by CPSing and
> > making free variables explicit) to support serialized continuations,
> > but I'm not sure of the details.
> Matthew is pointing out that you can always CPS your program, but he's
> alluding, amongst other things, to this work, which does better:

>  Continuations from Generalized Stack Inspection
>  http://www.cs.brown.edu/~sk/Publications/Papers/Published/pcmkf-cont-from-gen-stack-insp/
>  Implementing first-class continuations can pose a challenge if the
>  target machine makes no provisions for accessing and re-installing
>  the run-time stack. In this paper, we present a novel translation
>  that overcomes this problem. In the first half of the paper, we
>  introduce a theoretical model that shows how to eliminate the
>  capture and the use of first-class continuations in the presence of
>  a generalized stack inspection mechanism. The second half of the
>  paper explains how to translate this model into practice in two
>  different contexts. First, we reformulate the servlet interaction
>  language in the PLT Web server, which heavily relies on first-class
>  continuations. Using our technique, servlet programs can be run
>  directly under the control of non-cooperative web servers such as
>  Apache. Second, we show how to use our new technique to copy and
>  reconstitute the stack on MSIL.Net using exception handlers. This
>  establishes that Scheme's first-class continuations can exist on
>  non-cooperative virtual machines.
> Perhaps something like this would be of value to you.
> Shriram

Posted on the users mailing list.