-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Request] Long-running API operations should return Accepted response and notify by WebSocket #286
Labels
feat
New feature or request
Comments
I had some thoughts swimming in my brain last night while trying to fall asleep.
|
7 tasks
Merged
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
API operations like archiving active recordings, generating reports (from active or archived recordings), "View in Grafana" (transfer file to jfr-datasource) etc. can take a long time to complete depending on external factors such as the size of a JFR file, the speed of network connections between Cryostat and target applications or report generator or jfr-datasources, etc. Currently these API actions are implemented such that the client sends a request to Cryostat, then Cryostat performs the action completely, and then Cryostat sends a response to the client based on the result of the performed action. Instead, Cryostat should receive the client's request, perform some initial validations, and send either a
4xx
response if the client's request failed the validations, or a202
response if it will proceed. Then, the final result of the action should be emitted as a WebSocket notification.Taking active recording archiving as an example, currently the flow is like this:
Instead, it should go like this:
202
, if it fails respond with a404
(recording not found) or502
(target not reachable) etc.Anything other information?
No response
The text was updated successfully, but these errors were encountered: