Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1484

Allow a client to query the status of an asynchronous request without returning the result if the request completed.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.01_OS
    • Fix Version/s: V4.02_WD01
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      Add to 11.6 Asynchronous Requests:

      Once the asynchronous processing has completed, a GET request to the status monitor resource returns a 200 OK, or 204 No Content if the request included a Prefer header with a value of return=minimal. For OData 4.01 and greater responses, or OData 4.0 requests that include an Accept header that does not specify application/http, the response MUST include the AsyncResult response header. A response with 204 No Content MUST include a Location header that can be used to request the result of the completed asynchronous operation. The Location header may or may not contain the same values as returned by the previous request. In a response with 200 OK any other headers, along with the response body, represent the result of the completed asynchronous operation. If the GET request to the status monitor includes an OData-MaxVersion header with a value of 4.0 and no Accept header, or an Accept header that includes application/http, then the body of the final 200 OK response MUST be represented as an HTTP message, as described in [RFC7230], which is the full HTTP response to the completed asynchronous operation.

      Show
      Add to 11.6 Asynchronous Requests : Once the asynchronous processing has completed, a GET request to the status monitor resource returns a 200 OK, or 204 No Content if the request included a Prefer header with a value of return=minimal . For OData 4.01 and greater responses, or OData 4.0 requests that include an Accept header that does not specify application/http, the response MUST include the AsyncResult response header. A response with 204 No Content MUST include a Location header that can be used to request the result of the completed asynchronous operation. The Location header may or may not contain the same values as returned by the previous request. In a response with 200 OK any other headers, along with the response body, represent the result of the completed asynchronous operation. If the GET request to the status monitor includes an OData-MaxVersion header with a value of 4.0 and no Accept header, or an Accept header that includes application/http, then the body of the final 200 OK response MUST be represented as an HTTP message, as described in [RFC7230] , which is the full HTTP response to the completed asynchronous operation.

      Description

      In some cases, the waiting for an asynchronous request to finish and actual processing of the result are separated even up to a point where the processing might [need to] be done in a different thread, process or even different [micro-]service. As it stands, querying the status monitor gives you the state of that process but if that state has been completed it also immediately includes the response of the completed asynchronous request.
      I was wondering if it would it be possible to extend the existing protocol for asynchronous request handling in a way that this extra step could be injected.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hubert.heijkers Hubert Heijkers
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: