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

Dispatch processing externally from web server #119

Open
benjimin opened this issue Sep 7, 2021 · 1 comment
Open

Dispatch processing externally from web server #119

benjimin opened this issue Sep 7, 2021 · 1 comment

Comments

@benjimin
Copy link
Collaborator

benjimin commented Sep 7, 2021

The OWS WPS spec facilitates two modes:

  • Synchronous: for processes that can be performed in a few seconds, the result is returned in the initial request response. (This would be ideal for providing interactive online features, but probably isn't applicable for ODC until data loading performance is improved.)
  • Asynchronous: the initial response specifies a location to poll for the request status.

The problem is that asynchronous tasks should not be executed by the web host itself directly.

  • Processing failures leave dangling promises, where the client is left holding its breath with no signal to stop polling.
  • Poor scaling: the server becomes unresponsive (as its few available slots become occupied) suddenly and without warning, even if the demand only increases gradually, causing incoming requests to fail before new resources can spin up.

The solution will be to dispatch tasks to some form of queue, entrusting the core processing to a separate resource. (The implementation could involve SQS and a dask cluster, just for one example.) This will decouple the processing performance from the HTTP responsiveness. The decoupling may also reduce the resources that need be kept idling.

@benjimin
Copy link
Collaborator Author

benjimin commented Oct 2, 2021

A queue-based design would also facilitate a serverless implementation, to reduce hosting costs (assuming infrequent demand).

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

No branches or pull requests

1 participant