Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define gen_storage #11

Open
xandkar opened this issue Jan 5, 2015 · 0 comments
Open

Define gen_storage #11

xandkar opened this issue Jan 5, 2015 · 0 comments

Comments

@xandkar
Copy link
Owner

xandkar commented Jan 5, 2015

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 in hope_gen_monad
  • Lexicon should suggest higher-than-normal latency, such as:
    • store (instead of put)
    • fetch (instead of get)

Semantics? 💭

  • 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 completed fetch that did find a bound value returns {ok, {some, Value}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant