Issho.Engine.Map (Issho v0.1.0)

Copy Markdown View Source

A map that people and agents change together: values at paths, in the order the authority accepts them. It is the engine of shared assigns, the reference for writing an engine, and the engine of Issho's own tests.

%{"op" => "set", "path" => ["plan", "title"], "value" => "Q3"}
%{"op" => "delete", "path" => ["plan", "draft"]}
%{"op" => "increment", "path" => ["votes"], "by" => 1}

A path is a list of up to 16 strings. set makes the maps on its way; delete of a missing key does nothing. Concurrent sets of one path follow the authority's order; increments add up. The initial content is a map (or nil, an empty one).

Options: :max_depth of values (32).