Open m-mohr opened 1 month ago
The current execution modes are:
sync
| jobControlOptions: execute-sync
(technically OAP's default)
POST /jobs
+ Prefer: wait={seconds}
: starts execution right away, responds with results 200GET /jobs/{jobId}/results
async
| jobControlOptions: execute-async
(could be a default if supported: https://github.com/opengeospatial/ogcapi-processes/issues/449#issuecomment-2426580448)
POST /jobs
+ Prefer: respond-async
: job queued immediately, responds a Job Status 201GET /jobs/{jobId}/results
create
| jobControlOptions
TBD
(see https://github.com/opengeospatial/ogcapi-processes/issues/449#issuecomment-2426580448)
(openEO's default)
POST /jobs
+ status: create
: job is created but awaits trigger to be queued, responds Job Status 201POST /jobs/{jobId}/results
: places the job in queue, executes whenever resources are available
(return 202?, see https://github.com/opengeospatial/ogcapi-processes/issues/461)GET /jobs/{jobId}/results
https://github.com/opengeospatial/ogcapi-processes/pull/437#discussion_r1797212331 also proposed that (3) could consider whatever Prefer
header at the same time as status: create
, such that once triggered, sync
or async
could be applied.
Meeting on 2024-10-31
queue: bool
instead of status: "create"
in bodyX-OGC-Queue
(or similar) headerPrefer
header with a custom respond-queued
modestatus
/queue
body parameter
This is to make it easier to transition POST /processes/{processID}/execution
to /jobs
with a simpler server redirect (easier to inject the header than rewrite the body contents)Prefer: respond-queued
or similar if omitted)Just wondering, we only discussed header and body parameters for the queue parameter. Could it also be a query parameter? It feels easier to use and define than a new header.
It technically could, but I'm personally not fond of POST
requests using query parameters simultaneously with body contents. It adds complexity for clients and servers having to cross-check multiple places. Users are more often used to GET+query or POST+body for submitting searches/operations, so I would prefer to keep them distinct methods.
Fair enough. Header is fine, too.
There are so many options to get async/sync results from /jobs and /jobs/:id/results. It should probably be limited to a small subset so that there are not X options for "the same thing.
Discussion started in https://github.com/opengeospatial/ogcapi-processes/pull/437#discussion_r1796403346_