anchor.diff: -%%%-------------------------------------------------------------------
  -%%% @author kyle
  -%%% @copyright (C) 2014, siftlogic LLC
  -%%% @doc
  -%%%     API for any prefered storage type. Modules for the specified type should be of the form
  -%%%     erldns_storage_mnesia, etc...
  -%%% @end
  -%%% Created : 20. Nov 2014 3:33 PM
  -%%%-------------------------------------------------------------------
  +%% Copyright (c) 2014, SiftLogic LLC
  +%%
  +%% Permission to use, copy, modify, and/or distribute this software for any
  +%% purpose with or without fee is hereby granted, provided that the above
  +%% copyright notice and this permission notice appear in all copies.
  +%%
  +%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  +%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  +%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  +%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  +%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  +%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  +%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  +
   -module(erldns_storage).
  --author("kyle").
   
   -behaviour(gen_server).
   
  +%% inter-module API
  +-export([start_link/0]).
  +
   %% API
  --export([start_link/0,
  -         create/1,
  -         create/2,
  +-export([create/1,
            insert/2,
  -         delete/1,
  +         delete_table/1,
            delete/2,
  -         select/0,
  -         lookup/2]).
  +         backup_table/1,
  +         backup_tables/0,
  +         select/2,
  +         select/3,
  +         foldl/3,
  +         empty_table/1]).
   
   %% gen_server callbacks
   -export([init/1,
  -    handle_call/3,
  -    handle_cast/2,
  -    handle_info/2,
  -    terminate/2,
  -    code_change/3]).
  +         handle_call/3,
  +         handle_cast/2,
  +         handle_info/2,
  +         terminate/2,
  +         code_change/3]).
   
   -record(state, {}).
   
   -define(POLL_WAIT_HOURS, 1).
   
  +%% Gen Server Callbacks
   start_link() ->
       gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
   
   init([]) ->
  +    %%This call to handle_info starts the timer to backup tables in the given interval.
       {ok, #state{}, 0}.
   
   handle_call(_Request, _From, State) ->
  
positive.code: code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  create(Key) ->
      not_implemented.
  
  create(Key, Options) ->
      not_implemented.
  
  insert(Key, Value)->
      not_implemented.
  
  delete(Key)->
      not_implemented.
  
  delete(Key, Value)->
      not_implemented.
  
  select()->
      not_implemented.
  
  backup()->
      not_implemented.
  
  lookup(Key, Value) ->
      not_implemented.
negative.code: handle_cast(_Msg, State) ->
      {noreply, State, 0}.
  
  %% @doc Backups the tables in the given period
  handle_info(timeout, State) ->
      Before = now(),
      ok = backup_tables(),
      TimeSpentMs = timer:now_diff(now(), Before) div 1000,
      {noreply, State, max((?POLL_WAIT_HOURS * 60000) - TimeSpentMs, 0)};
  handle_info(_Info, State) ->
  