Module achlys

Top level module operating the achlys application as well as providing the main API to the underlying components.

Authors: Igor Kopestenski (igor.kopestenski@uclouvain.be) [web site: https://github.com/achlysproject/achlys].

Description

Top level module operating the achlys application as well as providing the main API to the underlying components.

Data Types

task()

task() = #{name => atom(), targets => task_targets(), execution_type => task_execution_type(), function => function()}

task_execution_type()

task_execution_type() = bitstring()

task_targets()

task_targets() = [node()] | bitstring()

Function Index

bane/1Returns the aggregates for the given variable as seen by the current node.
bane_all_preys/1Returns the aggregates for the given variable as seen by the current node for all nodes.
bite/1Adds the given task in the replicated task set.
clusterize/0Attempts to discover and join other neighboring nodes.
contagion/0Form Lasp cluster without attempting to ping neighbors beforehand.
declare/4Shortcut 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/0Returns current view of all tasks.
get_preys/0Returns a list of known remote hostnames that could be potential neighbors.
join/1A 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/0Close disterl TCP connections with neighboring nodes.
rainbow/0
start/0Start the application.
stop/0Stop the Application.
venom/0Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.
venom/1Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.

Function Details

bane/1

bane(Data::atom()) -> list()

Returns the aggregates for the given variable as seen by the current node.

bane_all_preys/1

bane_all_preys(Data::atom()) -> list()

Returns the aggregates for the given variable as seen by the current node for all nodes.

bite/1

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/0

clusterize() -> [atom()]

Attempts to discover and join other neighboring nodes.

contagion/0

contagion() -> {ok, []} | {ok, [map()]}

Form Lasp cluster without attempting to ping neighbors beforehand.

declare/4

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/0

gc() -> any()

Performs a VM-wide garbage collection.

get_all_tasks/0

get_all_tasks() -> [achlys:task()] | []

Returns current view of all tasks.

get_preys/0

get_preys() -> any()

Returns a list of known remote hostnames that could be potential neighbors.

join/1

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/0

light() -> erlang:function()

members/0

members() -> any()

Equivalent to lasp_peer_service:members().

Returns the local view of the Lasp cluster membership.

mintemp/0

mintemp() -> erlang:function()

pandemia/0

pandemia() -> ok

Close disterl TCP connections with neighboring nodes.

rainbow/0

rainbow() -> erlang:function()

start/0

start() -> ok

Start the application.

stop/0

stop() -> ok

Stop the Application

venom/0

venom() -> ok

Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.

venom/1

venom(Worker::atom()) -> ok

Collect data based on sensors available on Pmod modules and store aggregated values in corresponding Lasp variable.


Generated by EDoc