# US 8,572,057 B2 · Method and system for applying a group of instructions to metadata

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

- Number: US 8,572,057 B2
- Document ID: US8572057B2
- Status: Granted
- Kind: B2
- Application number: 11/832,549
- Filed: 2007-08-01
- Published: 2008-04-03
- Granted: 2013-10-29
- Earliest claimed: 2006-10-02
- Assignees: salesforce.com, inc.
- Applicants: Benji Jasik; Simon Fell; Bill Eidson; Lexi Viripaeff
- Inventors: Benji Jasik; Simon Fell; Bill Eidson; Lexi Viripaeff
- Web page: https://patentgrep.com/patent/US8572057B2

## CPC

- G06F 16/24573: {using data annotations, e.g. user-defined metadata}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In accordance with embodiments, there are provided mechanisms and methods for applying a group of instructions to metadata in the context of an on-demand database service. These mechanisms and methods for applying a group of instructions to metadata can enable embodiments that ensure that “all or none” of the operations corresponding to the grouped instructions are performed. The ability of embodiments to provide such feature can prevent a scenario where only a portion of a desired effect is accomplished which, in turn, may complicate any effort to undo the same.

## Claims

### Claim 1

A method, comprising:
receiving a plurality of instructions indicating at least one operation to be performed on a plurality of instances of metadata associated with an environment of a subscriber of an on-demand database service, wherein each of the instructions is separately received with a corresponding request to perform the corresponding instruction, such that a plurality of requests are received each indicating a separate one of the instructions to be performed;
determining that the plurality of instructions are members of a same group utilizing information corresponding to the instructions indicating that the instructions are each a member of the group, wherein the information corresponding to the instructions indicating that the instructions are each a member of the group is included in each of the separate requests and includes one of a bit asserted in association with each of the plurality of requests and a tag included within each of the plurality of requests; and
conditionally performing the at least one operation on the instances of metadata associated with the environment of the subscriber, based on whether each of the instructions in the group of instructions is permissible, wherein it is determined whether each of the instructions in the group of instructions is permissible based on at least one of a status and associated access rights of the subscriber, rules associated with the at least one operation to be performed on the instances of the metadata, and rules associated with the instructions;
wherein all of the instructions of the group are required to be permissible in order for the at least one operation to be performed, such that if at least one of the instructions of the group is impermissible then none of the at least one operation indicated by the group of instructions is performed;
wherein when it is determined that all of the instructions of the group are permissible, each of the corresponding requests are inspected to determine a header associated with each of the requests, where for each request, the header indicates whether the request is an asynchronous request;
wherein for each request, when it is determined that the header indicates that the request is an asynchronous request, it is determined whether a local thread pool has enough capacity to process the request in real-time.

### Claim 2 (depends on 1)

The method of claim 1, wherein the group is defined by the subscriber.

### Claim 3 (depends on 1)

The method of claim 1, wherein the at least one operation is performed on the instances of metadata associated with the environment of the subscriber asynchronously with respect to at least one other operation performed by the subscriber using the on-demand database service.

### Claim 4 (depends on 1)

The method of claim 1, wherein the group of instructions is received utilizing an application program interface (API).

### Claim 5 (depends on 1)

The method of claim 1, wherein the at least one operation includes at least one of creating, adding, deleting, updating, and status checking.

### Claim 6 (depends on 1)

The method of claim 1, wherein the metadata includes at least one of a configuration, an object, a field, and a value associated with the environment.

### Claim 7 (depends on 1)

The method of claim 1, and further comprising updating values associated with the metadata.

### Claim 8 (depends on 1)

The method of claim 1, and further comprising sending a confirmation message to the subscriber, in response to the receipt of the group of instructions.

### Claim 9 (depends on 1)

The method of claim 1, and further comprising receiving a status request from the subscriber.

### Claim 10 (depends on 9)

The method of claim 9, and further comprising sending a status message to the subscriber, in response to the receipt of the status request.

### Claim 11 (depends on 10)

The method of claim 10, wherein the status message is conditionally sent to the subscriber, based on a time period within which the status request is received.

### Claim 12 (depends on 1)

The method of claim 1, and further comprising processing the group of instructions.

### Claim 13 (depends on 12)

The method of claim 12, wherein the processing includes determining whether the group of instructions accompanies an asynchronous request.

### Claim 14 (depends on 13)

The method of claim 13, and further comprising determining whether a processing capacity is available, if it is determined that the group of instructions accompanies an asynchronous request.

### Claim 15 (depends on 14)

The method of claim 14, wherein the group of instructions is processed in real-time, if it is determined that the processing capacity is available.

### Claim 16 (depends on 14)

The method of claim 14, and further comprising queuing the group of instructions for processing, if it is determined that the processing capacity is unavailable.

### Claim 17 (depends on 1)

The method of claim 1, wherein the on-demand database service includes a multi-tenant database system.

### Claim 18 (depends on 1)

The method of claim 1, wherein the group of instructions is defined as a function of the metadata and the at least one operation based on a dependency between the metadata and the at least one operation indicating that a first operation of the at least one operation on the metadata requires a second operation of the at least one operation on the metadata.

### Claim 19 (depends on 1)

The method of claim 1, wherein the at least one operation indicated by the group of instructions is executable for obtaining a particular effect on the instances of the metadata, and all of the instructions of the group are required to be permissible in order for the at least one operation to be performed to avoid only a portion of the desired effect being accomplished when a portion of the at least one operation is prevented from being executed as a result of one or more of the instructions in the group being impermissible.

### Claim 20 (depends on 1)

