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

More descriptive commands #21

Open
asimpleidea opened this issue Jan 22, 2021 · 4 comments
Open

More descriptive commands #21

asimpleidea opened this issue Jan 22, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@asimpleidea
Copy link
Member

The reader will be updated with more descriptive commands:

  • reader poll servicedirectory instead of reader servicedirectory
  • reader subscribe ...
  • reader watch ...
@asimpleidea asimpleidea added the enhancement New feature or request label Jan 22, 2021
@asimpleidea asimpleidea self-assigned this Jan 22, 2021
@asimpleidea
Copy link
Member Author

I may be overthinking here, but I am starting to think that having descriptive commands is very good but not in this ^ way, as the users aren't supposed to know how the "reading" is done, or better put they don't care.

So instead of having a poll this watch that I am thinking of just having a cnwan-reader read this or cnwan-reader observe that (or even just watch even if we're actually polling) and not confuse people about how the thing is done.

Maybe only actual pub/sub services like kafka would have it differently -- e.g. cnwan-reader subscribe kafka --topic this -- because that's the kind of terminology a pub/sub user would expect anyways.

Feedback much appreciated for this :)

@arnatal
Copy link
Member

arnatal commented Nov 8, 2021

I think that more descriptive commands make sense if the service registry supports multiple ways of interaction. In that case the user might have some preference on how the service registry is consumed. If there's only one way to interact with the service registry then yes, I agree there's no need to expose the low level details.

@asimpleidea
Copy link
Member Author

Yes I agree. But even then the alternative method would be to have options, I.e --poll.

To be more clear, if service directory provided a way to watch changes via grpc streams, then I would have that as default and then users could opt for polling via --poll, although I would remove the polling entirely in that case tbh.

Unless they do provide some other ways to do that with "external" methods, I.e if service directory decided to provide watching via subscription to a Google pub/sub reserved topic, then in that case I would still rather have it as subscribe pubsub rather than watch servicedirectory

@ljakab
Copy link
Member

ljakab commented Nov 9, 2021

I think consistency ("descriptive commands") makes it less necessary to consult the documentation for quick starting, and that is a good thing. Users with advanced requirements should do the work to read the docs, check the defaults, and customize behavior to their liking.

I think Alan Kay's principle (when designing the Smalltalk language) which was also picked up by Perl's author Larry Wall should be guiding us in general: "Simple things should be simple, complex things should be possible".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants