IP Library Granted Patent US 12681756
Granted Patent B2
US 12681756 · App. 17/990,086 · Granted Jul 14, 2026

Automatic synchronous or asynchronous execution of requests

Inventor: Sowmya Tammana (Hyderabad, IN)
Assignee: Salesforce, Inc.
G06F9/4881G06F9/4887G06F9/547
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12681756
App. No.
17/990,086
Filed
Nov 18, 2022
Granted
Jul 14, 2026
Kind
B2
Art Unit
2199
USPC
718/102
Abstract

Systems and techniques are provided that implement application programming interfaces (APIs) that can be executed synchronously or asynchronously depending on the expected response time of the API, the status of the API and/or systems that implement the API, the identity and/or type of user making a request via the API, historical requirements or operation of the API, and/or other factors.

Claims (56)

1 . A method comprising:

receiving a first request from a first requestor;

determining a first expected response time for the first request received from the first requestor based on a prior execution time of the first request and a first host system status;

determining that an application programming interface (API) for the first request does not operate exclusively in a synchronous mode;

determining that further requests can be queued on a messaging queue for the API;

responsive to determining that the first expected response time is over a threshold period and that the API for the first request does not operate exclusively in the synchronous mode and that further requests can be queued on a messaging queue for the API, executing the first request received from the first requestor asynchronously and providing a request identifier to the first requestor;

receiving a request identical to the first request from a second requestor;

determining a second expected response time for the request identical to the first request received from the second requestor based on the prior execution time of the first request and a second host system status;

determining that the application programming interface (API) does not operate exclusively in an asynchronous mode;

determining that the second host system status is a good status; and

responsive to determining that the second expected response time is not over the threshold, that the API does not operate exclusively in the asynchronous mode, and that the second host system status is a good status, executing the request identical to the first request received from the second requestor synchronously and providing a response to the request identical to first request to the second requestor.

2 . The method of claim 1 , wherein the prior execution time of the first request is provided by a machine learning system based on a plurality of prior execution times of the first request.

3 . The method of claim 2 , wherein the prior execution time of the first request is calculated by the machine learning system based on one or more selected from the group comprising: an identity of the first requestor, the prior execution time of the first request, the first host system status, and a size of the first request.

4 . The method of claim 3 , wherein the second expected response time for the request identical to the first request is determined by the machine learning system.

5 . The method of claim 1 , further comprising:

receiving, from the first requestor, an indication of the request identifier; and

responsive to receiving the indication of the request identifier, providing to the first requestor a response to the first request received from the first requestor.

6 . The method of claim 1 , wherein the first request is an API call.

7 . A system for managing requests in a computerized data system, the system comprising:

a plurality of instructions stored on a computer-readable medium;

one or more computer processors configured to execute the plurality of instructions to operate a service to receive and process requests, the service configured to:

receive a first request from a first requestor;

determine a first expected response time for the first request received from the first requestor based on a prior execution time of the first request and a first host system status;

determine that an application programming interface (API) for the first request does not operate exclusively in a synchronous mode;

determine that further requests can be queued on a messaging queue for the API;

responsive to determining that the first expected response time is over a threshold period and that the API for the first request does not operate exclusively in the synchronous mode and that further requests can be queued on a messaging queue for the API, execute the first request received from the first requestor asynchronously and providing a request identifier to the first requestor;

receive a request identical to the first request from a second requestor;

determine a second expected response time for the request identical to the first request received from the second requestor based on the prior execution time of the first request and a second host system status;

determine that the application programming interface (API) does not operate exclusively in an asynchronous mode;

determine that the second host system status is a good status; and

responsive to determining that the second expected response time is not over the threshold, that the API does not operate exclusively in the asynchronous mode, and that the second host system status is a good status, execute the request identical to the first request received from the second requestor synchronously and providing a response to the request identical to the first request to the second requestor.

8 . The system of claim 7 , further comprising a machine learning system configured to provide the prior execution time of the first request based on a plurality of prior execution times of the first request.

9 . The system of claim 8 , wherein the prior execution time of the first request is calculated by the machine learning system based on one or more selected from the group comprising: the identity of the first requestor, the prior execution time of the first request, the first host system status, and a size of the first request.

10 . The system of claim 9 , wherein the second expected response time for the request identical to the first request is determined by the machine learning system.

11 . The system of claim 7 , the service further configured to:

receive, from the first requestor, an indication of the request identifier; and

responsive to receiving the indication of the request identifier, provide to the first requestor a response to the first request received from the first requestor.

12 . The method of claim 1 , wherein the first request is an API call.

13 . A non-transitory computer-readable medium storing a plurality of instructions which, when executed by a computer processor, cause the processor to:

receive a first request from a first requestor;

determine a first expected response time for the first request received from the first requestor based on a prior execution time of the first request and a first host system status;

determine that an application programming interface (API) for the first request does not operate exclusively in a synchronous mode;

determine that further requests can be queued on a messaging queue for the API;

responsive to determining that the first expected response time is over a threshold period and that the API for the first request does not operate exclusively in the synchronous mode and that further requests can be queued on a messaging queue for the API, execute the first request received from the first requestor asynchronously and providing a request identifier to the first requestor;

receive a request identical to the first request from a second requestor;

determine a second expected response time for the request identical to the first request received from the second requestor based on the prior execution time of the first request and a second host system status;

determine that the application programming interface (API) does not operate exclusively in an asynchronous mode;

determine that the second host system status is a good status; and

responsive to determining that the second expected response time is not over the threshold, that the API does not operate exclusively in the asynchronous mode, and that the second host system status is a good status, execute the request identical to the first request received from the second requestor synchronously and providing a response to the request identical to the first request to the second requestor.

14 . The computer-readable medium of claim 13 , wherein the prior execution time of the first request is provided by a machine learning system based on a plurality of prior execution times of the first request.

15 . The computer-readable medium of claim 14 , wherein the prior execution time of the first request is calculated by the machine learning system based on one or more selected from the group comprising: the identity of the first requestor, the prior execution time of the first request, the first host system status, and a size of the first request.

16 . The computer-readable medium of claim 15 , wherein the second expected response time for the request identical to the first request is determined by the machine learning system.

17 . The computer-readable medium of claim 13 , the instructions further causing the processor to:

receive, from the first requestor, an indication of the request identifier; and

responsive to receiving the indication of the request identifier, provide to the first requestor a response to the first request received from the first requestor.

18 . The computer-readable medium of claim 13 , wherein the first request is an API call.