Top-level interface to a DHT server

Author(s): Arsen Kostenko.

Usage and interface

Documentation on exports

PREDICATE
main/1: start the DHT server. Here is a step-by-step bahavior:
  1. set all values of dht_config.pl module to default.
  2. modify those, for which command-line arguments were supplied.
  3. modify server number separately, since it depends on two command-line arguments : --server-id and --hash-power.
  4. output resulting values to terminal.
  5. start client side communication by executing dht_s2c:dht_s2c_mian/0.
  6. start server side communication by executing dht_s2s:dht_s2s_mian/0.

Usage:dht_server(Arguments)

  • The following properties should hold at call time:
    (dht_server:dht_arguments_list/1)Arguments is associated with simple list, that represents pairs of command line arguments (argument and its value). Possible values are: --join-host, --hash-power, --server-id, --s2c-port, --s2c-threads, --s2s-port, --s2s-threads. All of the arguments (except --join-host) accept integer values. In case of --join-host value of argument should be equal to IP/DNS address of host running a copy of DHT.

PREDICATE
Another style to launch the DHT server. All the parameters are passed in the list. Members of the list are of type prameter_name(parameter_value), where parameter_name corresponds to name of the command line argument without two leading dashes (--) and with internal dash replaced by the underscore (_). All the values are of integer type, except the value of join_host, which should be an atom.