Browse Prior Art Database

An Optimized Method for Checking the Status of Long Running Operations Invoked via REST Services

IP.com Disclosure Number: IPCOM000241203D
Publication Date: 2015-Apr-02
Document File: 3 page(s) / 106K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is an optimized method for checking the status of long running operations invoked via Representational State Transfer (REST) services. The method reduces the number of requests that a client sends to a server to determine whether a long running operation is complete.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 47% of the total text.

Page 01 of 3

An Optimized Method for Checking the Status of Long Running Operations Invoked via REST Services

When a long running operation is invoked via a Representational State Transfer (REST) service from a client, a token should immediately be returned to the client, and the client should poll the application server with the same token to determine if the job
is complete. This type of polling is required for long running operations because it is not recommended, and sometimes not even possible due to timeouts, to keep a Hypertext Transfer Protocol (HTTP) connection open between a client and the server for long periods.

While an existing approach solves the problem related to determining when a long running operation is finished, without keeping an HTTP connection open for the entire

duration of the operation, it does not provide for a way to deal with operations that take varying times to complete (i.e. short vs. very long), or may never complete at all. For example, if a long running operation can take between one minute and two hours to complete, a client is typically configured to poll every minute so that the response can be displayed for the user after the one-minute operation completes. If the process takes the full two hours to complete, 120 requests are made to the server at one-minute intervals for the single operation. If the operation takes longer to complete, then additional requests are made for that one operation.

Disclosed is a method to reduce the number of requests that a client sends to a server to determine whether a long running operation is complete. A client can begin with a

small polling interval, and then increase the length of the interval over time. For example, after every two requests, the client may double the polling interval, under the assumption that the long running process may continue to run for a long time. The client can set a maximum polling interval (e.g., one request per hour), so that the client continues to provide some kind of feedback on a regular basis.

If the server can determine the best polling interval for the type of operation being invoked, then it can instruct the client to immediately use that polling interval. For example, if the server determines that the operation is expected to take a long time to complete, based on past invocations of the same operation, then it can instruct the client to immediately use a long polling interval.

In addition to a polling interval, the server can respond with a maximum number of remaining requests that the client allows for a particular operation, regardless of the length of the polling interval. This information can be provided as part of the initial server response or at any time in the polling process. If the maximum number of remaining requests is provided as part of the initial server response, then the client can better determine how to set the polling interval throughout the polling process so that all of the available requests are not too qui...