Methods and systems for utilizing bytecode in an on-demand service environment including providing multi-tenant runtime environments and systems
First Claim
1. A computer-implemented method for execution of code in a runtime environment, the method comprising:
- receiving a request to execute code;
retrieving source code corresponding to the code to be executed from a database, wherein the source code is stored as an abstract syntax tree (AST) that has been serialized into a byte stream in a general-purpose distributed memory caching system where type definitions have been stored as an AST representation of the type generated by a parser;
compiling the retrieved source code to generate executable code;
translating the executable code to bytecode;
parsing the bytecode to find a selected portion of the bytecode to service a request;
executing the selected bytecode in the runtime environment by utilizing parameter passing via stack windows, wherein stack and local variables for multiple methods are shared via a shared data structure and a window into the shared data structure is passed when a method is invoked;
freeing memory used by the selected bytecode upon completion of the execution of the selected bytecode so that the selected bytecode is not preserved in the memory after execution of the bytecode.
1 Assignment
0 Petitions
Accused Products
Abstract
Execution of code in a multitenant runtime environment. A request to execute code corresponding to a tenant identifier (ID) is received in a multitenant environment. The multitenant database stores data for multiple client entities each identified by a tenant ID having one of one or more users associated with the tenant ID. Users of each of multiple client entities can only access data identified by a tenant ID associated with the respective client entity. The multitenant database is a hosted database provided by an entity separate from the client entities, and provides on-demand database service to the client entities. Source code corresponding to the code to be executed is retrieved from a multitenant database. The retrieved source code is compiled. The compiled code is executed in the multitenant runtime environment. The memory used by the compiled code is freed in response to completion of the execution of the compiled code.
168 Citations
15 Claims
-
1. A computer-implemented method for execution of code in a runtime environment, the method comprising:
-
receiving a request to execute code; retrieving source code corresponding to the code to be executed from a database, wherein the source code is stored as an abstract syntax tree (AST) that has been serialized into a byte stream in a general-purpose distributed memory caching system where type definitions have been stored as an AST representation of the type generated by a parser; compiling the retrieved source code to generate executable code; translating the executable code to bytecode; parsing the bytecode to find a selected portion of the bytecode to service a request; executing the selected bytecode in the runtime environment by utilizing parameter passing via stack windows, wherein stack and local variables for multiple methods are shared via a shared data structure and a window into the shared data structure is passed when a method is invoked; freeing memory used by the selected bytecode upon completion of the execution of the selected bytecode so that the selected bytecode is not preserved in the memory after execution of the bytecode. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system to provide a runtime environment for execution of code, the system comprising:
-
a plurality of interconnected hardware server computing platforms; a load-balancing agent communicatively coupled with the plurality of server computing platforms, the load balancing agent to receive a request to execute code, the load balancing agent to allocate execution of the code to a selected one of the plurality of server computing platforms; the selected server computing platform, in response to the allocation from the load-balancing agent, to retrieve source code corresponding to the code to be executed from a database, wherein the source code is stored as an abstract syntax tree (AST) that has been serialized into a byte stream in a general-purpose distributed memory caching system where type definitions have been stored as an AST representation of the type generated by a parser, to compile the retrieved source code to generate executable code, to translate the executable code to bytecode, to parse the bytecode to find a selected portion of the bytecode to service a request, to execute the selected bytecode in the runtime environment by utilizing parameter passing via stack windows, wherein stack and local variables for multiple methods are shared via a shared data structure and a window into the shared data structure is passed when a method is invoked, and to free memory used by the selected bytecode upon completion of the execution of the selected bytecode so that the selected bytecode is not preserved in the memory after execution of the bytecode. - View Dependent Claims (7, 8, 9, 10)
-
-
11. An article of manufacture comprising a non-transitory computer-readable medium having stored thereon instructions to cause one or more processors to provide execution of code in a runtime environment, the instructions, when executed, causing the one or more processors to:
-
receive a request to execute code; retrieve source code corresponding to the code to be executed from a database, wherein the source code is stored as an abstract syntax tree (AST) that has been serialized into a byte stream in a general-purpose distributed memory caching system where type definitions have been stored as an AST representation of the type generated by a parser; compile the retrieved source code to generate executable code; translate the executable code to bytecode; parse the bytecode to find a selected portion of the bytecode to service a request; execute the selected bytecode in the runtime environment by utilizing parameter passing via stack windows, wherein stack and local variables for multiple methods are shared via a shared data structure and a window into the shared data structure is passed when a method is invoked; free memory used by the selected bytecode upon completion of the selected bytecode so that the selected bytecode is not preserved in the memory after execution of the bytecode. - View Dependent Claims (12, 13, 14, 15)
-
Specification