The method of claim 1, wherein it is determined whether each of the instructions in the group of instructions is permissible based on the status and associated access rights of the subscriber, the rules associated with the at least one operation to be performed on the instances of the metadata, and the rules associated with the instructions.

### Claim 21 (depends on 1)

The method of claim 1, wherein for each request, if it is determined that the local thread pool has enough capacity to process the request in real-time, a row is created in a request-tracking data structure to reflect that the request is being handled by a local thread pool.

### Claim 22 (depends on 21)

The method of claim 21, wherein the request-tracking data structure includes a plurality of fields, including a field indicating an identifier of the request, a field indicating an operation to be performed, a field indicating the metadata on which the operation is performed, a field indicating a status of the request, and a field indicating whether the request has been allocated to a thread.

### Claim 23

A non-transitory machine-readable medium carrying one or more sequences of instructions which, when executed by one or more processors, cause the one or more processors to carry out the steps of:
receiving a plurality of instructions indicating at least one operation to be performed on a plurality of instances of metadata associated with an environment of a subscriber of an on-demand database service, wherein each of the instructions is separately received with a corresponding request to perform the corresponding instruction, such that a plurality of requests are received each indicating a separate one of the instructions to be performed;
determining that the plurality of instructions are members of a same group utilizing information corresponding to the instructions indicating that the instructions are each a member of the group, wherein the information corresponding to the instructions indicating that the instructions are each a member of the group is included in each of the separate requests and includes one of a bit asserted in association with each of the plurality of requests and a tag included within each of the plurality of requests; and
conditionally performing the at least one operation on the instances of metadata associated with the environment of the subscriber, based on whether each of the instructions in the group of instructions is permissible, wherein it is determined whether each of the instructions in the group of instructions is permissible based on at least one of a status and associated access rights of the subscriber, rules associated with the at least one operation to be performed on the instances of the metadata, and rules associated with the instructions;
wherein all of the instructions of the group are required to be permissible in order for the at least one operation to be performed, such that if at least one of the instructions of the group is impermissible then none of the at least one operation indicated by the group of instructions is performed;
wherein when it is determined that all of the instructions of the group are permissible, each of the corresponding requests are inspected to determine a header associated with each of the requests, where for each request, the header indicates whether the request is an asynchronous request;
wherein for each request, when it is determined that the header indicates that the request is an asynchronous request, it is determined whether a local thread pool has enough capacity to process the request in real-time.

### Claim 24

An apparatus, comprising:
a hardware processor; and
one or more stored sequences of instructions which, when executed by the processor, cause the processor to carry out the steps of:
receiving a plurality of instructions indicating at least one operation to be performed on a plurality of instances of metadata associated with an environment of a subscriber of an on-demand database service, wherein each of the instructions is separately received with a corresponding request to perform the corresponding instruction, such that a plurality of requests are received each indicating a separate one of the instructions to be performed;
determining that the plurality of instructions are members of a same group utilizing information corresponding to the instructions indicating that the instructions are each a member of the group, wherein the information corresponding to the instructions indicating that the instructions are each a member of the group is included in each of the separate requests and includes one of a bit asserted in association with each of the plurality of requests and a tag included within each of the plurality of requests; and
conditionally performing the at least one operation on the instances of metadata associated with the environment of the subscriber, based on whether each of the instructions in the group of instructions is permissible wherein it is determined whether each of the instructions in the group of instructions is permissible based on at least one of a status and associated access rights of the subscriber, rules associated with the at least one operation to be performed on the instances of the metadata, and rules associated with the instructions;
wherein all of the instructions of the group are required to be permissible in order for the at least one operation to be performed, such that if at least one of the instructions of the group is impermissible then none of the at least one operation indicated by the group of instructions is performed;
wherein when it is determined that all of the instructions of the group are permissible, each of the corresponding requests are inspected to determine a header associated with each of the requests, where for each request, the header indicates whether the request is an asynchronous request;
wherein for each request, when it is determined that the header indicates that the request is an asynchronous request, it is determined whether a local thread pool has enough capacity to process the request in real-time.

### Claim 25

A method for transmitting code in a multi-tenant database system on a transmission medium, the method comprising:
transmitting code to receive a plurality of instructions indicating at least one operation to be performed on a plurality of instances of metadata associated with an environment of a subscriber of an on-demand database service, wherein each of the instructions is separately received with a corresponding request to perform the corresponding instruction, such that a plurality of requests are received each indicating a separate one of the instructions to be performed;
transmitting code to determine that the plurality of instructions are members of a same group utilizing information corresponding to the instructions indicating that the instructions are each a member of the group, wherein the information corresponding to the instructions indicating that the instructions are each a member of the group is included in each of the separate requests and includes one of a bit asserted in association with each of the plurality of requests and a tag included within each of the plurality of requests; and
transmitting code to conditionally perform the at least one operation on the instances of metadata associated with the environment of the subscriber, based on whether each of the instructions in the group of instructions is permissible, utilizing a processor wherein it is determined whether each of the instructions in the group of instructions is permissible based on at least one of a status and associated access rights of the subscriber, rules associated with the at least one operation to be performed on the instances of the metadata, and rules associated with the instructions;
wherein all of the instructions of the group are required to be permissible in order for the at least one operation to be performed, such that if at least one of the instructions of the group is impermissible then none of the at least one operation indicated by the group of instructions is performed;
wherein when it is determined that all of the instructions of the group are permissible, each of the corresponding requests are inspected to determine a header associated with each of the requests, where for each request, the header indicates whether the request is an asynchronous request;
wherein for each request, when it is determined that the header indicates that the request is an asynchronous request, it is determined whether a local thread pool has enough capacity to process the request in real-time.
