[plt-scheme] Soft State in the PLT Web Server

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue May 19 04:55:23 EDT 2009

On Mon, May 18, 2009 at 10:19 PM, John Clements
<clements at brinckerhoff.org> wrote:
> BTW, this is related to an idea that I was thinking about a while ago w.r.t.
> debugging; state that cannot be recomputed, but which is not strictly
> necessary in order to complete the computation.  So, for instance, you might
> hold debugging information in such a way that it can be reclaimed if
> necessary, but at the cost of losing some debugging information.  This gives
> rise to a whole "spectrum of weakness"; that is: "Dear Mr. GC: you can
> reclaim this if you want, but I'd really rather you didn't."
>
> It sounds like this idea might also be applicable in a web framework, where
> you might want to prioritize weakness by the degree of difficulty of
> recomputing the given piece of information.

We kicked around this idea for continuation reclamation, but never did
anything about it as its easier to address via other means.

I characterised the problems as follows:

 - For each continuation you record the size s_i and probability it
will be invoked p_i
 - You have two cost functions, one with assigns a cost to total
memory consumption, and another the gives the cost of a user seeing a
continuation expiry message.
 - Optimize! (I.e. find best trade-off between expiring continuations
and memory consumption.)

This is a very open-ended problem as there are many ways to tackle it.

N.


Posted on the users mailing list.