# US 2011/0258612 A1 · Methods and systems for debugging bytecode in an on-demand service environment

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

- Number: US 2011/0258612 A1
- Document ID: US20110258612A1
- Status: Published application
- Kind: A1
- Application number: 12/883,066
- Filed: 2010-09-15
- Published: 2011-10-20
- Earliest claimed: 2010-04-20
- Assignees: salesforce.com, inc.
- Inventors: Taggart C. Matthiesen; Richard Unger; Peter S. Wisnovsky
- Web page: https://patentgrep.com/patent/US20110258612A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems for debugging byte code in an on-demand service environment system including a system for simulating execution debug in a multi-tenant database environment. In one embodiment, such a method includes receiving a request at a web-server of the system, wherein the request comprises a request for services from a multi-tenant database implementation within the system, in which the multi-tenant database implementation includes elements of hardware and software that are shared by a plurality of separate and distinct customer organizations, each of the separate and distinct customer organizations being remotely located from a host organization having the system executing therein. The method further includes determining one or more trace preferences are active for the request, sending the request to a logging framework communicatively interfaced to the multi-tenant database implementation, processing the request via the logging framework, and capturing at least a portion of the execution data emitted responsive to execution of the plurality of events for use in simulating execution debug of the events.

## Claims

### Claim 1

A system for simulating execution debug in a multi-tenant database environment, the system comprising:
a multi-tenant database implementation comprising elements of hardware and software that are shared by a plurality of separate and distinct customer organizations;
a logging framework communicatively interfaced to the multi-tenant database implementation, wherein the logging framework comprises one or more services for interfacing with the multi-tenant database implementation, and wherein the one or more services emit execution data describing the execution of a plurality of events processed via the services;
a trace flag analyzer to determine one or more trace preferences;
one or more work thread processors to execute the plurality of events against the multi-tenant database implementation via the logging framework; and
a listener coupled with the logging framework to capture at least a portion of the execution data emitted responsive to execution of the plurality of events.

### Claim 2 (depends on 1)

The system of claim 1, further comprising:
an execution debug simulator to:
access the portion of the execution data emitted responsive to the execution of the plurality of events; and
simulate execution of the plurality of events via a graphical user interface communicatively coupled with the execution debug simulator, wherein simulating execution of the plurality of events comprises at least presenting output corresponding to execution of one or more of the plurality of events based on the portion of execution data accessed and without re-executing any of the plurality of events.

### Claim 3 (depends on 1)

The system of claim 1, further comprising:
the listener to flush the captured portion of the execution data from the hardware memory to a persistent datastore.

### Claim 4 (depends on 1)

The system of claim 1, wherein the hardware memory comprises a high-data-rate Random Access Memory (RAM) and wherein the high-data-rate RAM caches the portion of the execution data emitted responsive to execution of the plurality of events until a flush command is received.

### Claim 5 (depends on 4)

The system of claim 4, further comprising flushing the portion of the execution data from the high-data-rate RAM to a non-volatile storage device, wherein the non-volatile storage device is selected from the group comprising:
persistent storage on a hard-disk drive within the host organization having space allocated to a customer organization associated with the request;
persistent storage within the multi-tenant database implementation in an area allocated to a customer organization associated with the request; and
persistent storage on a non-volatile storage device communicatively interfaced with an end-user client machine having originated the request, wherein the end-user client machine is remote and distinct from the system of the host organization.

### Claim 6 (depends on 1)

The system of claim 1, wherein the trace flag analyzer to determine one or more trace preferences comprises the trace flag analyzer to determine one or more trace preferences are active based on a user identifier (UserID) or a client organization identifier (OrgID) associated with the request.

### Claim 7 (depends on 6)

The system of claim 6, wherein the trace flag analyzer to determine the one or more trace preferences are active based on a UserID or a client organization identifier OrgID associated with the request comprises the trace flag analyzer to perform one of the following operations:
compare a UserID embodied within the request against a plurality of trace flags cached in a memory of the system;
read the one or more trace preferences for the UserID embodied within the request from the multi-tenant database based on the UserID;
read the one or more trace preferences from the request received; or
correspond the UserID to an OrgID associated with the request and implement the one or more trace preferences specified for the OrgID.

### Claim 8 (depends on 1)

The system of claim 1, wherein the web server provides a web-based interface to a remotely located end-user client machine originating the request, wherein the request comprises a request for services from the multi-tenant database implementation operating within the host organization.

### Claim 9 (depends on 8)

The system of claim 8, further comprising:
a webserver, wherein the web server:
receives a request for services from the remotely located end-user client machine;
encodes one or more trace flags into the request based on the one or more trace preferences corresponding to a user identifier (UserID) or a client organization identifier (OrgID) associated with the request; and
forwards the request having the one or more trace flags encoded therein to the one or more work thread processors to process the request.

### Claim 10

A method in a system for simulating execution debug in a multi-tenant database environment, wherein the method comprises:
receiving a request at a web-server of the system, wherein the request comprises a request for services from a multi-tenant database implementation within the system, the multi-tenant database implementation comprising elements of hardware and software that are shared by a plurality of separate and distinct customer organizations;
determining, via a trace flag analyzer, one or more trace preferences for the request;
sending the request to a logging framework communicatively interfaced to the multi-tenant database implementation, wherein the logging framework comprises a plurality of services for interfacing with the multi-tenant database implementation;
processing the request via the logging framework, wherein the logging framework emits execution data describing the execution of events processed via the services; and
capturing at least a portion of the execution data emitted responsive to execution of the plurality of events based on the one or more trace preferences determined for the request.

### Claim 11 (depends on 10)

The method of claim 10, wherein processing the request via the logging framework comprises processing the request via one or more work thread processors, wherein the one or more work thread processors execute the plurality of events against the multi-tenant database implementation, based on the request, via the logging framework.

### Claim 12 (depends on 10)

The method of claim 10, further comprising:
receiving a request to simulate execution debug of the plurality of events processed via the logging framework.

### Claim 13 (depends on 12)

The method of claim 12, further comprising:
simulating the execution of the plurality of events by:
accessing the portion of the execution data emitted responsive to the execution of the plurality of events; and
simulating execution of the plurality of events via a graphical user interface communicatively coupled with an execution debug simulator of the system, wherein simulating execution of the plurality of events comprises at least presenting output corresponding to execution of one or more of the plurality of events based on the portion of execution data accessed without re-executing any of the plurality of events.

### Claim 14 (depends on 10)

The method of claim 10, wherein capturing at least a portion of the execution data emitted responsive to execution of the plurality of events comprises a listener to screen the execution data emitted responsive to the execution of the plurality of events and capture at least a portion of the execution data emitted based on the one or more trace preferences determined to be active for the request; and wherein the method further comprises flushing the captured portion of the execution data from a hardware memory of the system to a persistent datastore separate and distinct from the hardware memory.

### Claim 15 (depends on 14)

The method of claim 14, wherein flushing the portion of the execution data comprises flushing the portion of the execution data from a high-data-rate RAM to a non-volatile storage device, wherein the non-volatile storage device is selected from the group comprising:
persistent storage on a hard-disk drive within the host organization having space allocated to a customer organization associated with the request;
persistent storage within the multi-tenant database implementation in an area allocated to a customer organization associated with the request; and
persistent storage on a non-volatile storage device communicatively interfaced with an end-user client machine having originated the request, wherein the end-user client machine is remote and distinct from the system of the host organization.

### Claim 16 (depends on 10)

The method of claim 10, wherein the trace flag analyzer determines the one or more trace preferences are active for the request based on a user identifier (UserID) or a client organization identifier (OrgID) associated with the request, wherein the UserID corresponds to an end-user originating the request from within one of the plurality of separate and distinct customer organizations remote from the host organization, and wherein the OrgID corresponds to one of the plurality of separate and distinct customer organizations remote from the host organization without regard to the end-user originating the request.

### Claim 17 (depends on 10)

The method of claim 10, further comprising:
performing a look-up operation via the web-server of the one or more trace flags for the request received based on a user identifier (UserID) or a client organization identifier (OrgID) associated with the request;
encoding, via the web-server, the one or more trace flags into the request based on the lookup operation; and
forwarding the request having the one or more trace flags encoded therein to one or more work thread processors to process the request in coordination with the logging framework.

### Claim 18

A non-transitory computer readable storage medium having instructions stored thereon that, when executed by a system for simulating execution debug in a multi-tenant database environment, the instructions cause the system to perform a method comprising:
receiving a request for services from a multi-tenant database implementation within the system, the multi-tenant database implementation comprising elements of hardware and software that are shared by a plurality of separate and distinct customer organizations;
determining one or more trace preferences for the request;
sending the request to a logging framework communicatively interfaced to the multi-tenant database implementation, wherein the logging framework comprises a plurality of services for interfacing with the multi-tenant database implementation;
processing the request via the logging framework, wherein the logging framework emits execution data describing the execution of events processed via the services; and
capturing at least a portion of the execution data emitted responsive to execution of the plurality of events based on the one or more trace preferences determined for the request.

### Claim 19 (depends on 18)

The non-transitory computer readable storage medium of claim 18, wherein the method further comprises receiving a request to simulate execution debug of the plurality of events processed via the logging framework.

### Claim 20 (depends on 19)

The non-transitory computer readable storage medium of claim 19 wherein simulating the execution of the plurality comprises:
accessing the portion of the execution data emitted responsive to the execution of the plurality of events; and
simulating execution of the plurality of events via a graphical user interface communicatively coupled with an execution debug simulator of the system, wherein simulating execution of the plurality of events comprises at least presenting output corresponding to execution of one or more of the plurality of events based on the portion of execution data accessed without re-executing any of the plurality of events.

### Claim 21 (depends on 18)

The non-transitory computer readable storage medium of claim 18, wherein capturing at least a portion of the execution data emitted responsive to execution of the plurality of events comprises screening the execution data emitted responsive to the execution of the plurality of events and via a listener and capturing at least a portion of the execution data emitted based on the one or more trace preferences determined to be active for the request.

### Claim 22 (depends on 21)

The non-transitory computer readable storage medium of claim 21, wherein the method further comprises flushing the captured portion of the execution data from a high-data-rate Random Access Memory (RAM) of the system to a separate and distinct non-volatile storage device, wherein the non-volatile storage device is selected from the group comprising:
persistent storage on a hard-disk drive within the host organization having space allocated to a customer organization associated with the request;
persistent storage within the multi-tenant database implementation in an area allocated to a customer organization associated with the request; and
persistent storage on a non-volatile storage device communicatively interfaced with an end-user client machine having originated the request, wherein the end-user client machine is remote and distinct from the system of the host organization.
