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

Timeouts for service invocations #198

Closed
9 tasks done
bestbeforetoday opened this issue Sep 21, 2021 · 0 comments · Fixed by #287
Closed
9 tasks done

Timeouts for service invocations #198

bestbeforetoday opened this issue Sep 21, 2021 · 0 comments · Fixed by #287
Assignees
Labels
enhancement New feature or request

Comments

@bestbeforetoday
Copy link
Member

bestbeforetoday commented Sep 21, 2021

As an application developer
I want to specify timeouts for service invocations such as endorse and submit
So that my application will not wait indefinitely or timeout too quickly for my particular usage scenario

Currently some language implements have an arbitrary timeout hard-coded, which cannot be modified, while some have no timeout set so wait indefinitely in cases such as packets being black-holed.

It should be possible to specify:

  1. timeouts on a per-invocation basis
  2. timeout defaults when connecting the Gateway

Suggest exposing elements of the gRPC API as invocation options rather than providing an abstraction that duplicates the capabilities provided by gRPC and then needs to be maintained and supported. For example, in the Node client we could accept a gRPC CallOption as an option to service invocation, which allows a deadline for a particular call to be specified. Go accepts a Context that can include a deadline or timeout, or can be used to explicitly cancel the call (in addition to CallOption to configure other call behaviour).

See gRPC blog post on deadlines.

Tasks:

  • Java per-call timeouts
  • Java default timeouts
  • Update Java sample to use default timeouts
  • Node per-call timeouts
  • Node default
  • Update Node sample to use default timeouts
  • Go per-call timeouts
  • Go default timeouts
  • Update Go sample to use (or demonstrate) default timeouts
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

Successfully merging a pull request may close this issue.

1 participant