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

As an API user, I want to handle long-running queries that take >10 seconds. #15

Open
2 tasks
tloubrieu-jpl opened this issue Jan 5, 2022 · 1 comment
Open
2 tasks
Labels
icebox p.must-have requirement the current issue is a requirement

Comments

@tloubrieu-jpl
Copy link
Member

@jordanpadams commented on Sun Apr 18 2021

Motivation

...so that I can ensure the user does not lose attention or think the software is broken.

Additional Details

Acceptance Criteria

Given a deployed API and registry with data ingested
When I perform a query against an endpoint where the response time is >10 seconds and max_response_time flag not indicated.
Then I expect an error response indicating response time for this query is the default 10 max response time. user should narrow query or use the max_response_time flag to increase the time.

Engineering Details

  • introduce new max_response_time flag to the API with default 10 (seconds)
  • implement error handling for max_response_time failure

@al-niessner commented on Wed Jul 21 2021

Is it not the responsibility of the client to do the timeout? cURL has a timeout flag that will stop the transfer after the timeout independent of what or where cURL is in the request. Other download tools like wget also have the timeout.

Putting the timeouts in the server makes it awkward on the user. If I want a page of 500 items and I have all day, then I expect to start the cURL and wait for it to finish even if it takes the whole day. If the server times out at 10 seconds, then how do I know how long it will take since intermediate information is lost? Do I try 30 seconds only to have it fail, then 60 seconds, then 120 seconds, etc until it finally works? That will be super annoying.

However, if I know I only have 10 seconds before I need the answer then I can set the timeout at the client to give up and then do something else. Or maybe I only have a minute or two.

@tloubrieu-jpl
Copy link
Member Author

closed by mistake

@tloubrieu-jpl tloubrieu-jpl reopened this Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icebox p.must-have requirement the current issue is a requirement
Projects
Status: ToDo
Development

No branches or pull requests

2 participants