anchor.diff:  -record(state, {myself, local_clock, order_buffer, buffered_messages, delivery_fun}).
   
   %% TODO: Needs some sort of persistence for the local causality information.
  -%% TODO: Ensure we recursively deliver message.
   %% TODO: How do you know if we can use a causal channel or not?
   %% TODO: GC.
  +%% TODO: Add acknowledgements.
   
   %%%===================================================================
   %%% API
  
positive.code: %%% Internal functions
  %%%===================================================================
  
  %% TODO: We aren't updating the order buffer here.
  
  %% @private
  deliver(#state{myself=Myself, local_clock=LocalClock, delivery_fun=DeliveryFun}=State, 
          MessageClock, ServerRef, Message) ->
      %% Merge clocks.
      MergedLocalClock = vclock:merge([LocalClock, MessageClock]),
  
  
negative.code:         %% No dependencies.
          error ->
              lager:info("Message ~p has no dependencies, delivering.", [MessageClock]),
              deliver(State0#state{buffered_messages=BufferedMessages -- [FullMessage]}, IncomingOrderBuffer, MessageClock, ServerRef, Message);
          %% Dependencies.
          {ok, DependencyClock} ->
              case vclock:dominates(LocalClock, DependencyClock) of
                  %% Dependencies met.
                  true ->
                      lager:info("Message ~p dependencies met, delivering.", [MessageClock]),
                      deliver(State0#state{buffered_messages=BufferedMessages -- [FullMessage]}, IncomingOrderBuffer, MessageClock, ServerRef, Message);
                  %% Dependencies NOT met.
                  false ->
                      %% Buffer, for later delivery.
  