Server to server communication module

Author(s): Arsen Kostenko.

This module describes server-2-server side behavior of any node. Since this includes various communication and inspection tasks that should be performed in parallel, this module makes extensive usage of Ciao threading mechanism. On the other hand, module must be as simple as possible in terms of usage. Therefore, only a single predicate dht_s2s_main/0 is exposed to outer world and rest of complexity is hidden inside. This predicate is used from module. All the parameters are passed through module.

Usage and interface

Documentation on exports

Generally speaking, this predicate must perform some conventional tasks like:
  • set local part of DHT to initial state,
  • contact a successor node if there is any,
  • and finally launch several threads that listen to streams, process incoming requests and inspect state of local finger-table.
All parameters (like listen port, number of threads, host to join, etc) are received from module