Distributed v0.1.1 Distributed.Replicator.Node View Source

The functions in Distributed.Replicator.Node module helps to replicate an event by processing it on the all nodes in the network. In Distributed.Replicator.Node, functions execute processes in parallel.

Note: Since this module is only a wrapper for Node module, there is no need to write a detailed documentation for this module. Please check documentation of the Node module; you can basically think that the functions of the module run on every single node without specifying nodes, and you will be replied with a list of results of the processes.

Link to this section Summary

Functions

Monitors the status of nodes. If flag is true, monitoring is turned on. If flag is false, monitoring is turned off. For more information, see Node.monitor/2 and Node.monitor/3

Tries to set up connections to nodes

Returns the PIDs of new processes started by the application of fun on nodes. See Node.spawn/2 and Node.spawn/3

Returns the PIDs of new processes started by the application of module.fun(args) on nodes. See Node.spawn/4 and Node.spawn/5

Returns the PIDs of new linked processes started by the application of fun on nodes. See Node.spawn_link/2

Returns the PIDs of new linked processes started by the application of module.function(args) on nodes. See Node.spawn_link/4

Link to this section Functions

Link to this function monitor(flag, opts \\ []) View Source
monitor(flag :: boolean, opts :: [any]) :: [true]

Monitors the status of nodes. If flag is true, monitoring is turned on. If flag is false, monitoring is turned off. For more information, see Node.monitor/2 and Node.monitor/3.

Link to this function ping(opts \\ []) View Source
ping(opts :: [any]) :: [:pong | :pang]

Tries to set up connections to nodes.

Link to this function spawn(fun, opts \\ []) View Source
spawn(fun :: (() -> any), opts :: [any]) :: [pid | {pid, reference}]

Returns the PIDs of new processes started by the application of fun on nodes. See Node.spawn/2 and Node.spawn/3.

Link to this function spawn(module, fun, args, opts \\ []) View Source
spawn(module :: module, fun :: atom, args :: [any], opts :: [any]) :: [pid | {pid, reference}]

Returns the PIDs of new processes started by the application of module.fun(args) on nodes. See Node.spawn/4 and Node.spawn/5.

Link to this function spawn_link(fun, opts \\ []) View Source

Returns the PIDs of new linked processes started by the application of fun on nodes. See Node.spawn_link/2.

Link to this function spawn_link(module, fun, args, opts \\ []) View Source
spawn_link(module :: module, fun :: atom, args :: [any], opts :: [any]) :: [pid]

Returns the PIDs of new linked processes started by the application of module.function(args) on nodes. See Node.spawn_link/4.