anchor.diff:  -export([start_link/1, init/1, on/2]).
   
   -define(TRACE(X,Y), ok).
  -%-define(TRACE(X,Y), io:format(X, Y)).
  +%define(TRACE(X,Y), io:format(X, Y)).
   
   -type load_aggregation() :: {AggId :: non_neg_integer(),
                                Pending :: non_neg_integer(),
  
positive.code:     gmetric(RRDMetrics),
      State;
  
  % @doc handler for messages from the vivaldi process
  %      reporting its confidence
  on({ganglia_vivaldi_confidence, DHTName, Msg}, State) ->
      {vivaldi_get_coordinate_response, _, Confidence} = Msg,
      _ = gmetric(both, lists:flatten(io_lib:format("vivaldi_confidence_~s", [DHTName])), "float", Confidence, "Confidence"),
  
negative.code:     {get_node_details_response, [{load, Load}]} = Msg,
      CurAggId = get_agg_id(State),
      if
          %% check for correct aggregation id
          AggId == CurAggId  ->
              NewState = set_agg_load(Load, State),
              agg_check_pending(NewState);
          %% otherwise drop this message
          true -> State
      end;
  
  %% @doc handler for messages from failure detector
  %%     if a node crashes before sending out the load data
  %%     we ignore its load information
  on({crash, _PID, {ganglia, AggId}}, State) ->
      ?TRACE("Node failed~n",[]),
      CurAggId = get_agg_id(State),
  