# US 2012/0254221 A1 · Systems and methods for performing record actions in a multi-tenant database and application system

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

- Number: US 2012/0254221 A1
- Document ID: US20120254221A1
- Status: Published application
- Kind: A1
- Application number: 13/074,809
- Filed: 2011-03-29
- Published: 2012-10-04
- Earliest claimed: 2011-03-29
- Assignees: salesforce.com, inc.
- Inventors: Sanjaya Lai; Kedar Doshi; Yamuna Esaiarasan; Chaitanya Bhatt
- Web page: https://patentgrep.com/patent/US20120254221A1

## CPC

- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for executing record actions in a multi-tenant database and application service is provided. The system and method is configured to provide a message queue and an event queue, the message queue configured to store a plurality of messages corresponding to record actions and the event queue configured to store a corresponding list of events. The system and method are configured to process record actions on the plurality of records by selecting a plurality of messages in the message queue for processing, the selected plurality of messages corresponding to a plurality of record actions on records in the multi-tenant database, identifying a plurality of events in the event queue corresponding to the selected plurality of messages, and processing the identified plurality of events as a batch to execute the plurality of record actions.

## Claims

### Claim 1

A system comprising:
a memory; and
a server communicatively connected to the memory, the server providing a multi-tenant database and application service that includes a plurality of records, each of the plurality of records associated with a tenant in the multi-tenant database and including at least one connection to another tenant in the multi-tenant database, the server configured to:
provide a message queue configured for storing messages;
provide an event queue configured for storing events; and
process record actions on the plurality of records by:
selecting a plurality of messages in the message queue for processing, the selected plurality of messages corresponding to a plurality of record actions to be performed on records in the multi-tenant database;
identifying a plurality of events in the event queue corresponding to the selected plurality of messages; and
processing the identified plurality of events as a batch to execute the plurality of record actions.

### Claim 2 (depends on 1)

The system of claim 1 wherein the server is configured to select the plurality of messages in the message queue by selecting messages that corresponding to a same source tenant in the multi-tenant database.

### Claim 3 (depends on 1)

The system of claim 1 wherein the server is configured to select the plurality of messages in the message queue by selecting messages that corresponding to both a same source tenant in the multi-tenant database and a same connection to a target tenant.

### Claim 4 (depends on 1)

The system of claim 1 wherein the plurality of record actions include update actions on a record in the multi-tenant database.

### Claim 5 (depends on 1)

The system of claim 1 wherein at least one message in the message queue corresponds to a plurality of events in the event queue.

### Claim 6 (depends on 1)

The system of claim 1 wherein each event in the event queue identifies a corresponding message in the message queue.

### Claim 7 (depends on 1)

The system of claim 1 wherein the server is further configured to create a preprocessing message in the message queue and at least one corresponding preprocessing event in the event queue for updating a plurality of records.

### Claim 8 (depends on 7)

The system of claim 7 wherein the server is further configured to create a plurality of update messages and a plurality of update events in response executing the preprocessing event in the event queue.

### Claim 9

A program product comprising non-transitory data storage media, the non-transitory data storage media storing a program, the program comprising:
a multi-tenant database server, the multi-tenant database server providing access to a plurality of records in a multi-tenant database, each of the plurality of records associated with a source tenant using the multi-tenant database and including at least one connection to target tenant using the multi-tenant database, and wherein the multi-tenant database server comprises;
a message queue configured for storing a messages for use with the multi-tenant database;
an event queue for storing events for use with the multi-tenant database;
a message picker for selecting a plurality of messages in the message queue for processing, the selected plurality of messages corresponding to a plurality of record actions on records in the multi-tenant database; and
a message handler, the message handler configured to identify a plurality of events in the event queue corresponding to the selected plurality of messages and process the identified plurality of events as a batch to execute the plurality of record actions.

### Claim 10 (depends on 9)

The program product of claim 9 wherein the message picker is configured to select the plurality of messages in the message queue by selecting messages that corresponding to a same source tenant in the multi-tenant database.

### Claim 11 (depends on 9)

The program product of claim 9 wherein the message picker is configured to select the plurality of messages in the message queue by selecting messages that corresponding to a same source tenant in the multi-tenant database and have a same connection to a target tenant.

### Claim 12 (depends on 9)

The program product of claim 9 wherein the plurality of record actions include update actions on a record in the multi-tenant database.

### Claim 13 (depends on 9)

The program product of claim 9 wherein at least one message in the message queue corresponds to a plurality of events in the event queue.

### Claim 14 (depends on 9)

The program product of claim 9 wherein a plurality of events in the event queue each identifies a corresponding message in the message queue.

### Claim 15 (depends on 9)

The program product of claim 9 further configured to configured to create a preprocess message in the message queue and at least one corresponding preprocess event in the event queue in response to an update record actions request.

### Claim 16 (depends on 15)

The program product of claim 15 further comprising a preprocess message picker configured to select preprocess messages in the messaging queue.

### Claim 17 (depends on 15)

The program product of claim 15 further comprising a preprocess message handler configured to process the at least one corresponding preprocess event to generate a plurality of update messages and a plurality of update events.

### Claim 18

A system comprising:
a memory; and
a multi-tenant database server, the multi-tenant database server communicatively connected to the memory and providing access to a plurality of records in a multi-tenant database, each of the plurality of records associated with a source tenant using the multi-tenant database and including at least one connection to target tenant using the multi-tenant database, and wherein the multi-tenant database server comprises;
a message queue configured for storing a messages for use with the multi-tenant database, the messages including record action messages and preprocess messages;
an event queue for storing events for use with the multi-tenant database, the events including record action events and preprocess events;
a preprocess message picker for selecting a plurality of preprocess messages in the messaging queue;
a preprocess message handler configured to process the selected plurality of preprocess event to generate a plurality of record action messages in the message queue and a plurality of record action events in the event queue that correspond to update actions.
a message picker for selecting a subset of the plurality of record action messages in the message queue for processing, the message picker configured to select the subset of the plurality of record action messages by selecting messages corresponding to a same source tenant and a same connection; and
a message handler, the message handler configured to identify a plurality of record action events in the event queue corresponding to the selected subset of the plurality of record action messages and process the identified plurality of record action events as a batch to execute a plurality of record actions.
