# US 2020/0287841 A1 · Distributed stream-based database triggers

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

- Number: US 2020/0287841 A1
- Document ID: US20200287841A1
- Status: Published application
- Kind: A1
- Application number: 16/880,740
- Filed: 2020-05-21
- Published: 2020-09-10
- Earliest claimed: 2015-09-28
- Assignees: Amazon Technologies, Inc.
- Applicants: Amazon Technologies, Inc.
- Inventors: Parikshit Shivajirao Pol; Subramanian Sankara Subramanian; Rajaprabhu Thiruchi Loganathan; Rama Krishna Sandeep Pokkunuri; Gopinath Duddi; Akshat Vig; Safeer Mohiuddin; Sudarshan Narasimhan
- Web page: https://patentgrep.com/patent/US20200287841A1

## CPC

- H04L 47/822: {Collecting or measuring resource availability data}
- G06F 9/505: {considering the load}
- G06F 11/3433: {for load management (allocation of a server based on load conditions G06F9/505; load rebalancing G06F9/5083; redistributing the load in a network by a load balancer H04L67/1029)}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F 16/137: {Hash-based (content-based indexing of textual data G06F16/31)}
- G06F 16/23: Updating
- G06F 16/24565: {Triggers; Constraints}
- G06F 16/9014: {hash tables}
- H04L 43/065: related to network devices
- G06F 11/3006: {where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems (multiprogramming arrangements G06F9/46; allocation of resources G06F9/50)}
- G06F 2201/80: Database-specific techniques
- G06F 2209/508: Monitor
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Information describing changes to a collection of items maintained by a database may be stored in a log file. The information in the log file may be converted into a stream of records describing the changes. The records may be directed to a computing node selected for performing a trigger function in response to the change, based on applying a hash function to a portion of the record, identifying a hash space associated with a value output by the hash function, and mapping from the hash space to the selected computing node.

## Claims

### Claim 1

A database management system, comprising:
a collection of items in a storage associated with the database management system, wherein the database management system processes a request to store an item in the collection of items;
a plurality of computing nodes, including a first computing node, having access to a set of instructions to be performed in response to the database management system processing the first request; and
a second computing node to:
obtain information indicative of the request;
monitor resource utilization of the plurality of computing nodes;
select the first computing node to perform the set of instructions based on the resource utilization of the plurality of computing nodes, the selection of the first computing node to support balancing workload distribution across the plurality of computing nodes; and
transmit to the first computing node data to cause the first computing node to perform the set of instructions, wherein the data at least comprises the set of instructions.

### Claim 2 (depends on 1)

The database management system of claim 1, wherein the set of instructions corresponds to at least a function of parameters comprising at least one of a primary key of the item, a prior value of the item, or a new value of the item.

### Claim 3 (depends on 1)

The database management system of claim 1, wherein the second computing node is further to:
monitor resource utilization of the first computing node; and
select the first computing node, of the plurality of computing nodes, to perform the set of instructions based at least in part on the resource utilization of the first computing node.

### Claim 4 (depends on 1)

The database management system of claim 1, wherein the second computing node selects the first computing node to perform the set of instructions based, at least in part, on resource utilization of the first computing node being less than an additional computing node of the plurality of computing nodes.

### Claim 5 (depends on 1)

The database management system of claim 1, wherein the set of instructions are included in a script, wherein the script comprising the set of instructions is a trigger function executable by the first computing node.

### Claim 6 (depends on 1)

The database management system of claim 1, wherein obtaining the information indicative of the request causes the second computing node to monitor the resource utilization of the plurality of computing nodes, and select the first computing node to perform the set of instructions based on the resource utilization of the plurality of computing nodes.

### Claim 7

A database management method, comprising:
associating a plurality of computing nodes, including a computing node, with a set of instructions to be performed in response to a request to store an item in a collection of items maintained by a database system;
obtaining information associated with the request to store the item in the collection of items;
in response to obtaining the information, causing the computing node to obtain the set of instructions based at least in part on resource utilization of the plurality of computing nodes; and
causing the set of instructions to be performed by the computing node, wherein causing the computing node to perform the set of instructions at least in part balances workload distribution across the plurality of computing nodes.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
causing the set of instructions to be performed on an additional computing node of the plurality of computing nodes based at least in part on resources utilized by the computing node in performing the set of instructions.

### Claim 9 (depends on 7)

The method of claim 7, wherein causing the computing node to obtain the set of instructions is based at least in part on determining that resource utilization of the computing node is less than resource utilization of another computing node of the plurality of computing nodes.

### Claim 10 (depends on 7)

The method of claim 7, wherein causing the computing node to obtain the set of instructions is based at least in part on determining that resource utilization of the computing node is less than resource utilization of each of other computing nodes of the plurality of computing nodes.

### Claim 11 (depends on 7)

The method of claim 7, further comprising:
halting performance of the set of instructions based at least in part on resources utilized by the computing node in performing the set of instructions.

### Claim 12 (depends on 11)

The method of claim 11, wherein halting performance of the set of instructions is based on determining that resource utilization of the computing node exceeds a threshold amount.

### Claim 13 (depends on 7)

The method of claim 7, further comprising:
causing a plurality of sets of instructions, including the set of instructions, to be executed in response to obtaining information associated with the request.

### Claim 14 (depends on 7)

The method of claim 7, further comprising:
storing information indicative of an association between a plurality of sets of instructions and a hash space, the plurality of sets of instructions including the set of instructions; and
causing each of the plurality of sets of instructions associated with the hash space to be executed in response to obtaining information associated with the request.

### Claim 15

A non-transitory computer-readable storage medium having stored thereon instructions that, upon execution by one or more computing devices, cause the one or more computing devices at least to:
associate a plurality of computing nodes, including a computing node, with a set of instructions to be performed in response to a database system obtaining a request to store an item in a collection of items;
in response to the request, cause the computing node to obtain the set of instructions based at least in part on resource utilization of the plurality of computing nodes; and
cause the set of instructions to be performed by the computing node, wherein causing the computing node to perform the set of instructions at least in part supports equalization of workload distribution across the plurality of computing nodes.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, comprising further instructions that, upon execution by the one or more computing devices, cause the one or more computing devices to at least:
store information indicative of an association between a plurality of sets of instructions and a hash space, the plurality of sets of instructions including the set of instructions; and
cause each of the plurality of sets of instructions associated with the hash space to be executed in response to the request.

### Claim 17 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein causing the computing node to obtain the set of instructions is based at least in part on determining that resource utilization of the computing node is less than resource utilization of another computing node of the plurality of computing nodes.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, comprising further instructions that, upon execution by the one or more computing devices, cause the one or more computing devices to at least:
determine to halt performance of the set of instructions based at least in part on resources utilized by the computing node in performing the set of instructions.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the set of instructions are included in a script, wherein the script comprising the set of instructions is a trigger function executable by the computing node.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the set of instructions comprises at least a primary key of the item and a prior value of the item or a new value of the item.
