Module rt_frtchord

A flexible routing table algorithm as presented in (Nagao, Shudo, 2011).

Copyright © 2012 Zuse Institute Berlin

Version: $Id$

Behaviours: rt_beh.

Authors: Magnus Mueller (mamuelle@informatik.hu-berlin.de).

Description

A flexible routing table algorithm as presented in (Nagao, Shudo, 2011)

Data Types

client_key()

client_key() = [unicode_char()]

custom_info()

custom_info() = undefined | term()

custom_message()

custom_message() = {get_rt, SourcePID :: comm:mypid()}
                 | {get_rt_reply, RT :: rt()}
                 | {trigger_random_lookup}
                 | {rt_get_node, From :: comm:mypid()}
                 | {rt_learn_node, NewNode :: node:node_type()}

entry_type()

entry_type() = normal | source | sticky

external_rt()

external_rt() = 
    {Size :: unknown | float(), external_rt_t_tree()}

external_rt_t_tree()

external_rt_t_tree() = 
    gb_trees:tree(NodeId :: key(), Node :: node:node_type())

key()

key() = rt_chord:key()

rt()

abstract datatype: rt()

rt_entry()

rt_entry() = 
    #rt_entry{node = undefined | node:node_type(),
              type = undefined | entry_type(),
              adjacent_fingers =
                  {key() | undefined, key() | undefined},
              custom = custom_info()}

rt_entry_info_t()

rt_entry_info_t() = undefined

unicode_char()

unicode_char() = 0..55295 | 57344..65533 | 65536..1114111

Function Index

allowed_nodes/1
check/4
check/5
check_config/0
check_rt_integrity/1
check_well_connectedness/1
client_key_to_binary/1
dump/1
dump_to_csv/1
empty_ext/1
export_rt_to_dht_node/2
filter_dead_node/3
frt_check_config/0Checks whether config parameters of the rt_frtchord process exist and are valid.
get_key_segment/1
get_random_in_interval/1
get_random_in_interval/2
get_random_key_from_generator/3
get_random_node_id/0
get_range/2
get_replica_keys/1
get_size/1
get_source_id/1
get_source_node/1
get_split_key/3
get_split_keys/3
handle_custom_message/2
hash_key/1
init/1
init_stabilize/2
n/0
next_hop/2
rt_entry_info/4
to_list/1
to_pid_list/1
unwrap_message/2
update/3
wrap_message/4

Function Details

client_key_to_binary/1

client_key_to_binary(Key :: client_key()) -> binary()

init/1

init(Neighbors :: nodelist:neighborhood()) -> rt()

hash_key/1

hash_key(Key :: client_key() | binary()) -> key()

get_random_node_id/0

get_random_node_id() -> key()

init_stabilize/2

init_stabilize(Neighbors :: nodelist:neighborhood(), RT :: rt()) ->
                  rt()

update/3

update(OldRT :: rt(),
       OldNeighbors :: nodelist:neighborhood(),
       NewNeighbors :: nodelist:neighborhood()) ->
          {trigger_rebuild, rt()} | {ok, rt()}

filter_dead_node/3

filter_dead_node(RT :: rt(),
                 DeadPid :: comm:mypid(),
                 Reason :: fd:reason()) ->
                    rt()

to_pid_list/1

to_pid_list(RT :: rt()) -> [comm:mypid()]

get_size/1

get_size(Rt_t :: rt() | external_rt()) -> non_neg_integer()

n/0

n() -> 340282366920938463463374607431768211456

get_range/2

get_range(Begin :: key(),
          End :: key() | 340282366920938463463374607431768211456) ->
             number()

get_split_key/3

get_split_key(Begin :: key(),
              End :: key()
                   | 340282366920938463463374607431768211456,
              SplitFraction ::
                  {Num :: non_neg_integer(),
                   Denom :: pos_integer()}) ->
                 key() | 340282366920938463463374607431768211456

get_split_keys/3

get_split_keys(Begin :: key(),
               End :: key()
                    | 340282366920938463463374607431768211456,
               Parts :: pos_integer()) ->
                  [key()]

get_random_in_interval/1

get_random_in_interval(SimpleI :: intervals:simple_interval2()) ->
                          key()

get_random_in_interval/2

get_random_in_interval(SimpleI :: intervals:simple_interval2(),
                       Count :: pos_integer()) ->
                          [key(), ...]

get_replica_keys/1

get_replica_keys(Key :: key()) -> [key()]

get_key_segment/1

get_key_segment(Key :: key()) -> pos_integer()

dump/1

dump(RT :: rt()) ->
        KeyValueList :: [{Index :: string(), Node :: string()}]

dump_to_csv/1

dump_to_csv(RT :: rt()) -> [char()]

check_config/0

check_config() -> boolean()

get_random_key_from_generator/3

get_random_key_from_generator(SourceNodeId :: key(),
                              PredId :: key(),
                              SuccId :: key()) ->
                                 key()

handle_custom_message/2

handle_custom_message(Message :: custom_message(),
                      State :: rt_loop:state_active()) ->
                         rt_loop:state_active() | unknown_event

check/4

check(OldRT :: rt(),
      NewRT :: rt(),
      Neighbors :: nodelist:neighborhood(),
      ReportToFD :: boolean()) ->
         ok

check/5

check(OldRT :: rt(),
      NewRT :: rt(),
      OldNeighbors :: nodelist:neighborhood(),
      NewNeighbors :: nodelist:neighborhood(),
      ReportToFD :: boolean()) ->
         ok

empty_ext/1

empty_ext(Neighbors :: nodelist:neighborhood()) -> external_rt()

next_hop/2

next_hop(State :: dht_node_state:state(), Id :: key()) ->
            {succ | other, comm:mypid()}

export_rt_to_dht_node/2

export_rt_to_dht_node(RT :: rt(),
                      Neighbors :: nodelist:neighborhood()) ->
                         external_rt()

to_list/1

to_list(State :: dht_node_state:state()) -> nodelist:snodelist()

get_source_node/1

get_source_node(RT :: rt()) -> rt_entry()

get_source_id/1

get_source_id(RT :: rt()) -> key()

check_rt_integrity/1

check_rt_integrity(RT :: rt()) -> boolean()

wrap_message/4

wrap_message(Key :: key(),
             Msg :: comm:message(),
             State :: dht_node_state:state(),
             Hops :: non_neg_integer()) ->
                {'$wrapped', comm:mypid(), comm:message()} |
                comm:message()

unwrap_message/2

unwrap_message(Msg :: comm:message(),
               State :: dht_node_state:state()) ->
                  comm:message()

check_well_connectedness/1

check_well_connectedness(RT :: rt()) -> boolean()

allowed_nodes/1

allowed_nodes(RT :: rt()) -> [rt_entry()]

rt_entry_info/4

rt_entry_info(Node :: node:node_type(),
              Type :: entry_type(),
              PredId :: key(),
              SuccId :: key()) ->
                 rt_entry_info_t()

frt_check_config/0

frt_check_config() -> boolean()

Checks whether config parameters of the rt_frtchord process exist and are valid.


Generated by EDoc, Jul 23 2015, 22:07:43.