diff options
Diffstat (limited to 'shard/lib/data/store.ex')
-rw-r--r-- | shard/lib/data/store.ex | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shard/lib/data/store.ex b/shard/lib/data/store.ex index ca12cd0..ce5618c 100644 --- a/shard/lib/data/store.ex +++ b/shard/lib/data/store.ex @@ -24,6 +24,10 @@ defprotocol SData.PageStore do This protocol may also be implemented by store proxies that track operations and implement different synchronization or caching mechanisms. + + A page store is an object that stores data pages (arbitrary Erlang terms) and + identifies them by their hash. Dependencies may exist between pages, in which + case they form a Merkle DAG. """ @doc""" @@ -60,8 +64,15 @@ end defmodule SData.LocalStore do + @moduledoc""" + A page store that saves all pages locally in RAM. The store is basically a dictionnary + of hash to term mappings, which is mutated by put operations. + """ defstruct [:pages] + @doc""" + Create empty LocalStore. + """ def new() do %SData.LocalStore{ pages: %{} } end |