[Haskell-cafe] Serializing Functions and Actions for Distributed
ekarttun at cs.helsinki.fi
Sun Jul 30 05:10:02 EDT 2006
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:
> 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)
YHC may have an answer for YHC users.
I have some code which allows one to register functions and call them
transparently over a network - even supporting callbacks. Thus code
does not move, but code location is quite transparent.
- Einar Karttunen
More information about the Haskell-Cafe