[Haskell-cafe] Serializing Functions and Actions for Distributed Programming

Jason Dagit dagit at eecs.oregonstate.edu
Sun Jul 30 15:12:40 EDT 2006

On 7/30/06, Einar Karttunen <ekarttun at cs.helsinki.fi> wrote:
> On 29.07 14:07, Brian Sniffen wrote:
> > I'm very excited by the ability to pass functions or IO actions
> > between threads of the same program.  But I don't see any language or
> > library support for doing so between programs, or between sessions
> > with the same program.  OCaml provides a partial solution:
> >
> > <http://caml.inria.fr/pub/docs/manual-ocaml/libref/Marshal.html>
> >
> > Though all it's really sending is an address and a hash of the binary
> > program.  Even SerTH doesn't help with functional types.  I seek the
> > knowledge of the Haskell Cafe: is there a reasonable way of addressing
> > this problem?
> There is sadly no real good way of doing it on top of GHC. If both
> sides are running an identical executable image one can hack it to
> work (see parallel Haskell for the code to do it). But in general
> I don't think it is worth the trouble. The problem is:
> 1) versioning (I like being able to upgrade applications while keeping serialized state)
> 2) trust (GHC does not have sandboxing)

Depending on the type of sandboxing that you need/want #2 might be
possible with GHC.  Take lambdabot for example.  lambdabot has made it
safe to allow arbitrary expression evaluation by disallowing IO and
not importing unsafePerformIO and similar "unsafe" functions.

Just a thought...

More information about the Haskell-Cafe mailing list