Configuration module

Author(s): Arsen Kostenko.

This is the initial system-wide configuration storage module. All the configurations stored here are represented by command-line arguments or corresponding terms, depending on the server launching style.

Documentation on exports

PREDICATE
Get/check power of currently running DHT. Hash function has (2**m) values, therefore hash_power/1 returns/checks m.

Usage 1:hash_power(Power)

Bound Power to value of currently running DHT power.

  • The following properties should hold at call time:
    (term_typing:var/1)Power is a free variable.
  • The following properties should hold upon exit:
    (basic_props:int/1)Power is an integer.

Usage 2:hash_power(Power)

Check whether Power is equal to power of the currently running DHT.

  • The following properties should hold at call time:
    (basic_props:int/1)Power is an integer.

PREDICATE
Set initial power of hash function.

Usage:dht_set_hash_power(Power)

Set m for (2**m) formula.

  • The following properties should hold at call time:
    (basic_props:int/1)Power is an integer.

PREDICATE
Get/check server to client communication port.

Usage 1:dht_s2c_port(Port)

Set value of Port to currently used port number for server-to-client communication.

  • The following properties should hold at call time:
    (term_typing:var/1)Port is a free variable.
  • The following properties should hold upon exit:
    (basic_props:int/1)Port is an integer.

Usage 2:dht_s2c_port(Port)

Check whether value of Port is equal to currently used port number for server-to-client communication.

  • The following properties should hold at call time:
    (basic_props:int/1)Port is an integer.

PREDICATE
Set port for server-to-client communication.

PREDICATE
Get/check number of threads for server-to-client communication.

PREDICATE
Set number of threads for server-to-client communication.

PREDICATE
Get/check server-to-server communication port.

PREDICATE
Set server-to-server communication port.

PREDICATE
Get/check number of threads for server-to-server communication.

PREDICATE
Set number of threads for server-to-server communication.

PREDICATE
Get/check address of the host to join.

PREDICATE
Set address of the host to join.

PREDICATE
Get/check node number of current server.

PREDICATE
Set node number of current server.

PREDICATE
Get/check address of the current server

PREDICATE
Set address of the current server