anchor.diff:      gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
   
   get_history() ->
  -    gen_server:call(?MODULE, get_history).
  +    [binary_to_term(B) || B <- gen_server:call(?MODULE, get_history)].
   
   init(_) ->
       Self = self(),
  
positive.code: 
  -include("ns_common.hrl").
  
  -define(EVENTS_HISTORY_SIZE, ns_config_ets_dup:unreliable_read_key(master_activity_events_history_size, 8192)).
  
  -record(state, {ring}).
  
  
negative.code:     {ok, #state{ring=ringbuffer:new(?EVENTS_HISTORY_SIZE)}}.
  
  handle_call(get_history, _From, State) ->
      {reply, ringbuffer:to_list(State#state.ring), State, ?HIBERNATE_TIMEOUT}.
  
  handle_cast({note, Event}, #state{ring = Ring} = State) ->
      NewState = State#state{ring = ringbuffer:add(term_to_binary(Event), Ring)},
      {noreply, NewState, ?HIBERNATE_TIMEOUT}.
  
  handle_info(timeout, State) ->
      {noreply, State, hibernate};
  handle_info(_Info, _State) ->
      exit(unexpected).
  
  