lablup / lablup/backend.ai

Add "async" option to long-running manager APIs

Open
#370 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Just like the `enqueue_only` option for the session creation API, let's generalize it as `async` (e.g., `?async=1`) and apply to more set of APIs, including session termination and restart APIs.

If the async option is specified, the API handler must return immediately after spawning a background task for the actual operation (possibly after changing the target object's status to an "-ING"), with the bgtask ID.

This way, we could remove bogus timeout/retry errors in the client side and more easily distinguish client-side network problems with the operation's long running time.

Combined with lablup/backend.ai-webui#309, this could greatly reduce the server burden due to GUI's polling for the session list and improve the responsiveness.

JIRA Issue: BA-276

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.