# US 2021/0240712 A1 · Merging multiple unsynchronized streams of related events and multi-tenant support

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

- Number: US 2021/0240712 A1
- Document ID: US20210240712A1
- Status: Published application
- Kind: A1
- Application number: 16/777,885
- Filed: 2020-01-31
- Published: 2021-08-05
- Earliest claimed: 2020-01-31
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Alexander Oscherov; Victor Spivak; Scott Roderick Young; Rohit Deshpande; Nikita Mundhada
- Web page: https://patentgrep.com/patent/US20210240712A1

## CPC

- G06F 16/24568: {Data stream processing; Continuous queries}
- G06F 16/24558: {Binary matching operations}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and system for handling asynchronous data streams in a multi-tenant system. The process includes receiving at least a first stream of data and a second stream of data by a rules engine, determining by pattern matching of the rules engine, whether data in the first stream or data in the second stream meet conditions of a rule defined by a tenant of the multi-tenant system, and implementing by the rules engine the rule including a set of actions to modify data from the second data stream, in response to the data in the first stream matching the conditions the rule.

## Claims

### Claim 1

A method for handling asynchronous event streams in a multi-tenant system, the method comprising:
receiving at least a first stream of events and a second stream of events by a rules engine;
determining by pattern matching of the rules engine, whether data in events of the first stream or data in events of the second stream meet conditions of a rule defined by a tenant of the multi-tenant system; and
implementing by the rules engine the rule including a set of actions to modify data from events of the second stream, in response to the data in the events of the first stream matching the conditions of the rule.

### Claim 2 (depends on 1)

The method of claim 1, wherein the rules engine is implemented in a cluster node of a cluster computing environment.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
initiating, by a cluster configurator, a set of cluster nodes in a cluster computing environment; and
assigning, by the cluster configurator, each cluster node in the set of cluster nodes to process at least a first topic of an event management platform for a first tenant of the multi-tenant system.

### Claim 4 (depends on 3)

The method of claim 3, further comprising
configuring a payload router to route events from the event management platform to a respective cluster node in the set of cluster nodes according to a topic and tenant.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
notifying, by a cluster monitor, a payload router and a set of cluster nodes to suspend activity;
updating, by the cluster monitor, cluster configuration to rebalance topic and tenant assignments across the set of cluster nodes; and
notifying, by the cluster monitor, the payload router and the set of cluster nodes to restart operation with the updated cluster configuration.

### Claim 6 (depends on 2)

The method of claim 2, further comprising:
receiving by a cluster monitor a resource feedback from the multi-tenant system; and
determining whether resource usage for the cluster node is within thresholds set for cluster operation; and
initiating a rebalancing of cluster nodes in response to the resource usage exceeding the thresholds.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
receiving a notification to suspend activity from a cluster configurator or cluster monitor; and
storing state of a declarative rules engine for a tenant to a shared storage.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
receiving notification by a cluster node to resume activity with an updated configuration from a cluster configurator or cluster monitor; and
restoring state by the cluster node for the declarative rules engine from the shared storage.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
routing events of each event stream by a payload router to a respective cluster node according to cluster configuration.

### Claim 10

A non-transitory machine-readable storage medium that provides instructions that, if executed by a processor, will cause said processor to perform operations comprising:
receiving at least a first stream of events and a second stream of events by a rules engine;
determining by pattern matching of the rules engine, whether data in events of the first stream or data in events of the second stream meet conditions of a rule defined by a tenant of a multi-tenant system; and
implementing by the rules engine the rule including a set of actions to modify data from events of the second stream, in response to the data in the events of the first stream matching the conditions of the rule.

### Claim 11 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, wherein the rules engine is implemented in a cluster node of a cluster computing environment.

### Claim 12 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, having further instructions stored therein to cause said processor to perform further operations comprising:
initiating, by a cluster configurator, a set of cluster nodes in a cluster computing environment; and
assigning, by the cluster configurator, each cluster node in the set of cluster nodes to process at least a first topic of an event management platform for a first tenant of the multi-tenant system.

### Claim 13 (depends on 12)

The non-transitory machine-readable storage medium of claim 12, having further instructions stored therein to cause said processor to perform further operations comprising:
configuring a payload router to route events from the event management platform to a respective cluster node in the set of cluster nodes according to a topic and tenant.

### Claim 14 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, having further instructions stored therein to cause said processor to perform further operations comprising:
notifying, by a cluster monitor, a payload router and a set of cluster nodes to suspend activity;
updating, by the cluster monitor, cluster configuration to rebalance topic and tenant assignments across the set of cluster nodes; and
notifying, by the cluster monitor, the payload router and the set of cluster nodes to restart operation with the updated cluster configuration.

### Claim 15 (depends on 11)

The non-transitory machine-readable storage medium of claim 11, having further instructions stored therein to cause said processor to perform further operations comprising:
receiving by a cluster monitor a resource feedback from the multi-tenant system; and
determining whether resource usage for the cluster node is within thresholds set for cluster operation; and
initiating a rebalancing of cluster nodes in response to the resource usage exceeding the thresholds.

### Claim 16 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, having further instructions stored therein to cause said processor to perform further operations comprising:
receiving a notification to suspend activity from a cluster configurator or cluster monitor; and
storing state of a declarative rules engine for a tenant to a shared storage.

### Claim 17 (depends on 16)

The non-transitory machine-readable storage medium of claim 16, having further instructions stored therein to cause said processor to perform further operations comprising:
receiving notification by 1 cluster node to resume activity with an updated configuration from a cluster configurator or cluster monitor; and
restoring state by the cluster node for the declarative rules engine from the shared storage.

### Claim 18 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, having further instructions stored therein to cause said processor to perform further operations comprising:
routing events of each event stream by a payload router to a respective cluster node according to cluster configuration.

### Claim 19

A computing system to implement a method for handling asynchronous event streams in a multi-tenant system, the computing system comprising:
a non-transitory machine-readable storage medium having stored therein a rules engine; and
a processor coupled to the non-transitory machine-readable storage medium, the processor to execute the rules engine, the rules engine to receive at least a first stream of events and a second stream of events, to determine by pattern matching of the rules engine, whether data in events of the first stream or data in events of the second stream meet conditions of a rule defined by a tenant of the multi-tenant system, and to implement the rule including a set of actions to modify data from events of the second stream, in response to the data in the events of first stream matching the conditions of the rule.

### Claim 20 (depends on 19)

The computing system of claim 19, wherein the rules engine is implemented in a cluster node of a cluster computing environment, the processor further to execute a cluster configurator to initiate a set of cluster nodes in a cluster computing environment, and a cluster configurator to assign each cluster node in the set of cluster nodes to process at least a first topic of an event management platform for a first tenant of the multi-tenant system.

### Claim 21 (depends on 1)

The method of claim 1, wherein the set of actions adjust an order of events in the second data stream to align with an order of events in the first data stream according to the rule, or wherein the set of actions organize the events of the first data stream relative to the events of the second data stream to form a merged data stream.

### Claim 22 (depends on 10)

The non-transitory machine-readable storage medium of claim 10, wherein the set of actions adjust an order of events in the second data stream to align with an order of events in the first data stream according to the rule, or wherein the set of actions organize the events of the first data stream relative to the events of the second data stream to form a merged data stream.

### Claim 23 (depends on 19)

The computing system of claim 19, wherein the set of actions adjust an order of events in the second data stream to align with an order of events in the first data stream according to the rule, or wherein the set of actions organize the events of the first data stream relative to the events of the second data stream to form a merged data stream.
