# Module lb_active_directories

- Description
- Data Types
- Function Index
- Function Details

Implementation of a modified version of the paper below.

Copyright © 2014-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: `lb_active_beh`.

Authors: Maximilian Michels (`michels@zib.de`).

References

- B. Godfrey, S. Surana, K. Lakshminarayanan, R. Karp, and I. Stoica "Load balancing in dynamic structured peer-to-peer systems" Performance Evaluation, vol. 63, no. 3, pp. 217-240, 2006.

## Description

Implementation of a modified version of the paper below. This implementation doesn't use virtual servers but can still benefit from the load balancing algorithm's attributes, respectively the load directories and the emergency transfer of load.

Many-to-Many scheme

## Data Types

### dht_message()

    dht_message() =
        {lb_active, request_load, pid()} |
        {lb_active,
         before_jump,
         HeavyNode :: lb_info:lb_info(),
         LightNode :: lb_info:lb_info()}

### directory_name()

    directory_name() = string()

### message()

    message() =
        {publish_trigger} |
        {post_load, lb_info:lb_info()} |
        {directory_trigger} |
        {get_state_response, intervals:interval()}

### reassign()

    reassign() =
        #reassign{light = lb_info:lb_info(),
                  heavy = lb_info:lb_info()}

### schedule()

    schedule() = [reassign()]

### state()

    state() =
        #state{my_dirs = [directory_name()], schedule = schedule()}

## Function Index

check_config/0 |
get_web_debug_kv/1 |
handle_dht_msg/2 | Load balancing messages received by the dht node.
handle_msg/2 |
init/0 |

## Function Details

### init/0

    init() -> state()

### handle_msg/2

    handle_msg(Msg :: message(), State :: state()) -> state()

### handle_dht_msg/2

    handle_dht_msg(Msg :: dht_message(),
                   DhtState :: dht_node_state:state()) ->
                      dht_node_state:state()

Load balancing messages received by the dht node.

### get_web_debug_kv/1

    get_web_debug_kv(State :: state()) -> [{string(), string()}]

### check_config/0

    check_config() -> boolean()

Generated by EDoc, Apr 22 2017, 15:58:21.