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

Discuss wrap vs enhance #18

Closed
jhspaybar opened this issue Jul 24, 2016 · 2 comments
Closed

Discuss wrap vs enhance #18

jhspaybar opened this issue Jul 24, 2016 · 2 comments

Comments

@jhspaybar
Copy link

I see the EtcdKV interface and impl are wrapping the generated gRPC clients with some helper utilities. At least for simple things like put and delete, I'd like to discuss if these should wrap, or sit to the side? For example.

generatedClient.put(EtcdUtil.putRequest(key, value));

This way users can still easily choose their interaction model(blocking, future, async), but still get the benefit of a nicer builder and handy defaults.

I expect there to be recipes as well for common multi-step interactions, and those very well may need to wrap, but the items so far seem capable of living to the side as helpers.

Thoughts?

@xiang90
Copy link
Contributor

xiang90 commented Jul 24, 2016

@jhspaybar I think we want to hide gRPC details as much as possible to start with. Client lib should support blocking and nonblocking. The utility func should exist, it is just a question that if we should expose them to start with. Then users now only have one way to do the thing, and we can iterate on it until we know the API is stable and flexible. We might reach to a point that some users still want raw gRPC, but I want to start the discussion when we get there.

StupidHod added a commit to StupidHod/jetcd that referenced this issue Dec 8, 2016
add keepaliveonce implementation
StupidHod added a commit to StupidHod/jetcd that referenced this issue Dec 8, 2016
@fanminshi
Copy link
Member

not relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants