# US 12,001,897 B2 · Resilient asynchronous request-reply solution for message-driven architectures

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,001,897 B2
- Document ID: US12001897B2
- Status: Granted
- Kind: B2
- Application number: 17/734,928
- Filed: 2022-05-02
- Published: 2023-11-02
- Granted: 2024-06-04
- Earliest claimed: 2022-05-02
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Bertram Beyer; Kevin Sieverding
- Web page: https://patentgrep.com/patent/US12001897B2

## CPC

- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for a resilient asynchronous request-reply solution may include initiating, in response to receiving a request from a client device, a process for executing the request using a first service and a second service. The method may include persisting the request as a command in a database accessible to a first instance of the first service and a second instance of the first service. The persisting is performed by a first thread, and the persisting includes storing an association between the first thread and the command. The method also includes sending the command from the first service to the second service, receiving, from the second service, a response to the command, updating, in response to the receiving, the command in the database to include the response, and providing, the response to complete the process. Related systems and articles of manufacture are provided.

## Claims

### Claim 1

A system, comprising:
at least one data processor; and
at least one memory including instructions, which when executed by the at least one data processor, result in operations comprising:
initiating, in response to receiving a request from a client device, a process for executing the request using a first service and a second service;
persisting the request as a command in a database accessible to a first instance of the first service and a second instance of the first service, wherein the persisting is performed by a first thread of the first instance, and wherein the persisting comprises storing an association between the first thread and the command;
sending, by the first thread, the command from the first service to the second service;
receiving, by a second thread of the first instance and from the second service, a response to the command;
updating, by the second thread and in response to the receiving, the command in the database to include the response; and
providing, by the first thread and via the client device, the response to complete the process;
wherein in response to determining an error in the process, the response is provided after a refresh of an application at the client device and unblocking, after the refresh, the first thread of the first instance of the first service, wherein the unblocking is configured to allow the response to be provided to complete the process.

### Claim 2 (depends on 1)

The system of claim 1, wherein the error includes at least one of a timeout prior to receiving the response, a session failure, a service failure, and a routing failure; wherein the at least one of the timeout, the session failure, the service failure, and the routing failure are configured to cause the request to be closed at the first instance of the first service.

### Claim 3 (depends on 1)

The system of claim 1, wherein the operations further comprise storing, at the first service, the request in a local memory of the first instance of the first service.

### Claim 4 (depends on 3)

The system of claim 3, wherein the first thread is configured to call a command controller to persist the request in the local memory of the first instance of the first service.

### Claim 5 (depends on 1)

The system of claim 1, wherein the request is an HTTP request.

### Claim 6 (depends on 1)

The system of claim 1, wherein the first thread is at least one request thread and the second thread is at least one listener thread.

### Claim 7

A computer-implemented method, comprising:
initiating, in response to receiving a request from a client device, a process for executing the request using a first service and a second service;
persisting the request as a command in a database accessible to a first instance of the first service and a second instance of the first service, wherein the persisting is performed by a first thread of the first instance, and wherein the persisting comprises storing an association between the first thread and the command;
sending, by the first thread, the command from the first service to the second service;
receiving, by a second thread of the first instance and from the second service, a response to the command;
updating, by the second thread and in response to the receiving, the command in the database to include the response; and
providing, by the first thread and via the client device, the response to complete the process;
wherein in response to determining an error in the process, the response is provided after a refresh of an application at the client device and unblocking, after the refresh, the first thread of the first instance of the first service, wherein the unblocking is configured to allow the response to be provided to complete the process.

### Claim 8 (depends on 7)

The method of claim 7, wherein the error includes at least one of a timeout prior to receiving the response, a session failure, a service failure, and a routing failure; wherein the at least one of the timeout, the session failure, the service failure, and the routing failure are configured to cause the request to be closed at the first instance of the first service.

### Claim 9 (depends on 7)

The method of claim 7, further comprising storing, at the first service, the request in a local memory of the first instance of the first service.

### Claim 10 (depends on 9)

The method of claim 9, wherein the first thread is configured to call a command controller to persist the request in the local memory of the first instance of the first service.

### Claim 11 (depends on 7)

The method of claim 7, wherein the request is an HTTP request.

### Claim 12 (depends on 7)

The method of claim 7, wherein the first thread is at least one request thread and the second thread is at least one listener thread.

### Claim 13

A non-transitory computer-readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
initiating, in response to receiving a request from a client device, a process for executing the request using a first service and a second service;
persisting the request as a command in a database accessible to a first instance of the first service and a second instance of the first service, wherein the persisting is performed by a first thread of the first instance, and wherein the persisting comprises storing an association between the first thread and the command;
sending, by the first thread, the command from the first service to the second service;
receiving, by a second thread of the first instance and from the second service, a response to the command;
updating, by the second thread and in response to the receiving, the command in the database to include the response; and
providing, by the first thread and via the client device, the response to complete the process;
wherein in response to determining an error in the process, the response is provided after a refresh of an application at the client device and unblocking, after the refresh, the first thread of the first instance of the first service, wherein the unblocking is configured to allow the response to be provided to complete the process.

### Claim 14 (depends on 13)

The non-transitory computer readable medium of claim 13, wherein the error includes at least one of a timeout prior to receiving the response, a session failure, a service failure, and a routing failure; wherein the at least one of the timeout, the session failure, the service failure, and the routing failure are configured to cause the request to be closed at the first instance of the first service.
