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

Improved client example with all request types #25

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@DaniGuardiola
Copy link

commented Jun 10, 2019

No description provided.

DaniGuardiola added some commits Jun 10, 2019

@DaniGuardiola DaniGuardiola changed the title Fixed typo in standalone client example Improved client example with all request types Jun 10, 2019

for response in responses:
print(response.message)
response_messages.append(response.message)
print("responses: ", " | ".join(response_messages)) # aaaaa | bb | cccccccc

This comment has been minimized.

Copy link
@mattbennett

mattbennett Jun 10, 2019

Member

Thanks for expanding these.

Can you perhaps move them to the block above (the nameko service client)? Otherwise it looks like the standalone client has special abilities, whereas it's really just a different usage.

Also I wonder whether using the @rpc decorator in that example is confusing, since it's so close to @grpc. It might be better to use @http or something obviously different.

This comment has been minimized.

Copy link
@DaniGuardiola

DaniGuardiola Jun 12, 2019

Author

Also I wonder whether using the @rpc decorator in that example is confusing, since it's so close to @grpc. It might be better to use @http or something obviously different.

I would include examples for both, it makes it clearer.

@DaniGuardiola

This comment has been minimized.

Copy link
Author

commented Jun 12, 2019

Examples structure now:

  • Service client
    • @rpc method
      • unary-unary
      • unary-stream
    • @http method
      • stream-unary
  • Standalone client
    • stream-stream

This way the four types of request-responses are covered, with both rpc and http method examples in the service client.

I'm thinking we could even include an example of gRPC service client, to show all options (and move one of the req-res types there, given that the rpc example has two).

@mattbennett

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

@DaniGuardiola this is great, thanks. So per your final suggestion the example structure would be this?

  • Service client
    • @rpc method
      • unary-unary
    • @grpc method
      • unary-stream
    • @http method
      • stream-unary
  • Standalone client
    • stream-stream

I like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.