[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Y Store /Closures



On Sat, 1 Mar 2003, Daniel Weinreb wrote:

> Now, here's what I want to know. Suppose you want to write a web app
> that maintains state between clicks in the fashion I've been describing,
> but you don't want all that state to be lost in case there is a reboot
> or power failure or crash. In the event-driven style, the state can be
> stored persistently, in a file or database system, so that when the next
> HTTP request comes along, you can pick up where you left off, but in a
> conventional language-with-continuations scenario, the continuation
> state is all in virtual memory and lost when there's a crash.  What can
> anyone recommend?

This is actually just a problem of marshalling continuations. If you can
arrange to be able to do that (hopefully space-efficiently!), you can just
have your web server or CGI script marshall any continuation it'll need to
keep around and stash it on the outgoing webpage or in a database
somewhere. At that point you're in the same world that traditional
solutions are in, so crash-recovery/load-balancing/etc ought to work just
as well. See Graunke et al., "Automatically Restructuring Programs for the
Web" (http://www.ccs.neu.edu/scheme/pubs/ase2001-gfkf.ps.gz) which
describes a technique, though the paper is written with a
small-to-mid-size rather than an enterprise-level website in mind.

-jacob