Authors: Igor Kopestenski (igor.kopestenski@uclouvain.be) [web site: https://github.com/achlysproject/achlys].
task() = #{name => atom(), targets => task_targets(), execution_type => task_execution_type(), function => function()}
task_execution_type() = bitstring()
task_targets() = [node()] | bitstring()
bane/1 | Returns the aggregates for the given variable as seen by the current node. |
bane_all_preys/1 | Returns the aggregates for the given variable as seen by the current node for all nodes. |
bite/1 | Adds the given task in the replicated task set. |
clusterize/0 | Attempts to discover and join other neighboring nodes. |
contagion/0 | Form Lasp cluster without attempting to ping neighbors beforehand. |
declare/4 | Shortcut function exposing the utility function that can be used to pass more readable arguments to create a task model variable instead of binary strings. |
gc/0 | Performs a VM-wide garbage collection. |
get_all_tasks/0 | Returns current view of all tasks. |
get_preys/0 | Returns a list of known remote hostnames that could be potential neighbors. |
join/1 | A shortcut function that performs a join operation on a Partisan node. |
light/0 | |
members/0 | Returns the local view of the Lasp cluster membership. |
mintemp/0 | |
pandemia/0 | Close disterl TCP connections with neighboring nodes. |
rainbow/0 | |
start/0 | Start the application. |
stop/0 | Stop the Application. |
venom/0 | Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable. |
venom/1 | Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable. |
bane(Data::atom()) -> list()
Returns the aggregates for the given variable as seen by the current node.
bane_all_preys(Data::atom()) -> list()
Returns the aggregates for the given variable as seen by the current node for all nodes.
bite(Task::achlys:task()) -> ok
Adds the given task in the replicated task set.
This function allows users to propagate previously
created tasks using achlys:declare/4
. The Achlys
application maintains a working set for the task
model that is a Grow-Only Set Lasp CRDT variable.
See also: achlys_task_server:add_task/1.
clusterize() -> [atom()]
Attempts to discover and join other neighboring nodes.
contagion() -> {ok, []} | {ok, [map()]}
Form Lasp cluster without attempting to ping neighbors beforehand.
declare(Name::atom(), Targets::[node()] | all, ExecType::single | permanent, Func::function()) -> task() | erlang:exception()
Shortcut function exposing the utility function that can be used to pass more readable arguments to create a task model variable instead of binary strings. The ExecType argument can currently not provide a transient mode, a task is executed either once or permanently. Removing the task from the CRDT does not prevent nodes to keep executing it. But similar behavior can be created with a single execution task that specifies a function with several loops. However this does not allow the worker to have full control over the load, since backpressure can be applied by spawning a process that executes a permanent task at a controlled frequency that can be based on any stress parameter. Meanwhile a single execution task could possibly overload the worker, as iterations are embedded inside a single process.
When Grow-only Counters and Sets are used, the transient can be achieved using Lasp's monotonic read function to have a distributed treshold.
Example usage in an Erlang shell :
> Name = mytask. > Targets = all. > ExecType = permanent. > F = fun() -> io:format("hello world ~n", []), timer:sleep(5000) end. > Task = achlys:declare(Name, Targets, ExecType, F).The variable Task is now named
mytask
,
is intended to run on all nodes in the cluster, and
will run function F in permanent cycles.
gc() -> any()
Performs a VM-wide garbage collection.
get_all_tasks() -> [achlys:task()] | []
Returns current view of all tasks.
get_preys() -> any()
Returns a list of known remote hostnames that could be potential neighbors.
join(Host::atom()) -> {ok, atom()} | {error, atom(), atom()}
A shortcut function that performs a join operation on a Partisan node.
Example in an Erlang shell :
> achlys:join('achlys@grisp_node_1').
Is equivalent to :
> lasp_peer_service:join('achlys@grisp_node_1').
light() -> erlang:function()
members() -> any()
Equivalent to lasp_peer_service:members().
Returns the local view of the Lasp cluster membership.
mintemp() -> erlang:function()
pandemia() -> ok
Close disterl TCP connections with neighboring nodes.
rainbow() -> erlang:function()
start() -> ok
Start the application.
stop() -> ok
Stop the Application
venom() -> ok
Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.
venom(Worker::atom()) -> ok
Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.
Generated by EDoc