unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Chaos Eternal <chaoseternal@shlug.org>
To: guile-devel <guile-devel@gnu.org>
Subject: discussion: serialize procedures and continuations
Date: Thu, 15 Aug 2013 21:47:52 +0800	[thread overview]
Message-ID: <CAGyY8NufzfsuY3oqPT4ECzrE0wqAss=qthjvE1+CW2__FjuqAA@mail.gmail.com> (raw)

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	other threads:[~2013-08-15 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 13:47 Chaos Eternal [this message]
2013-08-17 12:55 ` discussion: serialize procedures and continuations Ludovic Courtès
2014-03-23 20:25 ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGyY8NufzfsuY3oqPT4ECzrE0wqAss=qthjvE1+CW2__FjuqAA@mail.gmail.com' \
    --to=chaoseternal@shlug.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).