How it works...
In this recipe, we uses the simplelocalnet backend to start both master and slave nodes. We then created a table using template Haskell based on the remoteable macro. In this table, we registered all the functions (resulting in Process) that need to be serialized across.
Cloud Haskell uses the static pointer extension, which allows Cloud Haskell to find a fingerprint of a function and then compose the serializable arguments along with the fingerprint. On the remote node, using the information contained in the closure, it is possible for the remote node to recreate the function call with arguments. The static pointer extension, however, can only be used for rank-1 types. For higher ranks, Cloud Haskell converts it in to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access