[Haskell-cafe] Can this be done?
sylvan at student.chalmers.se
Wed Feb 11 08:53:56 EST 2009
On Wed, Feb 11, 2009 at 1:41 PM, Cristiano Paris
<cristiano.paris at gmail.com>wrote:
> On Wed, Feb 11, 2009 at 2:30 PM, Peter Verswyvelen <bugfact at gmail.com>
> > I haven't looked at the details, but I think this is what a library like
> > Reactive from Conal Elliott could do, but as far as I understand it, it
> > still work in progress.
> I'm interested in the possibility of
> stopping/pickling/unpickling/resuming a computation.
I think that would be difficult. You could probably store the continuation
in a server-side cache if you aren't doing CGI but have a persistent server
process, but eventually you'll need to discard unused continuations to avoid
running out of memory. You may be able to use a WASH style continuation
model in conjunction with this. So you store the session logs on disk, and
if the continuation does not exist in memory you'd fetch the session log
from disk, replay the whole session from that, and reproduce the
continuation that way. That way most sessions would just work directly off
of the cache and never touch disk, but if someone waits too long (or, say,
bookmarks a page in the middle of the session!) there's still a fallback
stored on disk.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe