VectorClock

Elixir implementation of vector clocks.

About

Vector clocks are used in distributed systems as a way of maintaining a logical ordering of events. A vector clock consists of a list of dots, which each dot representing a node in a distributed system. A dot consists of an identifier for the node, it's current count, and a timestamp from the last time it was incremented. When a node sends an event to another node it increments the it's dot in it's vector clock and sends the clock along side the message. A node receiving a message can determine whether it has seen the effect of that message already by comparing it's vector clock with the received vector clock.

Source

Based on the erlang version from :riak_core.

Installation

If available in Hex, the package can be installed by adding vector_clock to your list of dependencies in mix.exs:

def deps do
  [{:vector_clock, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/vector_clock.