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

Notification support ... and perhaps better asynch support too ... #70

Closed
pvretano opened this issue May 11, 2020 · 1 comment
Closed
Labels
async Dealing with asynchronous execution

Comments

@pvretano
Copy link
Contributor

The current approach for getting execution status of the a process is via polling of a pull notification. I think that we also need to support some type of lightweight notification too. Specifically I think we should add a "responseHandler" parameter to the execute request. The value of the response handler can be something like 'mailto:[email protected]' or 'sms:4167015555' or a web hook or callback URL 'http://www.blah.com/path/path/path...'.

The existence of the 'responseHandler' parameter would automatically trigger asynchronous execution . The immediate response would be an acknowledgement message that might look like this:
{
"links": [
{"rel": "monitor",
"href": "http://www.someserver.com/jobs/1013"},
{"rel": "cancel",
"href": "http://www.someserver.com/jobs/cancel/1013"},
"status": "accepted"
}
At this point the user can do nothing and simply wait for the process to complete at which time a notification will be send to the response handler(s) specified with the request.

However, the client also has the option to use the included hypermedia controls for monitor or cancel (dismiss I guess) execution of the process. Say, the client resolved the "monitor" link, they may get a response that looks like this:
{
"links": [
{"rel": "monitor",
"href": "http://www.someserver.com/jobs/1013"},
{"rel": "cancel",
"href": "http://www.someserver.com/jobs/cancel/1013"},
"status": "executing",
"percentCompleted": 47
}
However, it should be noted that the client does not HAVE to resolve the included links. When the process completes, a notification message will be sent to the response handler(s) and the client can pick up the results at that point (or have it done auto-magically if the response handler was a web hook or callback).
Anyway, the details for the responseHandler parameter can be found here:
https://docs.opengeospatial.org/per/18-045.html#async_extension

@bpross-52n bpross-52n added the async Dealing with asynchronous execution label Jun 8, 2020
@bpross-52n
Copy link
Contributor

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

No branches or pull requests

2 participants