guile-devel
[Top][All Lists]
Advanced

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

discussion: serialize procedures and continuations


From: Chaos Eternal
Subject: discussion: serialize procedures and continuations
Date: Thu, 15 Aug 2013 21:47:52 +0800

In Scheme, procedures are closures, that means it has the code of the
procedure itself as well as the required environment for running that
procedure. And, mostly, continuations are considered closure.

Hence, it is reasonable to expect a way to serialize the closures to
disks and/or remote machines over network.

Usage:
Stored procedures can be restored later or restored remotely which
makes remote procedure call more easier.
Problems are when these procedures contain reference to object outside
the scheme, say, opened fds, acquired locks/mutexes these objects will
lost. But hooks can be added to overcome these problems.

Stored continuations can restored later to make program continue to
running after system failure, or, in web application, can be used to
finish a user transaction. also, stored continuations can be
transferred to remote hosts to make process-migration. still hooks are
needed when programmer need to deal with opened files and so on.

existing implementations:
Gambit-C: the termite module of gambit-c heavily depends on
serializable closures to have functions like remote process call,
process migration and remote spawn.
chicken: chicken has termite port and also has these function implemented.

I am porting termite to guile. that's why I am interesting in this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]