-
Notifications
You must be signed in to change notification settings - Fork 46
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
JOBS shouldn't be a sub-resource of Processes #69
Comments
Hi Matthias, I see you point. The idea was that you send a POST request to /processes/{process-id}/jobs to create new job. Do you suggest to change this execute endpoint, too? |
I would probably post new jobs to |
Got it, this would require us to re-introduce the process id in the execute JSON. I would postpone discussion of this to after the release of the draft documents. |
SWG decision on 2020-06-15 that this will be discussed after the draft document has been released for Public Comment. Consistent with the suggestion in #69 (comment) |
I agree with this, we do it very similarly in openEO: https://api.openeo.org/#tag/Batch-Jobs |
Both variants to retrieve jobs and their underlying results are also supported by CRIM's ADES/EMS. GET /jobs/{jobId} Adding the POST directly on jobs would only require to provide process ID via the body rather than by path. Contrary to @m-mohr, I don't feel per-process jobs references are a problem during chaining, as that chain should already know about chained processes being executed one after the other anyway (we are executing workflows in this manner without issue). Each job can easily maintain a reference to the process that created it, so both links should be equivalent. |
I'm open to this different approach, but an argument in favour of the process sub-resources is that the Job POST request itself depends on the specific process. Nevertheless "The process might be deleted from the server, but the job's results are still stored" is also a good point :) |
We discussed this in the SWG telecon on Monday, October 19th. We propose to add an additional endpoint /processes/jobs that lists the jobs independent of the process identifier. @matthias-mueller would you accept this solution? |
Hmm ... perhaps two top-level resource, one for process management and one for job management @matthias-mueller proposes would not be bad. Just thinking out loud here ... For the /processes resource:
For the /jobs resource:
For the /job resource, the {processId} identifier must be from the list of identifiers obtained by accessing the /processes resource. This organization has the added side effect of making process invocation more natural with a GET in addition to being able to invoke the job with a POST. Just thinking out loud base on @matthias-mueller comment above. Comments? |
Hi all,
I was the one that proposed putting the /jobs resource under the /processes root. I did this because many of us have “jobs” coming from all directions – even some geoprocessing that is not involved in OGC definitions at all. I like the idea of a jobs management being pulled to a higher level, but I would also like to be able to see /processes/jobs to help identify those defining OGC specific jobs. Just thought I would explain the logic behind the proposal.
Regards,
Stan Tillman
Executive Manager – Technical, ERDAS APOLLO
OGC Technical/Planning Committee Representative
Hexagon
M: +1 256.653.6420
stan.tillman@hexagon.com<mailto:steven.mcdaniel@hexagon.com>
From: Panagiotis (Peter) A. Vretanos <notifications@github.com>
Sent: Friday, October 30, 2020 11:06 AM
To: opengeospatial/wps-rest-binding <wps-rest-binding@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [opengeospatial/wps-rest-binding] JOBS shouldn't be a sub-resource of Processes (#69)
This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
Hmm ... perhaps two top-level resource, one for process management and one for job management @matthias-mueller<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-mueller&data=04%7C01%7C%7C5d30c3ffd14341cf0d8908d87cedb33a%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C637396707636588921%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4mtooMeh6uVz3J2SrQeIuK%2FIIYS69DLi5C3%2BQt3i57Q%3D&reserved=0> proposes would not be bad. Just thinking out loud here ...
For the /processes resource:
* GET /processes gets the list of processes
* GET /processes/{processId} get the process description
* POST /processes create a new process (aka Transactional WPS)
* PUT /processes/{processId} update a process definition
* DELETE /processes/{processId} deletes all the processes
For the /jobs resource:
* GET /jobs - get all gobs
* GET /jobs/{processId} get a list of jobs for a specific {processId}
* GET /jobs/{processId}/{jobId} get the status of a specific job
* GET /jobs/{processId}/{jobId}/results get the results of a job
* POST /jobs/{processId} create a new job
* DELETE /jobs/{processId}/{jobId} deletes or cancels a job
For the /job resource, the {processId} identifier must be from the list of identifiers obtained by accessing the /processes resource.
This organization has the added side effect of making process invocation more natural with a GET in addition to being able to invoke the job with a POST.
Example: http://www.someserver.com/ogcapi/jobs/MyProcess?mode=async&input01=val01&input02=val02&bbox=1,2,3,4&output=tiffImage<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.someserver.com%2Fogcapi%2Fjobs%2FMyProcess%3Fmode%3Dasync%26input01%3Dval01%26input02%3Dval02%26bbox%3D1%2C2%2C3%2C4%26output%3DtiffImage&data=04%7C01%7C%7C5d30c3ffd14341cf0d8908d87cedb33a%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C637396707636593909%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iKOcsT4%2FURmVeDLq1iaT3rMHWbFqz3Iqb8fCnXPbdJQ%3D&reserved=0>
Just thinking out loud base on @matthias-mueller<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmatthias-mueller&data=04%7C01%7C%7C5d30c3ffd14341cf0d8908d87cedb33a%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C637396707636598901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hkDhB3MRUYIbEvZSTx6hTrazoWqBYeU7dOjB%2BVbBCKw%3D&reserved=0> comment above. Comments?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopengeospatial%2Fwps-rest-binding%2Fissues%2F69%23issuecomment-719642951&data=04%7C01%7C%7C5d30c3ffd14341cf0d8908d87cedb33a%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C637396707636603894%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BYsBAK8cVpmYJnKwQmn81Fkchkzt4plScv9PgUaWD2A%3D&reserved=0>, or unsubscribe<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAB77FIC6QGAWVXQ5TKU66VTSNLP6RANCNFSM4M53SHQA&data=04%7C01%7C%7C5d30c3ffd14341cf0d8908d87cedb33a%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C637396707636608883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nzR8c1xbQQpdrWr%2FT0tgMYMv4AGklBN%2FgtwznmXVroQ%3D&reserved=0>.
|
@sptillma OGC API does not impose any requirement on the path ahead of the / so one could arrange to put all the OGC-specific resources in one sub-tree and other non-OGC stuff in other sub-trees. For example, at CubeWerx, we segregate the OGC API resource from other resources by placing an "ogcapi/" in the path: https://eratosthenes.pvretano.com/cubewerx/cubeserv/default/ogcapi/wpstest/processes |
I find having |
I think there are two distict types of scenarios/setups to consider:
|
Hi Peter,
I think somebody reported that the job resource might exist while the corresponding process resource has been deleted (or even deleted, then replaced with a new process with same id).
I would suggest the following:
* GET /jobs - get all gobs
* POST /jobs/ create a new job
* DELETE /jobs/{jobId} deletes or cancels a job
* GET /jobs/{jobId} get the status of a specific job
* GET /jobs/{jobId}/results get the results of a job
* GET /jobs/{processId} get a list of jobs for a specific {processId}
Regards,
Christophe.
|
@spacebel Yes, DELETE /jobs/{jobId}; miss-typed that. |
Dear Peter,
I have no clear cut opinion, but from a REST perspective, you might consider that job is the resource and thus, jobs/ POST add a new job resource with processId inside.
I consider jobs /processId as an alias/shortcut for advanced info.
Just some thoughts…
|
@spacebel yeah I think you are right. |
... or put it in the body of the POST request? (But maybe you already ruled that one out in previous discussions) |
@matthias-mueller yes, that is what I meant by "... the execute request contains the process id ...". |
I would not say it was ruled out. In fact, the process id was part of the execute json earlier. But it was removed, as it was kind of duplicate due to the execute endpoint, which included the process id. It would not be a big change to re-add the id to the execute json. |
Got it. The nice thing of a self-sufficient jobs endpoint would be that could be used as a means to add asynchronous processing to other parts of the OGC API (e.g. long running WFS/WCS operations). Not sure if that one is still on the agenda but it used to pop up randomly when we discussed WPS with other SWGs. |
@spacebel
There is no real safe way to differentiate between I also see POST /jobs as a completely valid use case, whether |
Hi Francis, I see your point, even if processId is not a UUID. What do you think about adding an optional filter parameter to the HTTP GET /jobs ?
|
Yes. That would work. Maybe simply |
In our last telecon, we agreed that it would be ok to remove the process id from the /jobs endpoint. The question is whether the /jobs endpoint should be moved (1) to the root level, i.e. the same level as /processes
or (2) under /processes
Some discussion points: |
Not clear to me why 2 could be used with other OGC APIs offering asynchronous funcitonalities ? Could you please elaborate a little ? |
Sorry, but I am not sure that I understand the question correctly. The baseline is that (1) whereas (2) |
Ok, I got it. |
@bpross-52n I don't think that interference with vendor-specific endpoint is an issue. That argument could be made for any endpoint off the root (conformance, collections, etc.). My feeling is that vendors will segregate APIs using upstream path elements. For example, for CubeWerx all ogcapi endpoints live under ".../ogcapi/{datastore}/". |
@pvretano I agree with you. I do not suggest to use both approaches. I merely wanted to start a discussion here about which one we should choose. |
@pvretano I'm not sure your argument regarding the interference with vendor-specific endpoints is valid to say "because it doesn't affect things the way we do it" :). I brought this argument up trying to resolve conflicts that "might" happen in the future. However, during the last meeting, you gave the best argument for /jobs when you said it might be moved into Common and apply across other standards as well. In that case, we define a standard that can be pointed to justify top level definition. But if it is self-contained to only apply to OGC API Processes, then I would argue it should stay under /processes. I'm good either way as long as we have merit behind the decision. |
The respective changes should be merged now. |
The current proposal is to expose jobs as a sub-resource of a process:
GET /processes/{process-id}/jobs/{job-id}/results
I think
jobs
should be on the same level asprocesses
, e.g.:Why?
The text was updated successfully, but these errors were encountered: