anchor.diff:  -define(VIRTUALNODES, 100).
   
   %% API
  --export([start_link/1, join_node/2, nodes_for_partition/1, replica_nodes/1, nodes_for_key/1, partitions/0, nodes/0, state/0, state/1, old_partitions/0, partitions_for_node/2, fire_gossip/1, partition_for_key/1, stop/0, range/1]).
  +-export([start_link/1, join_node/2, nodes_for_partition/1, replica_nodes/1, nodes_for_key/1, partitions/0, nodes/0, state/0, old_partitions/0, partitions_for_node/2, fire_gossip/1, partition_for_key/1, stop/0, range/1]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  
positive.code: state() ->
    gen_server:call(membership, state).
    
  state(State) ->
    gen_server:call(membership, {state, State}).
    
  replica_nodes(Node) ->
    gen_server:call(membership, {replica_nodes, Node}).
    
  
negative.code: 
  stop() ->
    gen_server:call(membership, stop).
  
  fire_gossip(Node) when is_atom(Node) ->
  	case net_adm:ping(Node) of
      pang ->
        {error, node_pang};
      pong ->
        gen_server:call(membership, {gossip_with, Node})
    end;
  
  fire_gossip({A1, A2, A3}) ->
    random:seed(A1, A2, A3),
    State = state(),
    % Get all the nodes except for ourself
    case lists:delete(node(), membership:nodes()) of
      [] -> ok; % no other nodes
      Nodes when is_list(Nodes) ->
        fire_gossip(random_node(Nodes))
    end,
    timer:apply_after(random:uniform(5000) + 5000, membership, fire_gossip, [random:seed()]).
  
  %%====================================================================
  