hope
hope copied to clipboard
Define gen_storage
Look and feel:
- All operations are actually requests to an external resource and therefore can fail, so must live in result monad
- Intuitively, the interface should resemble something like
hope_gen_dictionary
wrapped inhope_gen_monad
- Lexicon should suggest higher-than-normal latency, such as:
-
store
(instead ofput
) -
fetch
(instead ofget
)
-
Semantics? :thought_balloon:
- All completed operations/requests are to be considered
ok
-
error
condition is reserved for uncompleted operations/requests - Therefore, a completed
fetch
, that did not find a bound value, is still considered "ok" and should return{ok, none}
, whereas completedfetch
that did find a bound value returns{ok, {some, Value}}