Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-26172

Introduce async operation adapter

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: Automation

      Description

      1.Introduce async operation adapter:

      Method URL Status Headers Description
      POST /<op>/@async 202 (accepted) Location: <poll URL> Starts the execution thread and redirects to polling URL
      GET /<op>/@async/<executionId>/status 200 or 303 when done (see other) Location: <result URL> Returns status and redirects to result URL when done
      GET /<op>/@async/<executionId> 200 or 303 (BulkStatus.result.url) Location: <result URL> Returns the result or redirects to it in case of a bulk action (result.url seems to be a convention)
      DELETE /<op>/@async/<executionId> 200 or 404   Aborts execution (only applies to bulk actions)

      2. Introduce async service and status:

      • Introduce AsyncService interface with methods to get status and result given a command ID as well as check completion and abort async computations.
      • Introduce AsyncStatus interface for when you wish to return status in operations (need to be able to get the command ID from the status.
      • Introduce @OperationMethod(asyncService=Class<? extends AsyncService>) so we know which service to poll status from (using command ID)

      3. Make Blob.BulkDownload synchronous and deprecate AsyncBlob. Calls should rely on the new async adapter.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 hour, 30 minutes
                  1w 1h 30m