[Haskell-cafe] understanding cloud Haskell serialization
Alberto G. Corona
agocorona at gmail.com
Thu Sep 11 08:36:30 UTC 2014
Hi Felipe:
plainly speaking, it stores and send a pointer, it is not necessary to
serialize the code. It just send the pointer, since all the copies of the
program are the same in all the nodes. The code to be called is at the
same address in the other node. That is the reason why the closures must be
in a static address.
2014-09-11 5:50 GMT+02:00 felipe zapata <tifonzafel at gmail.com>:
> Dear Cafe,
> I'm trying to understand the implementation of Cloud Haskell, specially
> the closures. According to the documentation, the serialization of a
> function uses a map from Label to values (RemoteTable), where Remotable is
> implemented as:
>
> newtype RemoteTable = RemoteTable (Map String Dynamic)
>
> Where Dynamic is given by,
>
> data Dynamic = Dynamic TypeRep GHC.Any
>
> The question is then, How does this Dynamic data type encodes functions?
> And how is related this Dynamic type to the decoder function?
>
> closure :: Static (ByteString -> a) -- Decoder
> -> ByteString -- Encoded closure environment
> -> Closure a
>
> Static provides two function, one function related to the label to lookup
> at the RemoteTable and one used for composition. But how is this related
> to Dynamic?
>
> Any guide will be appreciated.
>
> Felipe Z.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
--
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140911/50c6549f/attachment-0001.html>
More information about the Haskell-Cafe
mailing list