# US 2023/0058475 A1 · Transaction based processing using asynchronous microservices

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

- Number: US 2023/0058475 A1
- Document ID: US20230058475A1
- Status: Published application
- Kind: A1
- Application number: 17/759,495
- Filed: 2020-02-04
- Published: 2023-02-23
- Earliest claimed: 2020-02-04
- Assignees: Honeywell International Inc.
- Applicants: Honeywell International Inc.
- Inventors: Yu PANG; Shao Min SUN; Weilin ZHANG
- Web page: https://patentgrep.com/patent/US20230058475A1

## CPC

- G06F 9/4887: {involving deadlines, e.g. rate based, periodic}
- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 9/466: {Transaction processing}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An example of communicating transaction data between a first service and a second service includes receiving transactions of first service, and processing the received transactions and storing the results in a database of the first service. For at least some of the received transactions, corresponding transaction messages are produced for processing by the second service, and tracking that each of the transaction messages is provided to a message queue. The transaction messages are received from the message queue and are processed using the second service, and the results are stored in a database of the second service. When there are duplicate transaction messages received from the message queue, the database of the second service only stores the results of one of the duplicate transaction messages.

## Claims

### Claim 1

A system for maintaining data consistency between a first microservice with a first microservice database and a second microservice with a second microservice database, wherein the first microservice operates asynchronously with the second microservice, and the first microservice initiates transactions that are to be processed by the second microservice, the system comprising:
a transaction initiator configured to process transactions of the first microservice, wherein at least some of the transactions of the first microservice, when processed, update the first microservice database and also produce corresponding transaction messages for processing by the second microservice, the transaction initiator recording the transaction messages in a first transaction table that includes a transaction entry for each transaction message in the first transaction table, and each transaction entry in the first transaction table includes a corresponding transaction identifier and a transaction message status, wherein the transaction message status designates finished or unfinished;
a transaction executor configured to access the first transaction table and provide the transaction messages that have a transaction message status of unfinished into a message queue, the transaction executor configured to update the transaction message status in the first transaction table to finished for those transaction messages that have been placed in the message queue;
a transaction processor configured to receive the transaction messages from the message queue and to process those transaction messages using the second microservice, wherein at least some of the transaction messages, when processed, update the second microservice database, the transaction processor further configured to record each of the transaction messages in a second transaction table that includes a transaction entry for each transaction message, wherein each transaction entry includes the transaction identifier of the corresponding transaction message; and
wherein the transaction processor is further configured to check, for each transaction message received from the message queue, whether the second transaction table already has a transaction entry that has a matching transaction identifier, and if so, cause the second microservice database to include updates from only one of the matching transactions.

### Claim 2 (depends on 1)

The system of claim 1, wherein the transaction initiator updates the first microservice database, produces the corresponding transaction messages and records the transaction messages in the first transaction table via one or more database transactions that ensure data consistency.

### Claim 3 (depends on 1)

The system of claim 1, wherein the transaction processor updates the second microservice database and records each of the transaction messages in the second transaction table via one or more database transactions that ensure data consistency.

### Claim 4 (depends on 1)

The system of claim 1, wherein the transaction executor includes a schedule service that schedules when the transaction executor accesses the first transaction table and provides the transaction messages that have a transaction message status of unfinished into the message queue.

### Claim 5 (depends on 4)

The system of claim 4, wherein the schedule service schedules the transaction executor to accesses the first transaction table and provides the transaction messages that have a transaction message status of unfinished into the message queue at predetermined scheduled times.

### Claim 6 (depends on 1)

The system of claim 1, wherein each transaction entry in the first transaction table further includes transaction data.

### Claim 7 (depends on 6)

The system of claim 6, wherein the transaction data includes workorder data that corresponds to the corresponding transaction message.

### Claim 8 (depends on 1)

The system of claim 1, wherein at least some of the transactions of the first microservice are initiated by a corresponding alarm issued by a building management system.

### Claim 9

A method of communicating transaction data between a first service and a second service, the method comprising:
receiving transactions of a first service;
processing the received transactions and storing the results in a database of the first service;
for at least some of the received transactions, producing corresponding transaction messages for processing by the second service, and tracking that each of the transaction messages is provided to a message queue;
receiving the transaction messages from the message queue;
processing the received transaction messages using the second service and storing the results in a database of the second service; and
when there are duplicate transaction messages received from the message queue, causing the database of the second service to only store the results of one of the duplicate transaction messages.

### Claim 10 (depends on 9)

The method of claim 9, wherein tracking that each of the transaction messages is provided to the message queue comprises storing each of the transaction messages in a first transaction table, wherein each entry of the first transaction table includes a transaction message status of unfinished or finished, wherein the transaction message status is updated to finished when the corresponding transaction message is provided to the message queue.

### Claim 11 (depends on 9)

The method of claim 9, further comprising determining whether there are duplicate transaction messages received from the message queue.

### Claim 12 (depends on 11)

The method of claim 11, wherein determining whether there are duplicate transaction messages received from the message queue comprises:
recording each of the transaction messages in a second transaction table that includes a transaction entry for each transaction message, wherein each transaction entry includes a transaction identifier of the corresponding transaction message; and
check, for each transaction message received from the message queue, whether the second transaction table already has a transaction entry that has a matching transaction identifier, and if so, there are duplicate transaction messages received from the message queue.

### Claim 13 (depends on 9)

The method of claim 9, further comprising scheduling when the transaction messages are provided to the message queue.

### Claim 14 (depends on 13)

The method of claim 13, wherein the transaction messages are scheduled to be provided to the message queue at periodic times.

### Claim 15 (depends on 9)

The method of claim 9, wherein storing results in the database of the first service is performed using a database transaction that ensure data consistency, and storing results in the database of the second service is performed using a database transaction that ensure data consistency.
