|Maintainer||Stefan Schmidt (firstname.lastname@example.org)|
Version : 0.1
This module offers distributed functions.
This idea behind this is to implement RPC based on DNodes. You specify a function which could be called from other programs and register this as a resource in your local DNode. Then the foreign DNodes can create a link to this function an execute it. The function parameters will be serialized and send to the local DNode. There the parameters are deserialized and the function will be called. After this the return-value will be send back to the calling node.
The DFunction datatype. This is more like a reference to a function located on a different node. You can call this function via the accessDFunction function.
Binary function typeclass. You can only use functions whose parameters and return value are serializable. The idea of this typeclass comes from the haxr library by Bjorn Bringert (http:www.haskell.orghaskellwikiHaXR)
creating and closing function references
Creates a new distributed function. Only functions which are registered at the local node can be called from the outside. The string parameter specifies the name of the function which could the used by other nodes to call it. If you leave it empty, a random name will be generated.
Created a reference to a function on a remote node. The first parameter is the name of the function, the second parameter is the name of the node.
Transforms a DFunction object to a normal function which could be called and passed around. Because you have network tranfer everytime you call the function, this might throw a DistributedException when the foreign node becomes unreachable.