Method and system for profiling virtual application resource utilization patterns by executing virtualized application
Summary by NHIP
Virtual Application Profiling System
The system executes an application file containing multiple data blocks while monitoring read operations performed by initiated threads. It sends read messages to a management process that include a thread discriminate value identifying the module and offset, plus a pseudo thread identifier derived from time and an operating system thread identifier.
Claim Score by NHIP
Abstract
A method and system for profiling execution of an application implemented by an application file comprising a plurality of data blocks. The application is executed in response to an execute command from a management process. Read messages are sent to the management process each time the application reads one or more of the plurality of data blocks of the application file. The management process records information about the read operations in one or more transcripts which may be used to create a streaming model for the application allowing the application to be downloaded using a conventional download protocol without using a specialized streaming protocol.

Term
5.8 yearsleft in the term
Expires 28 June 2032, including 664 days of term adjustment.
- Priority
- Filed
- Granted
- Today
- Expires
28 claims: 2 independent, 26 dependent
- 1A computer-implemented method performed by a runtime engine executing on at least one computing device, the method comprising:in response to an execute command from a management process configured to direct at least a portion of the operations of the runtime engine, executing an application implemented by an application file comprising a plurality of data blocks, the management process operating independently of the runtime engine, a thread being initiated by the execution of the application, the thread having been created by a module associated with a module identifier and execution of the thread having been initiated at an offset location within the module, the module being a Dynamic Link Library file or an executable file;monitoring read operations performed by the application on the application file as the application is executing, the monitoring comprising receiving a thread discriminate value and a pseudo thread identifier from the thread when the thread performs a read operation on the application file, the thread discriminate value identifying the module identifier and on offset value identifying the offset location in the module;and sending a read message comprising the thread discriminate value and the pseudo thread identifier to the management process each time the application reads one or more of the plurality of data blocks of the application file.
- 18Broadest claimClaim Score 45, average(NHIP)A computer-implemented method performed by a management process executing on at least one computing device, the method comprising:sending an execute command to a runtime engine to execute an application implemented by an application file comprising a plurality of data blocks;after the runtime engine begins executing the application, receiving a process start message from the runtime engine, the process start message comprising a pseudo process identifier that uniquely identifies the application, and a time value indicating when the application began executing, wherein the application is executing on an operating system configured to generate a process identifier for each process executing on the operating system, and the pseudo process identifier is determined by performing a hash function on the time value and a process identifier generated by the operating system for the application when the application began executing;recording the pseudo process identifier in a transcript;each time the executing application requests access to one of the plurality of data blocks, receiving an access request message from the runtime engine indicating the application has requested access to the one of the plurality of data blocks;and recording, in the transcript, the application access request to the one of the plurality of data blocks.
Independent claims2
372 paragraphs in 4 sections, as filed
CROSS REFERENCE TO RELATED APPLICATION(S)
This application claims the benefit of U.S. Provisional Application No. 61/361,373, filed Jul. 2, 2010, which is incorporated herein by reference in its entirety.
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention is directed generally to methods and systems for profiling access to a file that implements an application.
2. Description of the Related Art
A virtual application is a virtual machine image pre-configured with all of the files, registry data, settings, components, runtimes, and other dependencies required for a specific application to execute immediately and without installation on a host computing device. The virtual application is partially isolated from other applications implemented on a host computing device and partially isolated from an underlying host operating system installed and executing on the host computing device. The virtual application is encapsulated from the host operating system by a virtual runtime environment, which includes a virtual operating system, that receives operations performed by the virtualized application and redirects them to one or more virtualized locations (e.g., a virtual filesystem, virtual registry, and the like).
Thus, the virtual application may be conceptualized as including two components: a virtualization runtime and a virtual application configuration. The virtualization runtime implements the virtual runtime environment, which implements various operating system application programming interfaces (“APIs”) in such a way that allows the executing virtual application to access and interact with items that may not be present on the host computer. The virtual application configuration includes data necessary to implement the virtual application within the virtualization runtime.
The virtual application is stored in and implemented by one or more data files and/or executable files. Depending upon the implementation details, the one or more data files and/or executable files storing and implementing the virtual application may include blocks of data corresponding to each application file of a natively installed version of the application. Herein, these blocks of data will be referred to as “virtual application files.” The one or more data files and/or executable files storing and implementing the virtual application also include configuration information.
The data files and/or executable files are configured to execute within a virtual runtime environment that is provided at least in part by the virtual operating system. When the virtual application is executed within the virtual runtime engine, the configuration information is used to configure the virtual operating system to execute the virtual application. For example, the configuration information may contain information related to the virtual application files, virtual registry entries, environment variables, services, and the like. The virtual operating system is configured to communicate with the host operating system as required to execute the virtual application on the host computing device.
To download and execute a virtual application, a user must either use a specialized streaming protocol or download the entire virtualized application file before executing the application. Therefore, a need exists for a method and system configured to download and execute a virtualized application file without first downloading the entire file or using a specialized streaming protocol. The virtual application can be executed using less than the entire virtualized application file provided the executing virtual application does not request access to a portion of the file that has not been downloaded. Therefore, a need exists for a method or system that determines in which order the virtual application will request access to portions of the virtualized application file. A need also exists for systems and methods for managing the download and execution of a virtual application by a virtual runtime engine. The present application provides these and other advantages as will be apparent from the following detailed description and accompanying figures.
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING(S)
<figref idref="DRAWINGS">FIG. 1</figref> is a diagram of a system for transferring a virtualized application file from a server computing device to a client computing device over a network.
<figref idref="DRAWINGS">FIG. 2</figref> is an illustration of a conceptualization of software components stored in a system memory of the client computing device of <figref idref="DRAWINGS">FIG. 1</figref>, the software components including a Client Application and a Sandbox Manager.
<figref idref="DRAWINGS">FIG. 3</figref> is an illustration of a conceptualization of software components stored in memory and executing on the server computing device of <figref idref="DRAWINGS">FIG. 1</figref>, the software components include a virtualized application file, and a virtual application authoring tool.
<figref idref="DRAWINGS">FIG. 4</figref> is a flow diagram of a profiling process that records accesses made to the xlayer file by a virtual application as it executes.
<figref idref="DRAWINGS">FIG. 5</figref> is a flow diagram of a method performed by a directing process implemented by the Sandbox Manager.
<figref idref="DRAWINGS">FIG. 6</figref> is a block diagram illustrating transcripts, a combined transcript created based on the transcripts, and a directed graph structure constructed based on the combined transcript.
<figref idref="DRAWINGS">FIG. 7</figref> is a flow diagram of a method that may be performed by the Sandbox Manager and/or a Client Application.
<figref idref="DRAWINGS">FIG. 8</figref> is a diagram of a streaming model.
<figref idref="DRAWINGS">FIG. 9</figref> is a flow diagram of a method of building a streaming model for a particular application and distributing that streaming model across multiple server computing devices.
<figref idref="DRAWINGS">FIG. 10</figref> is an illustration of a ModelRequest table.
<figref idref="DRAWINGS">FIG. 11</figref> is an illustration of an application library database that includes an application table, an application version table, an xlayer table, and an xlayer version table.
<figref idref="DRAWINGS">FIG. 12</figref> is an illustration of a data schema that includes an XStreamModel table, an XFile table, a ServerXFile table, and a Server table.
<figref idref="DRAWINGS">FIG. 13</figref> is a diagram illustrating exemplary communications between a computing device operated by an application publisher or developer (labeled “Client (Publisher)”), the server computing device of <figref idref="DRAWINGS">FIG. 1</figref> (labeled “Public Spoon Serve”), and the model building server of <figref idref="DRAWINGS">FIG. 1</figref> (labeled “Build Server”).
<figref idref="DRAWINGS">FIG. 14</figref> is an illustration of a block of memory shared by the Sandbox Manager and the virtual runtime engine during directed execution of a virtual application.
<figref idref="DRAWINGS">FIG. 15</figref> is an illustration of data structures uses to implement dynamic population of an xlayer file on the client computing device.
<figref idref="DRAWINGS">FIG. 16</figref> is an exemplary xsequence file format.
<figref idref="DRAWINGS">FIG. 17</figref> is an exemplary xblock format.
<figref idref="DRAWINGS">FIG. 18</figref> is a flow diagram of a method that may be performed by the Sandbox Manager.
<figref idref="DRAWINGS">FIG. 19</figref> is a block diagram of a streaming model.
<figref idref="DRAWINGS">FIG. 20</figref> is a flow diagram of a method of building the streaming model of <figref idref="DRAWINGS">FIG. 19</figref>.
<figref idref="DRAWINGS">FIG. 21</figref> is a flow diagram of a method of distributing streaming models.
<figref idref="DRAWINGS">FIG. 22</figref> is a flow diagram of a method of locating a streaming model.
<figref idref="DRAWINGS">FIG. 23</figref> is a flow diagram of a method of constructing the streaming model of <figref idref="DRAWINGS">FIG. 19</figref>.
<figref idref="DRAWINGS">FIG. 24</figref> is a block diagram of a state object.
<figref idref="DRAWINGS">FIG. 25</figref> is a block diagram of a transition data structure.
<figref idref="DRAWINGS">FIG. 26</figref> is a flow diagram of a method of encoding pages of a directed graph structure into xsequence files.
<figref idref="DRAWINGS">FIG. 27</figref> is a flow diagram of a method of starting a virtual application in a directed fashion.
<figref idref="DRAWINGS">FIG. 28</figref> is a diagram of a hardware environment and an operating environment in which one or more of the computing devices of the system of <figref idref="DRAWINGS">FIG. 1</figref> may be implemented.
DETAILED DESCRIPTION OF THE INVENTION
<figref idref="DRAWINGS">FIG. 1</figref> illustrates a system <b>5</b> for downloading or otherwise transferring a virtualized application file stored on a server computing device <b>7</b> to a client computing device <b>9</b> over a network <b>10</b> (e.g., the Internet, a WAN, a LAN, a combination thereof, and the like). One or more additional computing devices, such as a second server computing device <b>6</b> and a computing device <b>11</b>, may also be coupled to the network <b>10</b>. In the embodiment illustrated, the server computing device <b>7</b> is implemented as a web server. The server computing device <b>7</b> may be connected to one or more additional computing devices. In the embodiment illustrated, the server computing device <b>7</b> is connected to a model building server <b>8</b>. Depending on the implementation details, the server computing device <b>7</b> may be connected to the model building server <b>8</b> by the network <b>10</b>.
A diagram of hardware and an operating environment in conjunction with which implementations of the server computing device <b>7</b>, the model building server <b>8</b>, the client computing device <b>9</b>, the computing device <b>11</b>, and the network <b>10</b> may be practiced is provided in <figref idref="DRAWINGS">FIG. 28</figref> and described below.
<figref idref="DRAWINGS">FIG. 2</figref> illustrates a system memory <b>22</b>A of the client computing device <b>9</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>) storing a conventional operating system <b>35</b>A, that like most operating systems, includes a filesystem <b>126</b>A, a registry <b>128</b>A, and a process environment and threading subsystems component <b>130</b>A. A Client Application <b>132</b> (e.g., a web browser application) and a Sandbox Manager <b>134</b> are also stored in the system memory <b>22</b>A of the client computing device <b>9</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>). Optionally, the Client Application <b>132</b> may include a plug-in <b>136</b> or similar application. In the embodiment illustrated, the Client Application <b>132</b> communicates with the Sandbox Manager <b>134</b> over a communication link <b>138</b> that may be implemented as a Transmission Control Protocol (“TCP”) connection using TCP protocol. Each virtualized application file being transferred and/or executed may be identified by a unique session identifier (“SessionId”). A cache <b>139</b> may be stored on the filesystem <b>126</b>A for use by the Sandbox Manager <b>134</b>. The Sandbox Manager <b>134</b> and Client Application <b>132</b> are described in detail in U.S. patent application Ser. No. 12/695,107, filed on Jan. 27, 2010, and titled SYSTEM FOR DOWNLOADING AND EXECUTING A VIRTUAL APPLICATION, which is incorporated herein by reference.
As explained above, a virtualized application file <b>140</b> is transferred to the client computing device <b>9</b> from the server computing device <b>7</b>. The virtualized application file <b>140</b> is illustrated in dashed lines to indicate that the virtualized application file <b>140</b> is stored in the cache <b>139</b> during and after the download. However, before the download begins, the virtualized application file <b>140</b> is not stored in the cache <b>139</b>. As will be explained below, the virtualized application file <b>140</b> may be an executable file or a file configured to execute within a virtualized environment provided by a virtual machine (or virtual runtime engine).
The system memory <b>22</b>A stores one or more files implementing one or more virtual machines (or virtual runtime engines). By way of a non-limiting example, the system memory <b>22</b>A may include a plurality of virtual machine executable files <b>137</b> that when executed, each implement a different virtual machine. For example, each of the virtual machine executable files <b>137</b> may implement a different version of the same virtual machine. The virtual machine executable files <b>137</b> may be executed individually. When executed, a virtual machine executable file implements a virtualized environment. Execution of a virtual machine executable file may be initiated by the Sandbox Manager <b>134</b> using a command including a parameter (e.g., a file path) identifying a virtualized application file to execute. In response to receiving the parameter, the virtual machine executable file executes the identified virtualized application file inside the virtualized environment implemented by the virtual machine executable file. <figref idref="DRAWINGS">FIG. 2</figref> illustrates a virtual application <b>110</b> (implemented by the virtualized application file <b>140</b>) being executed by a virtual runtime engine <b>131</b>. The virtual runtime engine <b>131</b> may execute within an operating system shell process. Optionally, the virtual machine executable files <b>137</b> may be stored in the cache <b>139</b>.
The Sandbox Manager <b>134</b> and the virtual runtime engine <b>131</b> may both have read/write access to a block of shared memory <b>133</b> that may be used to send settings and state information between the Sandbox Manager <b>134</b> and the virtual runtime engine <b>131</b>.
The virtualized application file <b>140</b> includes a version identifier that may be used by the Sandbox Manager <b>134</b> to select which of the virtual machine executable files <b>137</b> is configured to execute the virtualized application file <b>140</b>.
<figref idref="DRAWINGS">FIG. 3</figref> illustrates a system memory <b>22</b>B of the server computing device <b>7</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>). The system memory <b>22</b>B stores a conventional host operating system <b>35</b>B, that like most operating systems, includes a host filesystem <b>126</b>B, a host registry <b>128</b>B, and a process environment and threading subsystems component <b>130</b>B. <figref idref="DRAWINGS">FIG. 3</figref> also illustrates an executable virtualized application file <b>140</b> stored in the system memory <b>22</b>B and configured to execute on the host operating system <b>35</b>A (see <figref idref="DRAWINGS">FIG. 2</figref>) of the client computing device <b>9</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>), optionally within a virtual machine implemented by a separate virtual machine executable file, without having been installed on the host operating system <b>35</b>B. The virtualized application file <b>140</b> may be configured to execute on the operating system <b>35</b>B of the server computing device <b>7</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>), optionally within a virtual machine (or virtual runtime engine) implemented by a separate virtual machine executable file, but this is not a requirement.
In the embodiment illustrated, the system memory <b>22</b>B stores web server components <b>142</b> configured to implement a web server. The web server components <b>142</b> may be configured to provide a web page having one or more links to virtualized application files using standard Hypertext Transfer Protocol (“HTTP”) protocol. By way of non-limiting examples, the web server components <b>142</b> may include Internet Information Services (“IIS”) provided by Microsoft Corporation, Apache, and the like. While illustrated as being outside the filesystem <b>126</b>B, those of ordinary skill in the art appreciate that the virtualized application file <b>140</b> and the web server components <b>142</b> may be conceptualized as being within the filesystem <b>126</b>B.
The virtualized application file <b>140</b> may include components necessary to implement a virtual runtime environment including a virtual operating system <b>120</b> configured to execute in the operating system <b>35</b>A (see <figref idref="DRAWINGS">FIG. 2</figref>) of the client computing device <b>9</b> (illustrated in <figref idref="DRAWINGS">FIG. 1</figref>). Alternatively, the virtual runtime environment may be implemented by one of the virtual machine executable files <b>137</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). The virtualized application file <b>140</b> includes components necessary to implement the virtual application <b>110</b> configured to execute in the virtual runtime environment (provided by the virtual runtime engine <b>131</b> illustrated in <figref idref="DRAWINGS">FIG. 2</figref>). In particular embodiments, a single virtualized application file is used to implement both the virtual operating system <b>120</b> and the virtual application <b>110</b>. However, those of ordinary skill in the art appreciate that more than one virtualized application file may be used to implement the virtual operating system <b>120</b> and the virtual application <b>110</b>. For example, the components implementing the virtual runtime environment may be stored in one of the virtual machine executable files <b>137</b> (see <figref idref="DRAWINGS">FIG. 2</figref>) and the components implementing the virtual application <b>110</b> may be stored in the virtualized application file <b>140</b>. Further, one or more of the files used to implement the virtual application <b>110</b> may be other than an executable file having the “exe” file extension.
The virtual operating system <b>120</b> includes a virtual filesystem <b>150</b>, a virtual registry <b>152</b>, and a virtual process environment and threading subsystems component <b>154</b>. The virtual application <b>110</b> interacts with the virtual filesystem <b>150</b>, virtual registry <b>152</b>, and virtual process environment and threading subsystems component <b>154</b>, instead of interacting directly with the host filesystem <b>126</b>A, the host registry <b>128</b>A, and the process environment and threading subsystems component <b>130</b>A of the host operating system <b>35</b>A illustrated in <figref idref="DRAWINGS">FIG. 2</figref>. The virtual operating system <b>120</b> is configured to communicate with the host operating system <b>35</b>A illustrated in <figref idref="DRAWINGS">FIG. 2</figref> as required to execute the virtual application <b>110</b>.
The virtual application <b>110</b> executes inside a virtual runtime environment provided at least in part by the virtual operating system <b>120</b>. Some virtual applications require one or more additional runtime environments to execute. For example, to execute a Flash application, the Flash runtime engine must also be installed. Therefore, to virtualize a Flash application, both the Flash application and Flash runtime engine must be included in the virtualized application file <b>140</b> and configured to execute in the portions of the virtual runtime environment provided by the virtual operating system <b>120</b>. Collectively, all runtime components necessary to execute the virtual application <b>110</b> will be referred to as a virtual runtime engine. However, those of ordinary skill in the art appreciate that the virtual runtime engine may include only the virtual operating system <b>120</b> and components of other additional runtime engines (e.g., the Flash runtime engine) required to execute the virtual application <b>110</b> may be loaded separately by the virtual operating system <b>120</b>. When executed, the virtual runtime engine generates, at least in part, the virtual runtime environment in which the virtual application <b>110</b> executes.
Referring to <figref idref="DRAWINGS">FIG. 2</figref>, a natively installed version of an application is configured to execute within a runtime environment provided at least in part by the host operating system <b>35</b>A. Typically, to execute within the runtime environment provided at least in part by the host operating system <b>35</b>A, a natively installed version of an application modifies the configuration and settings of the host operating system <b>35</b>A. For example, the natively installed version may install dynamic link libraries or change registry settings of the host operating system <b>35</b>A. In contrast, a virtual version of the same application may be executed on the host operating system <b>35</b>A without installation on the host operating system <b>35</b>A. Thus, the virtual application <b>110</b> does not modify the configuration or settings of the host operating system <b>35</b>A. For example, to execute the virtual application <b>110</b>, dynamic link libraries (“dlls”), data files, registry settings, environment variables, and the like need not be modified on to the host operating system <b>35</b>A.
The virtualized application file <b>140</b> includes virtualized application files <b>123</b>A-<b>123</b>C corresponding to application files <b>111</b>A-<b>111</b>C of a natively installed version of the same application. The virtualized application files <b>123</b>A-<b>123</b>C are stored as blocks of data inside a configuration data block <b>121</b>. During execution, the virtualized application files <b>123</b>A-<b>123</b>C are accessed via the virtual filesystem <b>150</b>. The virtualized application files <b>123</b>A-<b>123</b>C include one or more startup executables. The virtualized application file <b>140</b> identifies one or more startup executables that are executed when the virtual application <b>110</b> is first executed. The startup executables may be identified in the configuration data block <b>121</b>.
When the virtualized application file <b>140</b> is executed, the configuration data block <b>121</b> is used to configure the virtual operating system <b>120</b> to execute the virtual application. For example, the configuration data block <b>121</b> may contain configuration information related to the files in the virtual filesystem <b>150</b> (e.g., the virtualized application files <b>123</b>A-<b>123</b>C), entries in the virtual registry <b>152</b>, environment variables, services, and the like. The configuration data block <b>121</b> may also include basic application metadata and settings such as the application name, application version, and sandbox location. Further, the configuration data block <b>121</b> may provide isolation information to the virtual operating system <b>120</b>. This information indicates which virtualized application files <b>123</b>A-<b>123</b>C, virtual registry keys, virtual registry values, environment variables, and services are to be isolated from the host operating system <b>35</b>A.
The configuration data block <b>121</b> may also include one or more virtual layers. Each virtual layer may identify files, registry entries, environment variables, and services. As the virtual layers are read, the corresponding files, registry entries, environment variables, and services are added to appropriate runtime data-structures. If the virtualized application file <b>140</b> is configured to execute on more than one host operating system, the configuration data block <b>121</b> may include a virtual layer for each operating system. In such an embodiment, each virtual layer includes information necessary to configure the virtual runtime environment to execute on a particular operating system. Further, the configuration data block <b>121</b> may include a virtual layer that includes configuration information common to the other virtual layers (e.g., a “default” virtual layer).
To execute the virtual application <b>110</b>, an initialization process is first performed. During this process, the virtual operation system <b>120</b> is launched and configured by the configuration data block <b>121</b>. A component of the virtual runtime engine <b>131</b> referred to as a “reader” (not shown) reads data stored in the configuration data block <b>121</b> and uses that data to configure the virtual runtime environment. For example, the reader reads the virtual layer for the host operating system <b>35</b>A and any other applicable virtual layers and uses the information read to configure the virtual operation system <b>120</b> (and in some implementations, other components of the virtual runtime environment) to execute the virtual application <b>110</b> on the host operating system <b>35</b>A. The virtual filesystem <b>150</b> may be configured to mirror a host filesystem configured to execute a natively installed version of the application. Similarly, the virtual registry <b>152</b> may be configured to mirror a host registry configured to execute a natively installed version of the application.
After the initialization process has completed, the appropriate startup executable(s) is/are launched inside the virtual operating system <b>120</b>. The virtual operating system <b>120</b> intercepts calls to the host operating system <b>35</b>A (see <figref idref="DRAWINGS">FIG. 2</figref>) and routes them to corresponding components of the virtual operating system <b>120</b>. For example, when the virtual application <b>110</b> requests to access an application file using a path of a natively installed version of the application, the virtual operating system <b>120</b> intercepts the request and routes the request to one of the virtualized application files <b>123</b>A-<b>123</b>C corresponding to the application file requested. The virtual operating system <b>120</b> may also route some requests and actions to the host operating system <b>35</b>A (see <figref idref="DRAWINGS">FIG. 2</figref>) for processing.
The virtualized application file <b>140</b> is read-only and when executed, cannot be modified by the virtual application <b>110</b> or components of the virtual runtime engine <b>131</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). Therefore, modifications to the data stored in the configuration data block <b>121</b> (e.g., modifications to the virtualized application files <b>123</b>A-<b>123</b>C, modifications to the registry keys of the virtual registry <b>152</b>, and the like) are written to a readable and writable memory location referred to herein as a sandbox <b>124</b>. The sandbox <b>124</b> is a location on the host filesystem <b>126</b>A, a network share, a removable storage device, and the like whereat files may be created, modified, and deleted by the virtual application <b>110</b> at runtime. For example, when the virtual operating system <b>120</b> needs to create, modify, or delete a virtualized application file, the virtual operating system does so in the sandbox <b>124</b>. Similarly, if the virtual application <b>110</b> modifies a virtual registry value, the virtual registry value is changed in the sandbox <b>124</b>. The virtual operating system <b>120</b> may also route some requests and actions to the host operating system <b>35</b>A for processing.
U.S. patent application Ser. No. 12/188,155, filed on Aug. 7, 2008, U.S. patent application Ser. No. 12/188,161 filed on Aug. 7, 2008, and U.S. patent application Ser. No. 12/685,576 filed on Jan. 11, 2010, all of which are incorporated herein by reference in their entireties, disclose systems that may be used to create and configure the virtualized application file <b>140</b>. As described in greater detail in U.S. patent application Ser. Nos. 12/188,155, 12/188,161, and 12/685,576, the virtualized application file <b>140</b> may be created by a virtual application executable constructor or authoring tool <b>170</b> using an application template that includes copies of files, such as a configuration file <b>202</b>, application files <b>111</b>A-<b>111</b>C, and the like, used to configure the virtualized application file <b>140</b>. However, the template is not a requirement. Instead, to build the virtualized application file <b>140</b>, the authoring tool <b>170</b> needs only the configuration file <b>202</b> and copies of any applications files <b>111</b>A-<b>111</b>C necessary for a natively installed version of the application to execute. The applications files <b>111</b>A-<b>111</b>C, and the configuration file <b>202</b> are referred to collectively as an application configuration <b>171</b>.
The authoring tool <b>170</b> combines the application configuration <b>171</b> and the components of the virtual runtime engine (e.g., the virtual operating system <b>120</b>) into the executable virtualized application file <b>140</b>. Sometimes multiple virtual applications share a common set of virtual machine configuration settings or virtual runtime engine components. By way of a non-limiting example, multiple Flash applications may be configured to be executed by the same Flash runtime engine. Further, system administrators may want to share a common set of configuration options (e.g., browser bookmarks, application settings, etc.) across a department or enterprise. These settings may be stored in a file, referred to as an xlayer file <b>300</b>, and incorporated into one or more virtual application files at runtime by the virtual runtime engine <b>131</b>. Depending upon the implementation details, the authoring tool <b>170</b> may be used to create the xlayer file <b>300</b>.
The xlayer file <b>300</b> cannot be executed directly from the host operating system <b>35</b>A and instead requires the virtual runtime environment supplied at least in part by the virtual operating system <b>120</b>. Like the configuration data block <b>121</b>, the xlayer file <b>300</b> may be read by the reader of the virtual runtime engine at runtime. The information stored within the xlayer file <b>300</b> may be made available to a virtual application (e.g., the virtual application <b>110</b>) via the virtual filesystem <b>150</b> and virtual registry <b>152</b> of the virtual operating system <b>120</b> at runtime. By way of a non-limiting example, the configuration data block <b>121</b> may specify a location on the host filesystem <b>126</b>A whereat the virtual runtime engine <b>131</b> is configured to look for xlayer files. If an xlayer file is located in the specified location, the xlayer file <b>300</b> may be read automatically by the reader of the virtual runtime environment. Alternatively, the virtual runtime engine <b>131</b> may be configured to look for xlayer files in a particular location each time the virtual application <b>110</b> is executed.
The xlayer file <b>300</b> may be shared between users and used to supply virtual machine settings to multiple virtual applications. The xlayer file <b>300</b> may include all virtual registry and virtual filesystem information associated with a particular software component (e.g., a virtual runtime engine component), allowing the component to be fully installed in the virtual runtime environment. The xlayer file <b>300</b> may include all of the application data required to implement the virtual application <b>110</b> when executed by the virtual runtime engine <b>131</b>. The xlayer file <b>300</b> may be implemented as a binary file. The data in the xlayer file <b>300</b> may be organized in one or more virtual layers substantially similar to the virtual layers of the configuration data block <b>121</b> described above.
As is apparent to those of ordinary skill in the art, the number of files and registry keys needed to implement a virtual application (such as the virtual application <b>110</b>) and/or a component encoded in the xlayer file <b>300</b> can be very large. For example, it is not uncommon for the number of files and registry keys needed to implement a virtual application to total in the tens of thousands. Therefore, the performance characteristics of the configuration data block <b>121</b> and the xlayer file <b>300</b> can affect the performance of the virtual application <b>110</b> significantly. In other words, the performance characteristics of the configuration data block <b>121</b> and/or the xlayer file <b>300</b> can increase or decrease the startup time for the virtual application <b>110</b>.
Further, the size of the xlayer file <b>300</b> may affect an amount of time required to access data stored by the xlayer file <b>300</b>, which may affect the performance of the virtual application <b>110</b>. The size of the xlayer file <b>300</b> also affects an amount of time required to download (or otherwise communicate) the xlayer file <b>300</b> between computing devices (e.g., the computing devices <b>7</b> and <b>9</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>) and across a network (e.g., the network <b>10</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>).
As is apparent to those of ordinary skill in the art, the configuration data block <b>121</b> and the xlayer file <b>300</b> store similar data and therefore, can be formatted in accordance with a common format. U.S. patent application Ser. No. 12/697,029, filed on Mar. 31, 2010, entitled Method and System for Improving Startup Performance and Interoperability of a Virtual Application, which is incorporated herein by reference in its entirety, describes a file format that may be used to configure the configuration data block <b>121</b> portion of the executable virtualized application file <b>140</b> and/or the xlayer file <b>300</b>.
xsequence Files
Referring to <figref idref="DRAWINGS">FIG. 3</figref>, as mentioned above, the size of the xlayer file <b>300</b> may affect the amount of time required to access data stored by the xlayer file <b>300</b>, which may affect the performance of the virtual application <b>110</b>. The size of the xlayer file <b>300</b> also affects an amount of time required to download (or otherwise communicate) the xlayer file <b>300</b> between computing devices (e.g., from the server computing device <b>7</b> to the client computing device <b>9</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>) and across a network (e.g., the network <b>10</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>).
Applications often store large amounts of data in a single file stored on a hard disk. For example, the virtual application <b>110</b> may be executed using one or more xlayer files (e.g., the xlayer file <b>300</b>). Unlike streaming media where a file is used in a linear fashion, some applications (e.g., the virtual application <b>110</b>) require random access to chunks of data, referred to herein as “pages.” Thus, the pages required by the end user (or the application) are retrieved from a file in a non-sequential fashion. In other words, the pages are accessed in non-predetermined sequences that may include some randomness and may be difficult to predict. Depending upon the implementation details, pages may have a predetermined size (e.g., 4 kilobytes, 10 kilobytes, etc.). Alternatively, pages may have non-uniform sizes.
If during execution, an application suddenly requires access to a page that has not yet been downloaded, a delay must be introduced to download the page. Alternatively, execution of the application may end. To avoid this problem, when the xlayer file <b>300</b> is hosted on a web server (e.g., a web server implemented by the web server components <b>142</b> of the server computing device <b>7</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>), the user may download the entire xlayer file <b>300</b> to the client computing device <b>9</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref> before the virtual application <b>110</b> can be executed on the client computing device <b>9</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>. The delay introduced by the download process greatly impacts the user experience. However, delays may be avoided by preemptively downloading pages before they are needed but, as mentioned above, preemptive downloading is difficult because which pages will be accessed by the application and when may be difficult to predict. Thus, it is desirable to download the pages in an order that is consistent with an order in which the application (when operated by a user) will request access to the pages.
If there is a predictable pattern in the order in which the pages are requested by the application, the pages can be ordered and encoded into files that model this pattern. In this manner, the most commonly accessed pages or page sequences may be downloaded first. This improves access time and transmission efficiency. Depending upon the implementation details, this ordering and encoding allows the pages to be distributed using standard Hypertext Transfer Protocol (“HTTP”), which is a conventional download technology, and does not require the use of specialized streaming protocols. By way of additional non-limiting examples, the pages to be distributed using other conventional download protocols, including File Transfer Protocol (“FTP”), Server Message Block Protocol (“SMB”), and the like.
For example, pages stored in a large single xlayer file (e.g., the xlayer file <b>300</b>) can be reordered and divided into a plurality of smaller files (referred to herein as “xsequence files”) encoded using a predetermined file format (referred to herein as “xsequence file format,” which is described in detail below). The xsequence file format is configured to store permutations of at least a portion of the pages stored in a larger file (e.g., the xlayer file <b>300</b>) and enables streaming distribution of the larger xlayer file. As mentioned above, the smaller xsequence files may be streamed over the Internet using conventional download methods thereby transferring the data of the xlayer file between different computing devices. Thus, the virtual application <b>110</b> may be launched by the client computing device <b>9</b> from the web without first downloading the entire xlayer file <b>300</b>. This may greatly decrease startup latency. The remaining portions of the xlayer file may be downloaded subsequently while the user interacts with the executing virtual application <b>110</b>.
For ease of illustration, the file from which one or more xsequence files are created will be referred to as an “original file.” While the original file may be an xlayer file (e.g., the xlayer file <b>300</b>) having one or more of the file format(s) described in U.S. patent application Ser. No. 12/697,029, it is apparent to those of ordinary skill in the art that the original file may have a format other than the file format(s) described in U.S. patent application Ser. No. 12/697,029. For example, the original file may be an alternate encoding of a virtual machine or virtual application, a data file, an xml file, and the like. For ease of illustration, the original file is described below as implementing the virtual application <b>110</b>. However, as is apparent to those of ordinary skill in the art, the original file may implement other applications, including applications requiring installation on the client computing device <b>9</b> (see <figref idref="DRAWINGS">FIG. 1</figref>).
Profiling
Profiling generally refers to a method of analyzing an application (e.g., the virtual application <b>110</b>) to determine usage statistics. A profile or transcript of the application contains information about a single execution of the application such as the order of the page access, and the time spent in each transition between pages. The transcript may be stored in a transcript file <b>125</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). Multiple transcript files may be combined or merged to generate a streaming model <b>122</b> (illustrated in <figref idref="DRAWINGS">FIG. 19</figref> and described below).
An application (e.g., the virtual application <b>110</b>) may implement one or more processes that are selectively executed as the application executes. As the virtual application <b>110</b> executes, it implements one or more such processes that each access the original file (e.g., the xlayer file <b>300</b>) to obtain information about the virtual application <b>110</b>. This information includes, but is not limited to, virtual environment settings, virtual filesystem information, virtual registry information, and the like. This information resides in various locations within the original file (e.g., the xlayer file <b>300</b>). Threads and processes spawned by the virtual application <b>110</b> as it executes may be treated as separate instances and merged together in the same transcript file in a manner similar to that used to merge multiple transcript files together (discussed below).
A profiling process <b>700</b> described below may be used to determine an order in which blocks of data (pages) stored in a file are accessed by an executing application. For ease of illustration, the profiling process <b>700</b> will be described as being performed with the virtual application <b>110</b>. However, as is apparent to those of ordinary skill in the art, the profiling process <b>700</b> may be performed with other types of applications, including applications requiring installation on the client computing device <b>9</b> (see <figref idref="DRAWINGS">FIG. 1</figref>).
The profiling process <b>700</b> profiles usage of the virtual application <b>110</b> to generate transcript files (such as the transcript file <b>125</b> illustrated in <figref idref="DRAWINGS">FIG. 2</figref>) that are used to generate a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) that specifies an order in which pages are downloaded from the server computing device <b>7</b> to the client computing device <b>9</b>. While the xlayer file <b>300</b> may be thought of as generally opaque, data is written sequentially within the xlayer file <b>300</b>. Furthermore, virtual files within a specific virtual directory are generally written sequentially, one after the other. The same can be said for virtual registry keys and values. Therefore, profiling access to the xlayer file <b>300</b> is substantially similar to profiling access to the underlying files and registry entries of a natively installed application.
As mentioned above, the Sandbox Manager <b>134</b> (see <figref idref="DRAWINGS">FIG. 2</figref>) may execute the virtual application <b>110</b> (inside the virtual runtime engine <b>131</b>). As will be explained below, the Sandbox Manager <b>134</b> may implement a directing process <b>129</b> (see <figref idref="DRAWINGS">FIG. 2</figref>) configured to collect profile information that may be used to profile the virtual application's access to the underlying original file (e.g., the xlayer file <b>300</b>). Such profile information may be used to perform statistical analysis of a software application (e.g., the virtual application <b>110</b>) to create a model of its data consumption. The profile information may also be used to make runtime adjustments in real-time to the data-delivery schedule (described in the Modeling Subsection below). The data-delivery schedule being the order in which data or pages are organized in the xsequence files and/or the order in which the xsequence files are delivered to the client computing device <b>9</b>.
The information stored in the transcript files (generated by the profiling process <b>700</b>) is then used to divide the original file into pages that are loaded onto the server computing device <b>7</b> for download to the client computing device <b>9</b>. The server computing device <b>7</b> streams the xsequence files to the client computing device <b>9</b> through the Client Application <b>132</b> and the Sandbox Manager <b>134</b> that together download and execute the pages.
The profiling process <b>700</b> described herein may be used to perform accurate and low-overhead profiling of a virtual application's access to an underlying xlayer file. Depending upon the implementation details, the profiling process <b>700</b> may include the use of per-thread data structures and named-pipes to communicate to the directing process <b>129</b> that by the executing virtual application <b>110</b> has requested access to raw block level data (stored in the original file, e.g., the xlayer file <b>300</b>). The term “per-thread data structure” refers to a data structure corresponding to a single thread. Thus, a separate per-thread data structure may be created for each thread used by an application (e.g., the virtual application <b>110</b>). A ThreadDiscriminate value is sent to the Sandbox Manager <b>134</b> by the virtual runtime engine <b>131</b> when a thread is created. The ThreadDiscriminate value is an entry point discriminator for the thread accessing the xlayer file. An example method of generating the ThreadDiscriminate value is described below.
The profiling process <b>700</b> is performed using a PseudoPid value and a PseudoTid value. The PseudoPid value and the PseudoTid value are determined by the virtual runtime engine <b>131</b>.
The PseudoPid value is a unique process identifier of the application process accessing the original file (e.g., the xlayer file <b>300</b>). Because operating system allocated process identifiers (“Pid” values) can be recycled and reused, a unique identifier (the PseudoPid value) is generated for each process. The PseudoPid value may be generated by performing a hash function using the operating system allocated Pid value and the current system time as input parameters. For example, the following pseudo code may be used to generate the PseudoPid value:
PseudoPid=Hash(GetCurrentProcessId( ) GetSystemTime( )).
The hash function performed may be a 32-bit “good” hash function. Those of ordinary skill in the art are familiar with good hash functions. Therefore, such functions will not be described herein.
Furthermore, because operating system allocated thread identifiers (“Tid” values) can be recycled and reused, a unique identifier (the PseudoTid value) is generated for each thread. The PseudoTid value may be generated by performing a hash function using the operating system allocated Tid value and the current system time as input parameters. For example, the following pseudo code may be used to generate the PseudoTid value:
PseudoTid=Hash(GetCurrentThreadId( ), GetSystemTime( ))
The hash function performed may be a 32-bit “good” hash function.
Thus, there may be three different scopes for the profiling process <b>700</b>: Session, Process, and Thread. Session scope includes the profiling context of a single execution of the virtual application <b>110</b>. As is apparent to those of ordinary skill in the art, during execution, the virtual application <b>110</b> may include multiple processes and multiple threads.
Process scope refers to the lifetime of a single process instance (given a unique PseudoPid value, described below) within a session. If two or more virtualized application files are launched more than once, a separate process for each launched file (each having a different PseudoPid value) and a separate process contexts for each launched file are created (or recorded) within a transcript. If the same virtualized application file is launched more than once, execution statistics recorded for each process can be aggregated using the name of the virtualized application file (or other identifier) to identify execution statistics associated with the same virtualized application file.
Thread scope refers to the lifetime of a single thread instance (given a unique PseudoTid value, described below) within a process (and therefore session). Different threads may be identified in the transcript using the ThreadDiscriminate value (described below). If a thread with the same ThreadDiscriminate value is launched more than once, execution statistics recorded for the thread (having that ThreadDiscriminate value) can be aggregated using the ThreadDiscriminate value (or other identifier) to identify execution statistics associated with the same thread or similar threads. As is apparent to those of ordinary skill in the art, because the ThreadDiscriminate value stores an identifier (e.g., a file name) of an entry point module (e.g., a Dynamic Link Library “dll” file, an executable file, and the like) and a relative offset within the module whereat execution of the thread began, different threads may have the same ThreadDiscriminate value.
Each time the virtual application <b>110</b> accesses the original file, access information (including one or more execution statistics) is recorded. For example, each time the virtual application <b>110</b> accesses the original file (e.g., the xlayer file <b>300</b>), the Sandbox Manager <b>134</b> may record a PseudoTid value, an xlayerId value, an AccessOffset value, an AccessBytes value, a TickCount value, and flags. This access is associated with the PseudoPid value of the process that created the thread.
The xlayerId value is an identifier of the xlayer file <b>300</b>. The xlayerId value may be a hash (e.g., a “good” hash) of the path of the xlayer file <b>300</b>. The AccessOffset value is an offset in bytes of the portion of the xlayer file <b>300</b> accessed. The AccessBytes value is a size in bytes of the portion of the xlayer file <b>300</b> accessed. The TickCount value is a current Operating System (“OS”) tick count at the time the xlayer file <b>300</b> is accessed. The flags may include a Blocked value implemented as Boolean field. The Blocked value indicates whether the virtual runtime engine <b>131</b> and/or the virtual application <b>110</b> is/are blocked from further execution of the page for which access is requested.
During performance of the profiling process <b>700</b>, data is recorded for each process over its lifetime. Thus, each process is tracked over the duration of its lifetime. Optionally, shutdown notifications may not be tracked.
During performance of the profiling process <b>700</b>, data is recorded for each thread over its lifetime. Thus, each thread is tracked over the duration of its lifetime. Optionally, thread-shutdown notifications may not be tracked.
When the profiling process <b>700</b> is performed, it may be useful to aggregate statistics collected for the same application code path. A thread discriminate (the ThreadDiscriminate value) is used to identify a code path by its starting point. The ThreadDiscriminate value may be obtained by performing a hash function using the name of the entry point module (e.g., a file name) and the entry point relative offset within the module as input parameters. Optionally, the name of the entry point module may include the file path. The hash function performed may be a 32-bit “good” hash function. For example, if the entry point for the thread was in a file named “myapplogic.dll,” and at an offset of 0x10025, the hash function is performed on the bytes of the string “myapplogic.dll” using the offset (0x10025) as a seed value. The ThreadDiscriminate value for any xlayer access from this thread is set to the resulting value generated by the hash function. For example, the following pseudo code may be used to generate the ThreadDiscriminate value:
<tables id="TABLE-US-00001" num="00001"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="70pt" align="left" /><colspec colname="2" colwidth="133pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>ThreadDiscriminate =</entry><entry>Hash(<module name>,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="98pt" align="left" /><colspec colname="1" colwidth="119pt" align="left" /><tbody valign="top"><row><entry /><entry> <relative entry point offset</entry></row><row><entry /><entry>in bytes>)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The ThreadDiscriminate value may be stored in a per-thread data structure. The following is a non-limiting example of such a structure:
<tables id="TABLE-US-00002" num="00002"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>struct CVmTlsData</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>DWORD UniqueThreadId;</entry></row><row><entry /><entry>DWORD Discriminant;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
By way of a non-limiting example, the ThreadDiscriminate value may be stored in a per-thread data structure (e.g., the structure “CVmTIsData”) using dynamic thread-local-storage mechanisms via Win32::TIsGetValue and ::TIsSetValue APIs. As is apparent to those of ordinary skill in the art, thread-local-storage mechanisms refer to storing data in a thread-local-storage location that is accessible only by a thread associated with the thread-local-storage location. The ThreadDiscriminate value and/or the PseudoTid value for a particular thread may be stored in the thread-local-storage location associated with the particular thread. The thread may look up the ThreadDiscriminate value and/or the PseudoTid stored in the thread-local-storage location and provide such information to the virtual runtime engine <b>131</b>, which may in turn, communicate the information to the directing process <b>129</b>.
The structure may be initialized at thread creation time. By way of a non-limiting example, hooking the CreateThread system call may be used to initialize the structure at thread creation time. In other words, an instance of the structure “CVmTIsData” may be created in response to each detection of the CreateThread system call by the hook on the CreateThread system call. Hooking the CreateThread system call is a technique known to those of ordinary skill in the art and will not be described in detail.
When an application thread is created, a PseudoTid value and ThreadDiscriminate value are determined as described above. Then, memory for the structure “CVmTIsData” is allocated, and the structure “CVmTIsData” is saved in thread-local-storage. By way of a non-limiting example, the structure may be saved in thread-local-storage via the Win32::TIsSetValue API. By way of another non-limiting example, the following pseudo code may be used to create a per-thread data structure, which in this example, is the structure “CVmTIsData.”
<tables id="TABLE-US-00003" num="00003"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>Intercept application thread creation</entry></row><row><entry /><entry>On new thread creation Do</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>CVmTlsData data = AllocateMemory (sizeof(CVmTlsData))</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="56pt" align="left" /><colspec colname="2" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>data.PseudoTid =</entry><entry>Hash(GetCurrentThreadId( ),</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>GetSystemTime( ))</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>data.Discriminate = Hash(<module name>, <relative</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="98pt" align="left" /><colspec colname="1" colwidth="119pt" align="left" /><tbody valign="top"><row><entry /><entry>entry point offset in</entry></row><row><entry /><entry>bytes>)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>::TlsSetValue(VM_TLS_INDEX, data)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
After the PseudoTid value and the ThreadDiscriminate value are stored in the per-thread data structure (e.g., the structure “CVmTIsData”), each access to the original file (e.g., the xlayer file <b>300</b>) during execution of the virtual application <b>110</b> is recorded by the Sandbox Manager <b>134</b> in a transcript file <b>125</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). By way of a non-limiting example, the transcript file <b>125</b> may have a simple binary format and may use the extension “xt.” The transcript file <b>125</b> may include a header followed by a series of tuples that each include a thread identifier (e.g., the PseudoTid value), a timestamp value, and a block identifier or number. Optionally, the transcript file <b>125</b> may also store the PseudoPid value. In the transcript file <b>125</b>, the tuples may be organized by process (or PseudoPid value) in a hierarchical structure.
Named pipe communication may be used to provide communication between the virtual runtime engine <b>131</b> and the directing process <b>129</b> (implemented by the Sandbox Manager <b>134</b>). Thus, the directing process <b>129</b> may “listen” to the virtual runtime engine <b>131</b> over at least one named pipe connection <b>127</b> illustrated in <figref idref="DRAWINGS">FIG. 2</figref>. Those of ordinary skill in the art are familiar with the use of named pipes as a means of implementing communication between processes. Therefore, named pipes will not be described in further detail.
<figref idref="DRAWINGS">FIG. 4</figref> is a flow diagram of the profiling process <b>700</b> that records accesses made to the original file (e.g., the xlayer file <b>300</b>) by the virtual application <b>110</b> as it executes.
In first block <b>710</b>, the virtual runtime engine <b>131</b> receives an instruction from the Sandbox Manager <b>134</b> to execute the virtual application <b>110</b> in profiling mode. As will be described in more detail below, the virtual runtime engine <b>131</b> may also receive information (e.g., the SessionId value, and the path to the xlayer file) from the Sandbox Manager <b>134</b>.
Then, in block <b>715</b>, the virtual runtime engine <b>131</b> begins execution of the virtual application <b>110</b> in profiling mode.
In block <b>717</b>, the virtual runtime engine <b>131</b> connects to the named pipe of the Sandbox Manager <b>134</b> to form the named pipe connection <b>127</b>.
In block <b>718</b>, the virtual runtime engine <b>131</b> constructs a message containing the SessionId value received from the Sandbox Manager <b>134</b> in block <b>710</b> and optionally other information (e.g., the Pid value, the PseudoPid value, a ProcessName value, and a Process Name Length value). This message signals the start of a new process. The virtual application <b>110</b> is associated with a process that may launch one or more additional processes. Thus, the first message received by the Sandbox Manager <b>134</b> signals the start of the virtual application <b>110</b>. The Pid value in the first message is associated with the virtual application <b>110</b> itself. By way of a non-limiting example, the Pid value may be obtained using a function named “::GetCurrentProcessId( )” As mentioned above, the PseudoPid value may be obtained using a hash function. By way of a non-limiting example, the ProcessName value may be obtained using a function named “GetStartupExecutableName( ).” The ProcessName value is a file name of the entry point executable file of the process. For example, the ProcessName value may be the filename of the original file (e.g., the xlayer file <b>300</b>). However, this is not always the case. The ProcessName value may not be the filename of the original file (e.g., the xlayer file <b>300</b>). The ProcessName Value may be used to merge statistics across processes having the same name.
The following structure named “SProcessConnectMessage” may be used to construct the message containing the new process information.
<tables id="TABLE-US-00004" num="00004"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>struct SProcessConnectMessage</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>ULONGLONG SessionId;</entry></row><row><entry /><entry>DWORD Pid;</entry></row><row><entry /><entry>DWORD PseudoPid;</entry></row><row><entry /><entry>DWORD NameLength;</entry></row><row><entry /><entry>WCHAR Name[CWC_MAX_PROCESS_NAME+1];</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
In the above pseudo code, the Name variable stores the ProcessName value. The message constructed in block <b>718</b> may inform listeners (e.g., the directing process <b>129</b>) that a new process is starting. The message may be sent by the virtual runtime engine <b>131</b> to the Sandbox Manager <b>134</b> once for each PseudoPid value.
Then, in block <b>719</b>, the virtual runtime engine <b>131</b> sends the message constructed in block <b>718</b> to the directing process <b>129</b> implemented by the Sandbox Manager <b>134</b>. At this point, communication between the Sandbox Manager <b>134</b> and the virtual runtime engine <b>131</b> has been properly initialized, and messages including statistics may be sent from the virtual runtime engine <b>131</b> to the Sandbox Manager <b>134</b> for recordation in a transcript file.
In next block <b>720</b>, all read operations (e.g., IStream::Read operations) performed by the virtual application <b>110</b> with respect to the original file (e.g., the xlayer file <b>300</b>) are monitored. This may be achieved by abstracting access to the original file through the standard IStream interface, which is used to read data from the original file. The IStream interface is configured to read from and write data to stream objects. Those of ordinary skill in the art are familiar with reading data from a file (such as the xlayer file <b>300</b>) and this process will not be described in detail.
In decision block <b>725</b>, the virtual runtime engine <b>131</b> determines whether a read operation is being performed on the original file (e.g., the xlayer file <b>300</b>) or execution of the virtual application <b>110</b> has terminated. The decision in decision block <b>725</b> is “ACCESS” when a read operation has been detected by the virtual runtime engine <b>131</b>. The decision in decision block <b>725</b> is “TERMINATED” when the virtual runtime engine <b>131</b> detects execution of the virtual application <b>110</b> has terminated.
A method of detecting when execution of the virtual application <b>110</b> has terminated is described below. When the decision in decision block <b>725</b> is “TERMINATED,” the method <b>700</b> terminates.
When the decision in decision block <b>725</b> is “ACCESS,” in decision block <b>755</b>, the virtual runtime engine <b>131</b> determines whether this is the first time the thread associated with the PseudoTid has accessed the xlayer file. The data stored in the per-thread data structures (e.g., the structures “CVmTIsData” described above) may be used to determine whether this is the first time the thread associated with the PseudoTid value has accessed the original file. The decision in decision block <b>755</b> is “YES” when this is the first time the thread associated with the PseudoTid value has accessed the xlayer file. Otherwise, the decision in decision block <b>755</b> is “NO” when this is not the first time the thread associated with the PseudoTid value has accessed the xlayer file.
When the decision in decision block <b>755</b> is “NO,” the virtual runtime engine <b>131</b> advances to block <b>730</b>.
When the decision in decision block <b>755</b> is “YES,” in block <b>740</b>, the virtual runtime engine <b>131</b> stores the new thread information (e.g., the PseudoTid value, and the ThreadDiscriminate value). In block <b>740</b>, both of the PseudoTid value and the ThreadDiscriminate value may be stored in the per-thread data structure (e.g., the structure “CVmTIsData”). By way of a non-limiting example, these values may be obtained via the Win32::TIsGetValue API.
Then, in block <b>760</b>, the virtual runtime engine <b>131</b> constructs a message containing the new thread information (e.g., the PseudoTid value and the ThreadDiscriminate value). The message constructed in block <b>760</b> is sent by the virtual runtime engine <b>131</b> to the Sandbox Manager <b>134</b> once for each PseudoTid value. The following structure named “SThreadStartedMessage” may be used to construct the message containing the new thread information.
<tables id="TABLE-US-00005" num="00005"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>struct SThreadStartedMessage</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="49pt" align="left" /><colspec colname="2" colwidth="105pt" align="left" /><tbody valign="top"><row><entry /><entry>DWORD</entry><entry>PseudoTid;</entry></row><row><entry /><entry>DWORD</entry><entry>Discriminate;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The variable named “Discriminate” in the above pseudo code stores a ThreadDiscriminate value that is sent when a new thread is created. The ThreadDiscriminate value is an entry point discriminator for the thread accessing the original file (e.g., the xlayer file <b>300</b>).
In block <b>765</b>, the virtual runtime engine <b>131</b> sends the message constructed in block <b>760</b> to the Sandbox Manager <b>134</b>. Then, the virtual runtime engine <b>131</b> advances to block <b>730</b>.
In block <b>730</b>, an offset value indicating where in the original file the read operation started and a length value indicating an amount of the original file read are recorded. The offset may be implemented as a 64-bit value. The PseudoTid value is also recorded. Further, the current process tick count is recorded as the TickCount value.
In next block <b>750</b>, a message including the information recorded above (e.g., the PseudoTid value, the xlayerId value, the AccessOffset value, the AccessBytes value, the TickCount value, and flags) is constructed. The message also includes an xlayerId value that is an identifier of the original file (e.g., the xlayer file <b>300</b>). By way of a non-limiting example, the message may be implemented using the following data structure (named “SFeedbackStatsMessage”):
<tables id="TABLE-US-00006" num="00006"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>struct SFeedbackStatsMessage</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="84pt" align="left" /><colspec colname="2" colwidth="84pt" align="left" /><tbody valign="top"><row><entry /><entry>DWORD</entry><entry>PseudoTid;</entry></row><row><entry /><entry>DWORD</entry><entry>XLayerId;</entry></row><row><entry /><entry>DWORD</entry><entry>Flags;</entry></row><row><entry /><entry>DWORD</entry><entry>TickCount;</entry></row><row><entry /><entry>ULONGLONG</entry><entry>AccessOffset;</entry></row><row><entry /><entry>ULONGLONG</entry><entry>AccessBytes;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> In the data structure named “SFeedbackStatsMessage,” a flags member may store the Blocked value (discussed above).
In summary, the Sandbox Manager <b>134</b> sends the SessionId value and the path of the original file to the virtual runtime engine <b>131</b>. The xlayerId value may be determined by performing a hash function (e.g., a “good” hash function) on the path. When a new process accesses the original file, the virtual runtime engine <b>131</b> sends the SessionId value, the Pid value, the PseduoPid value, the ProcessName value, and the Process Name Length value to the Sandbox Manager <b>134</b>. The Sandbox Manager <b>134</b> may use this information to associate processes with the session identified by the SessionId value. Because two different sessions launched under the directing process <b>129</b> (see <figref idref="DRAWINGS">FIG. 2</figref>) may use the same xlayerId value, the SessionId value is send to the Sandbox Manager <b>134</b> to inform the Sandbox Manager as to which child session sent the information to the directing process <b>129</b> (see <figref idref="DRAWINGS">FIG. 2</figref>).
When a new thread accesses the original file, the virtual runtime engine <b>131</b> sends the PseudoTid value and the ThreadDiscriminate value to the Sandbox Manager <b>134</b>. For each read operation performed by the virtual application <b>110</b> on the original file, the virtual runtime engine <b>131</b> sends the PseudoTid value, the xlayerId value, the AccessOffset value, the AccessBytes value, the TickCount value, and flags to the Sandbox Manager <b>134</b>. The Sandbox Manager <b>134</b> may use this information to associate each read operation with the original file identified by the xlayerId value and the thread identified by the PseudoTid value. The xlayerId value is used because a single session may include the execution of one or more application file in addition to the original file.
Then, in block <b>752</b>, the virtual runtime engine <b>131</b> sends the message “SFeedbackStatsMessage” to the directing process <b>129</b>. Then, the virtual runtime engine <b>131</b> returns to block <b>720</b>.
The following pseudo code provides a non-limiting example of an implementation of the blocks <b>755</b>, <b>740</b>, <b>760</b>, <b>765</b>, <b>730</b>, <b>750</b>, and <b>752</b> of the profiling process <b>700</b> described above.
<tables id="TABLE-US-00007" num="00007"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>Method CaptureXLayerAccess(AccessOffset, AccessBytes)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>CVmTlsData tlsData = ::TlsGetValue(VM_TLS_INDEX)</entry></row><row><entry /><entry>PseudoTid = tlsData.UniqueThreadId</entry></row><row><entry /><entry>ThreadDiscriminate = tlsData.Discriminant</entry></row><row><entry /><entry>TickCount = ::GetTickCount( )</entry></row><row><entry /><entry>If FirstTimeSeen(PseudoTid) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>SThreadStartedMessage msgNewThread</entry></row><row><entry /><entry>msgNewThread.PseusoTid = PseudoTid</entry></row><row><entry /><entry>msgNewThread.Discriminate = ThreadDiscriminate</entry></row><row><entry /><entry>SendMessageToDirectingProcess(msgNewThread)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry>SFeedbackStatsMessage msgStats</entry></row><row><entry /><entry>msgStats.PseudoTid = PseudoTid</entry></row><row><entry /><entry>msgStats.TickCount = TickCount</entry></row><row><entry /><entry>msgStats.AccessOffset = AccessOffset</entry></row><row><entry /><entry>msgStats.AccessBytes = AccessBytes</entry></row><row><entry /><entry>SendMessageToDirectingProcess(msgStats)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
If the virtual application <b>110</b> initiates a child process, the virtual runtime engine <b>131</b> will perform block <b>718</b> using the same SessionId received in block <b>710</b>. The named pipe connection <b>127</b> created in block <b>717</b> is used for child processes.
It may be beneficial if the profiling process <b>700</b> has as little affect on the running application as possible. In such implementations, communication mechanisms may be very fast and invisible to the running application itself. Using the named pipe of the Sandbox Manager <b>134</b> to provide communication between the virtual runtime engine <b>131</b> and the directing process <b>129</b> may provide such benefits. Thus, the messages sent in blocks <b>719</b>, <b>752</b>, and <b>765</b> may be sent over the named pipe connection(s) <b>127</b>.
On the WINDOWS® platform, named pipes are implemented with multiple instance support. Thus, multiple clients (e.g., virtual runtime engines) can communicate with a single named pipe server (implemented by the Sandbox Manager <b>134</b>), with each client having an isolated connection to the same named pipe. In other words, each process (even processes started by the process associated with the virtual application) will connect separately to the named pipe server. On the named pipe server (implemented by the Sandbox Manager <b>134</b>), multiple connections are handled via a unique connection handle for each client (e.g., virtual runtime engine). Thus, each virtual runtime engine running a virtual application can connect to the name pipe of the same Sandbox Manager <b>134</b> and send statistics to the single Sandbox Manager.
One named pipe connection per process may be used. In such implementations, access to the named pipe from multiple threads may be serialized within a process via a critical section. This may impact performance of the virtual application <b>110</b> slightly. However, the size of the data being sent is small and named pipe communication is inherently fast. Thus, this method may provide satisfactory performance.
<figref idref="DRAWINGS">FIG. 5</figref> is a flow diagram of a method <b>800</b> performed by the directing process <b>129</b> implemented by the Sandbox Manager <b>134</b>. When the virtual application <b>110</b> is launched by the Sandbox Manager <b>134</b> (e.g., by a command received by the virtual runtime engine <b>131</b> from the Sandbox Manager <b>134</b> in block <b>710</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref>), the Sandbox Manager <b>134</b> may provide information (e.g., one or more command line parameters) to the virtual runtime engine <b>131</b>. This information may include the SessionId value and the path to the original file (e.g., the xlayer file <b>300</b>). The SessionId value may be the same session identifier value used by a connection between the Client Application <b>132</b> (e.g., the plug-in <b>136</b>) and the Sandbox Manager <b>134</b> (described in U.S. patent application Ser. No. 12/695,107). The SessionId value is passed to the virtual runtime engine <b>131</b> so the directing process <b>129</b> can associate all statistics with the correct virtual application instance, in the event multiple virtual applications are executing and being profiled concurrently.
In first block <b>810</b>, the Sandbox Manager <b>134</b> obtains information (e.g., command line parameters) to send to the virtual runtime engine <b>131</b> along with a command to execute the virtual application <b>110</b> in profiling mode. By way of a non-limiting example, the SessionId may have been obtained via a /XExecutionSession command line parameter.
In block <b>815</b>, the Sandbox Manager <b>134</b> sends the information and a command to execute the virtual application <b>110</b> in profiling mode to the virtual runtime engine <b>131</b>. The virtual runtime engine <b>131</b> knows it was started by a parent process (the directing process <b>129</b> of the Sandbox Manager <b>134</b>). With that information, the virtual runtime engine <b>131</b> initiates the named pipe communication with the Sandbox Manager <b>134</b> to send messages (including those with execution statistics) to the directing process <b>129</b>.
The execute command and the SessionId value are received by the virtual runtime engine <b>131</b> in block <b>710</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref> and described above.
As discussed above, while the virtual application <b>110</b> is executing in profiling mode, the Sandbox Manager <b>134</b> may receive messages from the virtual runtime engine <b>131</b> and generate events in response to those messages.
In decision block <b>820</b>, the Sandbox Manager <b>134</b> determines whether it has received a message from the virtual runtime engine <b>131</b> or execution of the virtual application <b>110</b> has terminated. If a message is received, the decision in decision block <b>820</b> is “RECEIVED” and the Sandbox Manager <b>134</b> advances to decision block <b>825</b>. Otherwise, if the virtual runtime engine <b>131</b> stops executing the virtual application <b>110</b> before a message is received, the decision in decision block <b>820</b> is “TERMINATED” and the method <b>800</b> terminates.
When the virtual runtime engine <b>131</b> detects that a process is accessing the original file (e.g., the xlayer file <b>300</b>) for the first time, the virtual runtime engine <b>131</b> sends a message (optionally implemented using a structure name “SProcessConnectMessage”) to the directing process <b>129</b>. In decision block <b>825</b>, the Sandbox Manager <b>134</b> determines whether the message received in block <b>820</b> indicates a process is accessing the original file (e.g., the xlayer file <b>300</b>) for the first time. The decision in decision block <b>825</b> is “YES” when the message received in block <b>820</b> indicates a process is accessing the original file (e.g., the xlayer file <b>300</b>) for the first time. For example, the decision in decision block <b>825</b> is “YES” when the message received was constructed in block <b>718</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref>. Otherwise, the decision in decision block <b>825</b> is “NO” when the message received in block <b>820</b> does not indicate the process is accessing the original file (e.g., the xlayer file <b>300</b>) for the first time.
When the decision in decision block <b>825</b> is “YES,” in block <b>830</b>, the Sandbox Manager <b>134</b> generates a ProcessStarted event. In block <b>835</b>, Sandbox Manager <b>134</b> records information included in the message (e.g., the SessionId, PseudoPid, and ProcessName values). This information may be recorded in the transcript file <b>125</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). Then, the Sandbox Manager <b>134</b> advances to decision block <b>870</b>.
When the decision in decision block <b>825</b> is “NO,” in decision block <b>840</b>, the Sandbox Manager <b>134</b> determines whether the message received in block <b>820</b> includes statistics to be stored in the transcript file <b>125</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). The decision in decision block <b>840</b> is “YES” when the message received in block <b>820</b> indicates the message received in block <b>820</b> includes statistics to be stored in the transcript file <b>125</b>. For example, the decision in decision block <b>840</b> is “YES” when the message received was constructed in block <b>750</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref>. Otherwise, the decision in decision block <b>840</b> is “NO” when the message received in block <b>820</b> does not indicate that the message received in block <b>820</b> includes statistics to be stored in the transcript file <b>125</b>.
When the decision in decision block <b>840</b> is “YES,” in block <b>845</b>, the Sandbox Manager <b>134</b> generates an ExecutionStatistic event. Then, in block <b>850</b>, the statistics included in the message are stored in the transcript file <b>125</b>. Then, the Sandbox Manager <b>134</b> advances to decision block <b>870</b>.
When the decision in decision block <b>840</b> is “NO,” in decision block <b>855</b>, the Sandbox Manager <b>134</b> determines whether the message received in block <b>820</b> indicates a thread is accessing the original file (e.g., the xlayer file <b>300</b>) for the first time. The decision in decision block <b>855</b> is “YES” when the message received in block <b>820</b> indicates a thread is accessing the original file for the first time. Otherwise, the decision in decision block <b>855</b> is “NO.”
When the decision in decision block <b>855</b> is “YES,” in block <b>860</b>, the Sandbox Manager <b>134</b> generates a ThreadStarted event. Then, in block <b>865</b>, the PseudoTid and ThreadDiscriminate values are stored in memory. This information may be recorded in the transcript file <b>125</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). Then, the Sandbox Manager <b>134</b> advances to decision block <b>870</b>.
When the decision in decision block <b>855</b> is “NO,” the Sandbox Manager <b>134</b> advances to decision block <b>870</b>.
In decision block <b>870</b>, the Sandbox Manager <b>134</b> determines whether the virtual runtime engine <b>131</b> has stopped executing the virtual application <b>110</b> (and therefore, no additional statistics will be generated for the virtual application <b>110</b>). The decision in decision block <b>870</b> is “NO” when the virtual runtime engine <b>131</b> has stopped executing the virtual application <b>110</b>. Otherwise, the decision in decision block <b>870</b> is “YES.”
When the decision in decision block <b>870</b> is “NO,” the method <b>800</b> terminates.
When the decision in decision block <b>870</b> is “YES,” the Sandbox Manager <b>134</b> returns to decision block <b>820</b>.
The information received in the messages constructed in block <b>750</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref> is stored in the transcript file <b>125</b> associated with the original file (e.g., the xlayer file <b>300</b>).
The Sandbox Manager <b>134</b> may include a dictionary accessible by the directing process <b>129</b>. The directing process <b>129</b> may use the dictionary to associate all subsequent messages (e.g., implemented using the structures named “SThreadStartedMessage” and “SFeedbackStatsMessage”) with the correct PseudoPid value. The dictionary may be keyed by a connection handle to a structure storing the PseudoPid value, Pid value, and Process Name value. The following data structure (named “SPipeConnection”) is an example of a data structure that may be used to implement the dictionary:
<tables id="TABLE-US-00008" num="00008"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>class SPipeConnection</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="84pt" align="left" /><colspec colname="2" colwidth="84pt" align="left" /><tbody valign="top"><row><entry /><entry>private uint</entry><entry>SessionId;</entry></row><row><entry /><entry>private uint</entry><entry>Pid;</entry></row><row><entry /><entry>private uint</entry><entry>PseudoPid;</entry></row><row><entry /><entry>private string</entry><entry>Name;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
As described above, the information stored in the class defined by the pseudo code above is received by the Sandbox Manager <b>134</b> (from the virtual runtime engine <b>131</b>) in the message constructed in block <b>718</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref>.
The dictionary lookup may be hidden by the implementation of the .NET System.IO.Pipes.NamedPipeServerStream class, which may have been used to perform the named pipe communication. This class uses IO Completion Ports to schedule asynchronous pipe reads from the pipe clients (e.g., the virtual runtime engine <b>131</b>) in the virtual application processes. An asynchronous named pipe completion routine may be responsible for determining the type of message received, reading the message, and calling back into the listening code of the directing process <b>129</b> with the appropriate callbacks. Possible callbacks are: SignalNewProcess (which is called when a new process is started in the virtual application <b>110</b>); SignalNewThread (which is called when a new thread is started within a virtual application process); and SignalXLayerAccess (which is called when access to the original file has been requested by a particular thread within the virtual application process). How this data provided by these callbacks is handled is described below.
The following pseudo code provides a non-limiting example of a server-side named pipe completion routine. Portions of the routine may be performed in blocks <b>820</b>, <b>825</b>, <b>840</b>, and <b>855</b>.
<tables id="TABLE-US-00009" num="00009"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>SPipeConnection pipeConnect =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>GetConnectionDataFromHandle(hPipeClient)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Byte MessageId = ReadByte( )</entry></row><row><entry /><entry>If (MessageId == ConnectionMessageId) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>pipeConnect.SessionId = ReadInt64( )</entry></row><row><entry /><entry>pipeConnect.Pid = ReadInt32( )</entry></row><row><entry /><entry>pipeConnect.PseudoPid = ReadInt32( )</entry></row><row><entry /><entry>countChars = ReadInt32( )</entry></row><row><entry /><entry>arrayChars = ReadChars(countChars)</entry></row><row><entry /><entry>pipeConnect.Name = MakeString(arrayChars)</entry></row><row><entry /><entry>SignalNewProcess(pipeConnect.SessionId,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>pipeConnect.Pid,</entry></row><row><entry /><entry>pipeConnect.PseudoPid,</entry></row><row><entry /><entry>pipeConnect.Name)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Else If (MessageId == ThreadCreatedMessageId) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>PseudoTid = ReadInt32( )</entry></row><row><entry /><entry>Discriminate = ReadInt32( )</entry></row><row><entry /><entry>SignalNewThread(pipeConnect.PseudoPid,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry> PseudoTid, Discriminate)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Else If (MessageId == FeedbackStatsMessageId) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>PseudoTid = ReadInt32( )</entry></row><row><entry /><entry>TickCount = ReadInt32( )</entry></row><row><entry /><entry>AccessOffset = ReadInt64( )</entry></row><row><entry /><entry>AccessSize = ReadInt64( )</entry></row><row><entry /><entry>SignalXLayerAccess (pipeConnect.PseudoPid, PseudoTid,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry> TickCount, AccessOffset,</entry></row><row><entry /><entry> AccessSize)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Building and Distributing Application Profiles Via the Web
As mentioned above, the transcript file <b>125</b> generated by the profiling process is used to determine a predictive application access model that is used to determine an order in which to download blocks of data (e.g., portions of the xlayer file <b>300</b>) to the client computing device <b>9</b>. When used to stream blocks of data or pages to the client computing device <b>9</b>, the access model is referred to as a streaming model.
The server computing device <b>7</b> provides applications to the client computing device <b>9</b> on a “self-serve” basis (i.e., a user operating the client computing device <b>9</b> may select any of the applications provided by the server computing device <b>7</b> for download at anytime). After the user has selected an application for download and execution, the server computing device <b>7</b> downloads or streams the selected application to the client computing device <b>9</b>. Multiple client computing devices (e.g., the computing devices <b>9</b> and <b>11</b>) may select applications for download at the same time.
Because training and building streaming models is a computationally intensive process and relies on proprietary technologies, it may be preferable to perform this process on a centralized server (e.g., the server computing device <b>7</b> or another computing device connected thereto). The access model may be generated using machine learning techniques that require training. The training of streaming models requires information about the program's access patterns under realistic and/or actual use. Thus, generating “transcripts” via profiling is a task best performed manually, by an application publisher or test users.
As described above, the Sandbox Manager <b>134</b> may be configured to profile an application downloaded from a web page (e.g., via the plug-in <b>136</b>). Transcript files generated by the Sandbox Manager <b>134</b> may then be uploaded to the server computing device <b>7</b> (or another computing device connected thereto), which automatically generates and distributes a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) for the application.
As mentioned above, the authoring tool <b>170</b> allows application developers and publishers to virtualize an application and publish it to the web. The result of this process is one or more executable files or xlayer files (e.g., a file named “application_p.xlayer”) residing on the server computing device <b>7</b>. As described in U.S. patent application Ser. No. 12/695,107, these files can be downloaded and executed from the web via the plug-in <b>136</b> and the Sandbox Manager <b>134</b>. If the plug-in <b>136</b> is executing on a computing device (e.g., the computing device <b>11</b>) that is also executing the authoring tool <b>170</b>, optionally, when the layer file is published to the server computing device <b>7</b>, the xlayer file <b>300</b> will also be copied to the local cache <b>139</b> (see <figref idref="DRAWINGS">FIG. 2</figref>), making future downloads unnecessary.
An upper portion of <figref idref="DRAWINGS">FIG. 13</figref> illustrates exemplary communications between the computing device <b>11</b> operated by an application publisher or developer, the server computing device <b>7</b>, and the model building server <b>8</b>. A lower portion of <figref idref="DRAWINGS">FIG. 13</figref> illustrates exemplary communications between the client computing device <b>9</b> operated by a user and the server computing device <b>7</b>. In <figref idref="DRAWINGS">FIG. 13</figref>, the authoring tool <b>170</b>, the profiling tool <b>169</b>, and the Sandbox Manager <b>134</b> are installed and operating on the computing device <b>11</b>. Another instance of the Sandbox Manager <b>134</b> and the Client Application <b>132</b> are installed and operating on the client computing device <b>9</b>. For ease of illustration, the computing device operated by an application publisher will be described as being the computing device <b>11</b>. However, this is not a requirement.
<figref idref="DRAWINGS">FIG. 9</figref> is a flow diagram of a method <b>1100</b> of building a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) for a particular application (e.g., the virtual application <b>110</b>) and distributing that streaming model across multiple servers (e.g., the server computing devices <b>6</b> and <b>7</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>). Before the method <b>1100</b> is performed, the application publisher or developer has published the application (e.g., the virtual application <b>110</b>) to the server computing device <b>7</b>. Turning to <figref idref="DRAWINGS">FIG. 13</figref>, arrow “A<b>1</b>” illustrates a communication from the computing device <b>11</b> operated by the application publisher or developer publishing the application (e.g., the virtual application <b>110</b>) to the server computing device <b>7</b>.
Returning to <figref idref="DRAWINGS">FIG. 9</figref>, in first block <b>1110</b>, the server computing device <b>7</b> receives an instruction from an application publisher or developer that a particular application is to be profiled. Arrow “A<b>2</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the computing device <b>11</b> to the server computing device <b>7</b> requesting profiling for an application. The authoring tool <b>170</b> may be configured to allow an application publisher or developer to specify that after an application is downloaded, the Sandbox Manager <b>134</b> is to profile the application and upload transcript files (generated by the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref>) to the server computing device <b>7</b>. For example, the authoring tool <b>170</b> may have a link to an online management panel configured to display a profiling tool <b>169</b> (see <figref idref="DRAWINGS">FIGS. 3 and 13</figref>) operable by a user to indicate a particular application is to be profiled following its download. Using the online management panel the user selects a virtual application (e.g., by selecting an xlayer file implementing the virtual application). For example, the publisher or developer may select a virtual application implemented by an xlayer file named “app.xlayer.” If an application has been identified as “to be profiled,” streaming is not enabled. Instead, to run the application from the web, the entire application file (e.g., the xlayer file named “application_p.xlayer”) must be downloaded before execution can begin. Thus, arrow “A<b>3</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication downloading the xlayer file from the server computing device <b>7</b> to the computing device <b>11</b>.
The profiling tool <b>169</b> may be implemented as a “Profile” link in the online management panel. When the publisher clicks on the “Profile” link, a panel launcher page may be displayed that includes a query string parameter (e.g., “&profile=”) set to a value that indicates the application should be profiled. The page may pass the query string parameter (e.g., “&profile=”) to an iframe that renders the panel launcher page. The panel launcher page renders a javascript call to the xrfw.go( ) method that sets the query string parameter (e.g., “&profile=”) equal to “TRUE.”
In block <b>1115</b>, the server computing device <b>7</b> receives an instruction to download the virtual application <b>110</b> to the client computing device <b>9</b>. For example, this instruction may be received in response to a user clicking on a launch button on the panel launcher page.
In block <b>1120</b>, the Sandbox Manager <b>134</b> downloads and executes the virtual application file <b>140</b> in a profile mode. When executing an application in profile mode, the Sandbox Manager <b>134</b> instructs the virtual machine (e.g., the virtual runtime engine <b>131</b>) to provide execution statistics (e.g., via messages implemented using the structure named “SFeedbackStatsMessage”).
In block <b>1125</b>, the Sandbox Manager <b>134</b> receives messages from the virtual runtime engine <b>131</b> and handles events generated by the virtual runtime engine <b>131</b> executing the application as the application is running. The method <b>800</b> (described above) may be performed in blocks <b>1120</b> and <b>1125</b>.
By way of non-limiting examples, the events may include a ProcessStarted event, a ThreadStarted event, an ExecutionStatistic event, and an Application Ended event. A ProcessStarted event may be identified by the Sandbox Manager <b>134</b> when the directing process <b>129</b> receives a message from the virtual runtime engine <b>131</b> indicating a process has requested access to the xlayer file for the first time. As explained above, such a message may be sent by the virtual runtime engine <b>131</b> in block <b>719</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref> and implemented using the structure named “SProcessConnectMessage.” A ThreadStarted event may be identified by the Sandbox Manager <b>134</b> when the directing process receives a message indicating a thread has requested access to the xlayer file for the first time. As explained above, such a message may be sent by the virtual runtime engine <b>131</b> in block <b>765</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref> and implemented using the structure named “SThreadStartedMessage.” The ProcessStarted and ThreadStarted events allow the Sandbox Manager <b>134</b> to separately track access requests from different processes and threads.
An ExecutionStatistic event may be identified by the Sandbox Manager <b>134</b> when the directing process <b>129</b> receives a message including access statistics. As explained above, such a message may be sent by the virtual runtime engine <b>131</b> in block <b>752</b> of the profiling process <b>700</b> illustrated in <figref idref="DRAWINGS">FIG. 4</figref> and implemented using the structure named “SFeedbackStatsMessage.” Every time the virtual application <b>110</b> finishes reading a contiguous section of an xlayer file <b>300</b>, the virtual runtime engine <b>131</b> triggers an ExecutionStatistic event and sends a message including access statistics to the directing process. The message, which may be implemented using the structure named “SFeedbackStatsMessage” may include an identifier for the xlayer file (e.g., the xlayerId value), the thread (e.g., the PseudoTid value), time (e.g., the TickCount value, timestamp, and the like), the location of the block in the xlayer file (e.g., the AccessOffset value), and the size of the block read (e.g., the AccessBytes value). The TickCount value may be used to track the runtime of a process. An identifier for the process (e.g., the PseudoPid value) may be inferred from the named pipe connection used because the named pipe connection used by each process is unique.
In next block <b>1130</b>, the Sandbox Manager <b>134</b> detects that an ApplicationEnded event has been triggered.
Then, in block <b>1135</b>, the Sandbox Manager <b>134</b> combines the collected execution statistics into a single combined transcript (e.g., the combined transcript “CT” illustrated in <figref idref="DRAWINGS">FIG. 6</figref>).
In block <b>1140</b>, the Sandbox Manager <b>134</b> uploads the combined transcript to the server computing device <b>7</b>. Arrow “A<b>4</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the computing device <b>11</b> to the server computing device <b>7</b> uploading the combined transcript. In block <b>1140</b>, the Sandbox Manager <b>134</b> may connect to a web service running on the server computing device <b>7</b>, and transfer a unique application identifier and a byte array containing the binary data of combined transcript to the server computing device <b>7</b>. By way of a non-limiting example, the application identifier may have the following format: <AppInternalName>/<AppVersion>_<LayerRevision>/<AppInternalName>_p.xlayer.
In block <b>1145</b>, the server computing device <b>7</b> receives the uploaded combined transcript and associated application identifier.
In block <b>1150</b>, the server computing device <b>7</b> resolves the application identifier to determine which application and version created the transcript. The server computing device <b>7</b> includes an application library database <b>1151</b> illustrated in <figref idref="DRAWINGS">FIG. 11</figref>. In block <b>1150</b>, the application library database may be queried for an application that has a matching version and xlayer revision. If an xlayer file is found, the transcript will be associated with this xlayer file.
In block <b>1155</b>, the server computing device <b>7</b> saves the combined transcript in a predetermined location on the filesystem. In block <b>1155</b>, the binary data contained in the transcript may be written to a file on the server computing device <b>7</b> using a standard .NET BinaryWriter. Each transcript is named using a unique GUID. Files containing the transcripts may be stored at the following location, relative to the web root: Layers\Transcripts\<AppInternalName>\<AppVersion>_<LayerRevision>\<AppInternalName>_p.xlayer\<GUID>.xt.
In block <b>1160</b>, the server computing device <b>7</b> requests a build of a new streaming model for the xlayer file identified in block <b>1150</b>. Arrow “A<b>5</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the server computing device <b>7</b> to the model building server <b>8</b> requesting a build of a new streaming model for the xlayer file identified in block <b>1150</b>. If a streaming model has not been created for a particular xlayer file, in block <b>1160</b>, the server computing device <b>7</b> may automatically add a request for a streaming model to a streaming model build queue. By way of a non-limiting example, the streaming model build queue may be implemented as a ModelRequest table <b>1161</b> illustrated in <figref idref="DRAWINGS">FIG. 10</figref>. In implementations including multiple model build servers, the ModelRequest table <b>1161</b> may be stored in a database accessible by all model build servers.
Application publishers can use the profiling tool <b>169</b> to request subsequent model builds as needed (e.g., by adding a request to the ModelRequest table illustrated in <figref idref="DRAWINGS">FIG. 10</figref>), after additional profiling has been performed to generate additional transcripts. This may be achieved by adding a record to the ModelRequest table illustrated in <figref idref="DRAWINGS">FIG. 10</figref>.
In block <b>1165</b>, the request is processed and a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) is generated for the xlayer file identified in block <b>1150</b>. The streaming model may be generated by the server computing device <b>7</b> or another computing device connected thereto. In the embodiment illustrated in <figref idref="DRAWINGS">FIG. 1</figref>, streaming models are generated by the model building server <b>8</b>. By way of a non-limiting example, an application running as a windows service on the model building server <b>8</b> may be responsible for building the streaming model based on the transcripts associated with the unique application identifier. The model building server <b>8</b> may periodically query the ModelRequest table <b>1161</b> for any requests that have not yet been started. When one is found, the model building server <b>8</b> begins a build (i.e., starts constructing a streaming model).
<figref idref="DRAWINGS">FIG. 20</figref> illustrates a method <b>1300</b> of building the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref> that may be performed in block <b>1165</b> of the method <b>1100</b> illustrated in <figref idref="DRAWINGS">FIG. 9</figref>. To build the streaming model, in block <b>1310</b>, the model building server <b>8</b> first collects transcripts associated with the xlayer file identified in block <b>1150</b> (which may be stored on multiple server computing devices, such as the server computing devices <b>6</b> and <b>7</b> illustrated in <figref idref="DRAWINGS">FIG. 1</figref>). In implementations that include more than one model building server <b>8</b>, the server computing devices may networked, and share a (LibraryResources) folder at the base of their application library resources, so that each can access the other using the following path “\\<ServerName>\LibraryResources\.” Transcript files associate with a particular xlayer file can be stored on one or more different server computing devices. If the transcript files associated with a particular xlayer file are stored on a particular server computing device, then the transcript files can be retrieved from that particular server computing device using a consistent folder structure (e.g., “<ServerHostName>\LibraryResources\Layers\Transcripts\ . . . ”). In other words, a predetermined path may be used to obtain transcript files from different server computing devices that each store transcript files in the same storage location. If a transcript file is not stored on a particular server computing device, the server computing device will issue an error.
Then, in block <b>1310</b>, the model building server <b>8</b> copies all transcript files associated with the xlayer file identified in block <b>1150</b> into the same directory in the filesystem of the model building server <b>8</b>. For example, all files stored in a first directory named “\\<SpoonServer>\LibraryResources\Layers\Transcripts\<AppInternalName>\<AppVersion>_<LayerRevision>\<AppInternalName>_p.xlayer\” may be copied to a second directory named “\\<BuildServer>\LibraryResources\Layers\Transcripts\<AppInternalName>\<AppVersion>_<LayerRevision>\<AppInternalName>_p.xlayer\.” Arrow “A<b>6</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the server computing device <b>7</b> to the model building server <b>8</b> uploading the transcript files to the model building server <b>8</b>.
When the copying is finished, in block <b>1320</b>, the model building server <b>8</b> tries to delete the original transcript files (stored in the first directory).
In decision block <b>1325</b>, the model building server <b>8</b> determines whether the transcript files have been successfully deleted. If the attempt to delete a particular transcript file fails, the model building server <b>8</b> concludes the transcript is still being written and the decision in decision block <b>1325</b> is “NO.” Then, in block <b>1330</b>, the copy stored in the second directory is deleted. These copy and delete actions may use the standard .NET File class.
In block <b>1335</b>, the model building server <b>8</b> then performs a method <b>1600</b> (illustrated in <figref idref="DRAWINGS">FIG. 23</figref>) to construct a streaming model based on the transcripts stored in the second directory. The collection of files (including the transcripts stored in the second directory and the streaming model) may be stored in a third directory named “\\<BuildServer>\LibraryResources\Layers\<AppInternalName>\<AppVersion>_<LayerRevision>\xstream\0\.”
In block <b>1340</b>, referring to <figref idref="DRAWINGS">FIG. 12</figref>, when the streaming model is saved, the model building server <b>8</b> creates a record in an XStreamModel table <b>1166</b>, as well as corresponding entries in an XFile table <b>1167</b> and a ServerXFile table <b>1168</b>. Arrow “A<b>7</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the model building server <b>8</b> to the server computing device <b>7</b> recording information in the XStreamModel table <b>1166</b>, the XFile table <b>1167</b>, and the ServerXFile table <b>1168</b>. These tables may be stored in the same database used to store the Model Request table <b>1161</b>. This database may be accessible by each of the server computing devices and model building servers.
Referring to <figref idref="DRAWINGS">FIG. 19</figref>, a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) includes a streaming model file <b>1180</b>, and one or more xsequence files <b>1182</b>.
Returning to <figref idref="DRAWINGS">FIG. 12</figref>, the records in the XFile table <b>1167</b> and ServerXFile table <b>1168</b> indicate the existence of a new streaming model, and identify on which server(s) the streaming model is stored. The server table <b>1169</b> stores information about each of the server computing devices (e.g., the server computing devices <b>6</b> and <b>7</b>). The XStreamModel table <b>1166</b> indicates a particular streaming model exists, the XFile table <b>1167</b> stores data about the streaming model file <b>1180</b>, and the ServerXFile table <b>1168</b> describes the streaming model file <b>1180</b> located on a particular server computing device. Arrow “A<b>8</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the model building server <b>8</b> to the server computing device <b>7</b> storing the streaming model file <b>1180</b> and associated one or more xsequence files <b>1182</b> on the server computing device <b>7</b>. Optionally, the model building server <b>8</b> may store the streaming model file <b>1180</b> and associated one or more xsequence files <b>1182</b> on one or more other server computing devices. The streaming model (which includes the streaming model file <b>1180</b> and associated one or more xsequence files <b>1182</b>) may be stored in a predetermined storage location on the server computing device <b>7</b>.
At this point, the streaming models may be distributed to other computing devices connected to the model building server <b>8</b> and/or the network <b>10</b>. <figref idref="DRAWINGS">FIG. 21</figref> is a flow diagram of a method <b>1400</b> of distributing streaming models. Server computing devices (e.g., the server computing devices <b>6</b> and <b>7</b>) may poll or query the ServerXFile table <b>1168</b> to locate files stored on other server computing devices. In first block <b>1410</b>, a querying server computing device (e.g., the server computing device <b>6</b>) polls or queries the ServerXFile table <b>1168</b> for streaming models stored on other server computing devices (e.g., the server computing device <b>7</b>). For example, in block <b>1410</b>, the server computing device <b>6</b> may receive a list of streaming models identified in the ServerXFile table <b>1168</b> that are stored on all other server computing devices.
In decision block <b>1415</b>, for each streaming model identified in block <b>1410</b>, the querying server computing device determines whether the streaming model is already stored in the filesystem of the querying server computing device. The decision in decision block <b>1415</b> is “NO” when the streaming model is already stored in the filesystem of the querying server computing device. Otherwise, the decision in decision block <b>1415</b> is “YES” when the streaming model is not already stored in the filesystem of the querying server computing device.
When the decision in decision block <b>1415</b> is “YES,” in block <b>1425</b>, the querying server computing device waits for a period of time and then returns to block <b>1410</b>. In block <b>1425</b>, the querying server computing device may wait for a predetermined amount of time, a randomly selected amount of time, or a combination thereof.
When the decision in decision block <b>1415</b> is “YES,” in block <b>1430</b>, the streaming model is copied from a server computing device on which the streaming model is stored to the querying server computing device. Thus, when a record is found in the ServerXFile table <b>1168</b> that the querying server computing device does not yet have stored in its filesystem (according to the ServerXFile table), a copy is initiated. In other words, the querying server computing device (e.g., the server computing device <b>6</b>) may use the ServerXFile table <b>1168</b> to locate model files stored on other server computing devices (e.g., the server computing device <b>7</b>) and copy those files to the local filesystem of the querying server computing device. The files located in this manner may be copied from the third directory to a fourth directory named “\\<SpoonServer>\LibraryResources\Layers\<AppInternalName>\<AppVersion>_<LayerRevision>\xstream\0\.” In other words, each server computing device is responsible for distributing streaming model files by copying those files onto their own filesystem.
In decision block <b>1435</b>, for each streaming model copied in block <b>1430</b>, the querying server computing device determines whether the streaming model was copied to the filesystem of the querying server computing device successfully. The decision in decision block <b>1435</b> is “YES” when the streaming model was copied to the filesystem of the querying server computing device successfully. Otherwise, the decision in decision block <b>1435</b> is “NO” when the streaming model was not copied to the filesystem of the querying server computing device successfully.
When the decision in decision block <b>1435</b> is “NO,” the querying server computing device may return to block <b>1430</b> to retry the copy operation.
When the decision in decision block <b>1435</b> is “YES” (the copy operation has completed successfully), in block <b>1440</b>, the querying server computing device (e.g., the server computing device <b>6</b>) adds a new record to the ServerXFile table <b>1168</b>, indicating that the streaming model is now stored on that particular server computing device. Thus, after a server computing device (e.g., the server computing device <b>6</b>) copies streaming models onto its filesystem, the server computing device records this in the database illustrated in <figref idref="DRAWINGS">FIG. 12</figref>. For example, if a server computing device named “publicserver<b>1</b>” copies a streaming model named “Model<b>1</b>” into its filesystem, the “publicserver<b>1</b>” computing device creates a record in the ServerXFile table <b>1168</b> in which a field named “Server” is set to “publicserver<b>1</b>.” Then, the method <b>1400</b> terminates.
<figref idref="DRAWINGS">FIG. 22</figref> illustrates a flow diagram of a method <b>1500</b> of locating a streaming model. A server table <b>1169</b> may be used to list all servers on which streaming models may be stored. If the querying server computing device is indicated as being “Public” in the server table <b>1169</b> illustrated in <figref idref="DRAWINGS">FIG. 12</figref>, pages that render the plug-in <b>136</b> will read a record in the ServerXFile table <b>1168</b> (associated with the querying server computing device) and may instruct the plug-in <b>136</b> to use the new streaming model copied onto the querying server computing device on subsequent application launches. In first block <b>1510</b>, a user operating the client computing device <b>9</b> indicates he/she would like to execute a virtual application (e.g., the virtual application <b>110</b>). By way of a non-limiting example, in block <b>1510</b>, the user may click on a hyperlink (displayed in a web browser) provided by the server computing device <b>7</b> and associated with the virtual application.
In optional block <b>1515</b>, the Client Application <b>132</b> communicates that the user would like to execute a virtual application to the Sandbox Manager <b>134</b>.
In block <b>1520</b>, the Sandbox Manager <b>134</b> executing on the client computing device <b>9</b> (which may be located somewhere across the world from the server computing device <b>7</b>) requests the virtual application the user indicated he/she would like to execute in block <b>1510</b>.
In block <b>1530</b>, the server computing device that services the request (e.g., the server computing device <b>7</b>) will query the ServerXFile table <b>1168</b> to determine which server computing device(s) is/are storing the streaming model for the application requested in block <b>1520</b>. For example, in block <b>1520</b>, the Sandbox Manager <b>134</b> may request an application named “App<b>1</b>.xlayer” for which a streaming model named “Model<b>1</b>” was created. In this example, in block <b>1530</b>, the server computing device <b>7</b> may query the ServerXFile table <b>1168</b> to determine which server computing device(s) are storing the streaming model named “Model<b>1</b>” associated with the application requested in block <b>1520</b>.
Then, in block <b>1535</b>, the server computing device that services the request (e.g., the server computing device <b>7</b>) selects one of the server computing device(s) storing the streaming model requested in block <b>1520</b> from which to download the streaming model. Load balancing techniques or a random selection algorithm may be used to select a server computing device in block <b>1535</b>. For example, in block <b>1535</b>, load balancing techniques or a random selection algorithm may be used to select a server computing device (e.g., the “publicserver<b>1</b>” computing device) from which the “Model<b>1</b>” model file may be downloaded to the client computing device <b>9</b>.
Then, in block <b>1540</b>, the method <b>900</b> (illustrated in <figref idref="DRAWINGS">FIG. 18</figref>) is performed to download and execute the virtual application on the client computing device <b>9</b> using the streaming model. Then, the method <b>1500</b> terminates.
Modeling
<figref idref="DRAWINGS">FIG. 23</figref> illustrates the method <b>1600</b> of constructing a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>). As mentioned above, multiple transcripts are recorded during profiling process <b>700</b> and later combined to build a streaming model (e.g., the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref>) for an application (e.g., the virtual application <b>110</b>). In first block <b>1610</b>, referring to <figref idref="DRAWINGS">FIG. 19</figref>, the individual transcripts (e.g., the transcript “T<b>1</b>” and “T<b>2</b>”) are combined to form a combined transcript “CT.”
Among other data, each transcript includes information identifying transitions between pages (“page transitions”). To combine the transcripts, in block <b>1610</b>, the page transitions are broken down and combined. For example, referring to <figref idref="DRAWINGS">FIG. 6</figref>, if a first transcript “T<b>1</b>” records a first sequence of page transactions (P<b>6</b><img file="US9218359B2_D0001.tif" />P<b>4</b><img file="US9218359B2_D0002.tif" />P<b>5</b><img file="US9218359B2_D0003.tif" />P<b>2</b><img file="US9218359B2_D0004.tif" />P<b>3</b>) indicating a first order in which the pages P<b>6</b>, P<b>4</b>, P<b>5</b>, P<b>2</b>, and P<b>3</b> were accessed by the application, and a second transcript “T<b>2</b>” records a second sequence of page transactions (P<b>6</b><img file="US9218359B2_D0005.tif" />P<b>4</b><img file="US9218359B2_D0006.tif" />P<b>5</b><img file="US9218359B2_D0007.tif" />P<b>1</b><img file="US9218359B2_D0008.tif" />P<b>3</b>) indicating a second order in which the pages P<b>6</b>, P<b>4</b>, P<b>5</b>, P<b>1</b>, and P<b>3</b> were accessed by the application, the transcripts “T<b>1</b>” and “T<b>2</b>” are broken down into individual transitions: (P<b>6</b><img file="US9218359B2_D0009.tif" />P<b>4</b>), (P<b>4</b><img file="US9218359B2_D0010.tif" />P<b>5</b>), (P<b>5</b><img file="US9218359B2_D0011.tif" />P<b>2</b>), (P<b>2</b><img file="US9218359B2_D0012.tif" />P<b>3</b>) for the first transcript “T<b>1</b>” and (P<b>6</b><img file="US9218359B2_D0013.tif" />P<b>4</b>), (P<b>4</b><img file="US9218359B2_D0014.tif" />P<b>5</b>), (P<b>5</b><img file="US9218359B2_D0015.tif" />P<b>1</b>), (P<b>1</b><img file="US9218359B2_D0016.tif" />P<b>3</b>) for the second transcript “T<b>2</b>.” In this example, the first sequence (in the first transcript “T<b>1</b>”) transitioned from page P<b>6</b> to page P<b>4</b> to page P<b>5</b> to page P<b>2</b> to page P<b>3</b> and the second sequence (in the second transcript “T<b>2</b>”) transitioned from page P<b>6</b> to page P<b>4</b> to page P<b>5</b> to page P<b>1</b> to page P<b>3</b>. Because a transition from page P<b>6</b> to page P<b>4</b> is present in both transcripts “T<b>1</b>” and “T<b>2</b>,” in block <b>1610</b>, this transition (P<b>6</b><img file="US9218359B2_D0017.tif" />P<b>4</b>) is combined into a single transition and assigned a weight “W” (indicating how many times the transition appears in the transcripts, e.g., a weight equal to two) in a combined transcript “CT.” Similarly, because a transition from page P<b>4</b> to page P<b>5</b> is present in both transcripts “T<b>1</b>” and “T<b>2</b>,” in block <b>1610</b>, this transition (P<b>4</b><img file="US9218359B2_D0018.tif" />P<b>5</b>) is combined into a single transition and assigned a weight “W” (indicating how many times the transition appears in the transcripts, e.g., a weight equal to two) in a combined transcript “CT.” The other transitions appear in only one transcript. Therefore, in this example, in block <b>1610</b>, these transitions are each assigned a weight equal to one. Further, a timestamp value may be stored for each page indicating a time at which the page was first accessed. After transitioning to page P<b>5</b>, the first and second transcripts “T<b>1</b>” and “T<b>2</b>” indicate the user may transition to either page P<b>2</b> or page P<b>1</b>. Thus, the combined transitions include a branch “B<b>1</b>” and no longer follow a linear path.
After the individual transcripts have been combined to form the combined transcript “CT,” in block <b>1620</b>, the combined transcript “CT” is used to create a directed graph structure “SD.” The directed graph structure “SD” includes states and transitions between states. The states are merely end points (or nodes) for the transitions. Each transition is associated with one or more pages. The directed graph structure “SD” illustrated in <figref idref="DRAWINGS">FIG. 6</figref> includes five states S<b>1</b> to S<b>5</b>, and five transitions TRANS-<b>1</b> to TRANS-<b>5</b>.
In the directed graph structure “SD,” linear sequences of transitions (i.e., sequences of transitions without any branches) in the combined transcript “CT” are reduced or simplified into a single transition. For example, the linear sequence of transitions that includes the following transitions (P<b>6</b><img file="US9218359B2_D0019.tif" />P<b>4</b><img file="US9218359B2_D0020.tif" />P<b>5</b>), is simplified into the single transition TRANS-<b>1</b> (or S<b>1</b><img file="US9218359B2_D0021.tif" />S<b>2</b>) that is associated with the pages P<b>6</b>, P<b>4</b>, and P<b>5</b>. The weight of transition TRANS-<b>1</b> is the same as the weight of each of the transitions (P<b>6</b><img file="US9218359B2_D0022.tif" />P<b>4</b><img file="US9218359B2_D0023.tif" />P<b>5</b>). The transition TRANS-<b>2</b> (or S<b>2</b><img file="US9218359B2_D0024.tif" />S<b>3</b>) is associated with the pages P<b>5</b> and P<b>1</b>. The transition TRANS-<b>3</b> (or S<b>2</b><img file="US9218359B2_D0025.tif" />S<b>4</b>) is associated with the pages P<b>5</b> and P<b>2</b>. The transition TRANS-<b>4</b> (or S<b>3</b><img file="US9218359B2_D0026.tif" />S<b>5</b>) is associated with the pages P<b>1</b> and P<b>3</b>. The transition TRANS-<b>5</b> (or S<b>4</b><img file="US9218359B2_D0027.tif" />S<b>5</b>) is associated with the pages P<b>2</b> and P<b>3</b>.
When the states and transitions are created by combining the transitions in the combined transcript “CT,” a timestamp delta valued is calculated for each page. The timestamp delta is the difference between the start time of the transcript (e.g., a time at which execution of the virtual application began) and the timestamp recorded for the page in the transcript. Then, an average timestamp delta value is calculated for the pages associated with each of the transitions between states. This average is recorded for each transition between states as a TickDelta member.
The directed graph structure “SD” describes data access by the application while executing and may be stored in one or more state objects. Referring to <figref idref="DRAWINGS">FIG. 24</figref>, each of the states (e.g., the states S<b>1</b> to S<b>5</b>) may be stored in a different state object <b>1660</b>. The state object <b>1660</b> may include a list of transitions <b>1662</b> associated with the state. For example, the list of transitions for a state object corresponding to the state S<b>1</b> would include only the transition TRANS-<b>1</b>. By way of another example, the list of transitions for a state object corresponding to the state S<b>2</b> would include the transitions TRANS-<b>2</b> and TRANS-<b>3</b>. The state object <b>1660</b> may include a degree member <b>1664</b> that indicates a number of transitions associated with the state object <b>1660</b>. For example, the degree member of the state object corresponding to the state S<b>1</b> would indicate only a single transition is associated with the state object (e.g., degree=1). By way of another example, the degree member of the state object corresponding to the state S<b>2</b> would indicate two transitions are associated with the state object (e.g., degree=2). The state object <b>1660</b> may include a weight member <b>1666</b> that stores a total of the weights assigned to the transitions. For example, the weight member of the state object corresponding to the state S<b>1</b> may be set to a weight of two. By way of another example, the weight member of the state object corresponding to the state S<b>2</b> may be set to a weight of two. The weight members of state objects corresponding to the states S<b>3</b> and S<b>4</b> may each be set to a weight of one.
Referring to <figref idref="DRAWINGS">FIG. 25</figref>, each of the transitions may be stored in a transition data structure <b>1670</b> that has a weight member <b>1672</b> indicating how many times the transition occurs in the combined transcript. The transition data structure <b>1670</b> may include a page sequence member <b>1674</b> that stores the page identifiers of the pages included in the transition. For example, the page sequence member of a transition data structure storing the transition TRANS-<b>1</b> would store identifiers for pages P<b>6</b>, P<b>4</b>, and P<b>5</b>. The transition data structure <b>1670</b> may include a TickDelta member <b>1676</b> that stores an amount of time (e.g., in nanoseconds) that the transition required.
The directed graph structure “SD” (stored by the one or more state objects) may include loops or cycles. By way of a non-limiting example, the directed graph structure “SD” may be a directed acyclic graph (“DAG”). However, this is not a requirement. As mentioned above, in the directed graph structure “SD,” the transitions (or “edges”) are labeled with a set of pages or data blocks.
Transition data structures that are too large may be divided into two or more separate transition data structures. For example, transition data structures that have a large value stored in the TickDelta member, or have a large number of pages stored in the page sequence member may be subdivided into two or more separate transition data structures.
In block <b>1630</b>, the pages identified in the page sequence members of the transition data structures are encoded in one or more xsequence files. The xsequence files each belong to one of three categories: prefetch xsequence files, sequence xsequence files, and rest xsequence files. For example, the xsequence files <b>1182</b> of the streaming model <b>122</b> illustrated in <figref idref="DRAWINGS">FIG. 19</figref> include a prefetch xsequence file <b>1632</b>, a sequence xsequence file <b>1634</b>, and a rest xsequence file <b>1636</b>.
As mentioned above, the virtual application <b>110</b> may be streamed from the server computing device <b>7</b> without using a special streaming protocol by encoding the xlayer file into smaller xsequence files. In particular embodiments, the virtual application <b>110</b> may be streamed from the server computing device <b>7</b> using well-known download protocols, such as HTTP, FTP, SMB, and the like. Which category a particular page is encoded into is based upon the directed graph structure “SD” which predicts when the page may be used by a virtual application as it is executing as xsequence files are concurrently being downloaded.
<figref idref="DRAWINGS">FIG. 26</figref> is a flow diagram of a method <b>1700</b> of encoding the pages of the directed graph structure “SD” into xsequence files. The method <b>1700</b> may be performed in block <b>1630</b> of the method <b>1600</b> illustrated in <figref idref="DRAWINGS">FIG. 23</figref>. In first block <b>1710</b>, the model building server <b>8</b> identifies the pages to be stored in the prefetch xsequence files. Prefetch xsequence files contain pages that must be downloaded before the virtual application (e.g., the virtual application <b>110</b>) launches. For example, depending upon the implementation details, the user may see a buffering dialog while prefetch xsequence files are downloaded. Depending upon the implementation details, each streaming model may include only a single prefetch xsequence file including the pages identified in block <b>1710</b>.
In block <b>1710</b>, the pages included in the prefetch xsequence file may be identified by determining how close in time (which may be determined using the time stamp for the page) each page is to an origin or first transition data structure listed in the list of transitions in a first state object in the directed graph structure “SD.” Then, only the pages accessed within a predetermined amount of time from the first transition data structure may be selected for inclusion in the prefetch xsequence file(s). Alternatively, a predetermined number of pages accessed within a least amount of time from the first transition data structure may be selected for inclusion in the prefetch xsequence file(s). By way of another non-limiting example, a predetermined percentage of pages including those that were accessed within the least amount of time from the first transition data structure may be selected for inclusion in the prefetch xsequence file(s).
The following pseudo code provides a non-limiting example of a method of encoding the pages in the prefetch xsequence file using the directed graph structure “SD.”
<tables id="TABLE-US-00010" num="00010"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>public void CompilePrefetch ( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>foreach (State s in Model.states)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>if (s.IsChildOf (OriginState) &&</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="154pt" align="left" /><tbody valign="top"><row><entry /><entry>s.Ticks < BUFFERTIME_THRESHOLD)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="154pt" align="left" /><tbody valign="top"><row><entry /><entry>ListOfPrefectchStates.Add (s);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
In the pseudo code above, the function named “IsChildOf” determines whether a second state (stored in variable named “5”) is reachable from the first state (stored in a variable named “OriginState”). In other words, the function named “IsChildOf” determines whether a path exists in the directed graph structure “SD” from the first state to the second state. In <figref idref="DRAWINGS">FIG. 6</figref>, the state “S<b>1</b>” is considered the first or origin state. If the second state is reachable from the first state and less than a threshold amount of time (stored in a constant named “BUFFERTIME_THRESHOLD”) elapsed between the first and second states, the second state is added to a list of prefetch states. Then, while not included in the pseudo code above, the pages associated with the transitions between the first and second states are written into the prefetch xsequence file.
In block <b>1715</b>, the model building server <b>8</b> writes the pages identified in block <b>1710</b> to the prefetch xsequence file(s).
In block <b>1720</b>, the model building server <b>8</b> identifies pages for inclusion in the sequence xsequence files. For example, in block <b>1720</b>, the model building server <b>8</b> may identify the pages (identified in the page sequence members of the transition data structures) that were not written to the prefetch xsequence file(s) in block <b>1715</b>.
In decision block <b>1725</b>, the model building server <b>8</b> decides whether to create a sequence xsequence file for each transition data structure that was not used to populate the prefetch xsequence file or to reduce the number of sequence xsequence files created by combining the transition data structures that were not used to populate the prefetch xsequence file. The decision in decision block <b>1725</b> is “YES” when the model building server <b>8</b> decides to combine the transition data structures that were not used to populate the prefetch xsequence file. Otherwise, the decision in decision block <b>1725</b> is “NO” when the model building server <b>8</b> decides to create a sequence xsequence file for each transition data structure that was not used to populate the prefetch xsequence file.
When the decision in decision block <b>1725</b> is “YES,” in block <b>1730</b>, the model building server <b>8</b> combines at least a portion of the transition data structures that were not used to populate the prefetch xsequence file. For example, in block <b>1730</b>, the model building server <b>8</b> may combine similar transitions into a single transition to be stored in a single sequence xsequence file. By way of another example, a threshold file size may be used to identify sequence xsequence files having a size less than the threshold file size. The sequence xsequence files identified may be combined into one or more larger sequence xsequence files. The following pseudo code provides a non-limiting example of a method of combining transitions into a single transition for storage in a single sequence xsequence file.
<tables id="TABLE-US-00011" num="00011"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>public void CompileSequences ( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="154pt" align="left" /><tbody valign="top"><row><entry /><entry>foreach (State s in Model.states)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="77pt" align="left" /><colspec colname="1" colwidth="140pt" align="left" /><tbody valign="top"><row><entry /><entry>MergeSimilarSequences (s);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="154pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Next, in block <b>1735</b>, the pages identified in block <b>1720</b> are stored in sequence xsequence files. As mentioned above, a sequence xsequence file may be created for each transition data structure that was not used to populate the prefetch xsequence file and used to store the pages of the transition data structure for which the sequence xsequence file was created. Optionally, the number of transition data structures that were not used to populate the prefetch xsequence file may be reduced by combining two or more of them before creating the sequence xsequence files.
The sequence xsequence files store the pages that were accessed by the application as it executed. Thus, the sequence xsequence files store all of the pages appearing in all of the transcripts.
In block <b>1740</b>, the model building server <b>8</b> identifies pages for inclusion in the rest xsequence files. In block <b>1740</b>, the model building server <b>8</b> identifies pages that did not appear in every transcript for inclusion in the rest xsequence files. For example, referring to <figref idref="DRAWINGS">FIG. 6</figref>, one or more rest xsequence files would store the pages P<b>1</b> and P<b>2</b>. Further, in block <b>1740</b>, the model building server <b>8</b> identifies pages that did not appear in any of the transcripts for inclusion in the rest xsequence files.
While a rest xsequence file may store one or more pages also stored in one of the sequence xsequence files, this is not a requirement. Optionally, in decision block <b>1742</b>, the model building server <b>8</b> may decide whether to search the sequence xsequence files for each page and only write pages not found in the sequence xsequence files to the rest xsequence file(s). The decision in decision block <b>1742</b> is “YES” when the model building server <b>8</b> decides to search the sequence xsequence files for each page. Otherwise, the decision in decision block <b>1742</b> is “NO” when the model building server <b>8</b> decides not to search the sequence xsequence files for each page.
When the decision in decision block <b>1742</b> is “NO,” in block <b>1744</b>, the model building server <b>8</b> writes the pages identified in block <b>1740</b> to the rest xsequence file(s). It may be beneficial to include all of the pages that did not appear in every transcript in the rest xsequence file(s) because as the directed graph structure “SD” is traversed, particular transitions may not be visited.
When the decision in decision block <b>1742</b> is “YES,” for each page, in block <b>1745</b>, the model building server <b>8</b> searches the sequence xsequence files to determine whether the page has been written to one or more of the sequence xsequence files.
Then, in decision block <b>1750</b>, the model building server <b>8</b> determines whether the page has been written to one or more of the sequence xsequence files. The decision in decision block <b>1750</b> is “YES” when the page has been written to one or more of the sequence xsequence files. Otherwise, the decision in decision block <b>1750</b> is “NO” when the page has not been written to one or more of the sequence xsequence files.
When the decision in decision block <b>1750</b> is “NO,” in block <b>1755</b>, the model building server <b>8</b> writes the page to a rest xsequence file. Then, the model building server <b>8</b> advances to decision block <b>1760</b>.
When the decision in decision block <b>1750</b> is “YES,” the page may be omitted from the rest xsequence file and the model building server <b>8</b> advances to decision block <b>1760</b>.
In decision block <b>1760</b>, the model building server <b>8</b> determines whether there are any pages for which the sequence xsequence files have not been searched. The decision in decision block <b>1760</b> is “YES” when the model building server <b>8</b> has not searched the sequence xsequence files for all of the pages. Otherwise, the decision in decision block <b>1760</b> is “NO” when the model building server <b>8</b> has searched the sequence xsequence files for all of the pages.
The pages may be ordered within the rest xsequence files based on the frequencies at which the pages appeared in the transcripts. Rest xsequence files may be downloaded when the download pipeline (that is downloading the xsequence files from the server computing device <b>7</b> to the client computing device <b>9</b>) is idle.
The following pseudo code provides a non-limiting example of a method of adding pages to the rest xsequence file.
<tables id="TABLE-US-00012" num="00012"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>public void CompileRest(Transcripts)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>Transcript.Pages.SortByFrequency ( );</entry></row><row><entry /><entry>foreach(Page p in Transcript.Pages)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>Rest Sequence.Add (p);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Then, in block <b>1770</b>, the model building server <b>8</b> creates the streaming model file <b>1180</b> (see <figref idref="DRAWINGS">FIG. 19</figref>). The streaming model file <b>1180</b> stores information in the directed graph structure “SD.” By way of a non-limiting example, the model file may store a number of states in the directed graph structure “SD,” a list of states in the directed graph structure “SD,” a list of transitions for each state, a weight associated with each transition, and a list of pages associated with each transition. The Sandbox Manager <b>134</b> may use this information to predict to which pages the virtual application <b>110</b> will request access as the virtual application <b>110</b> executes. Based on these predictions, the Sandbox Manager <b>134</b> may preemptively download pages before the pages are requested by the virtual application <b>110</b>.
Referring to <figref idref="DRAWINGS">FIG. 19</figref>, the following pseudo code provides a non-limiting example of a method of creating the streaming model file <b>1180</b>, and the xsequence files <b>1182</b>, which in the following pseudo code include a single prefetch xsequence file, one or more sequence xsequence files, and one or more rest xsequence files. The following pseudo code uses data that was stored in data structures by pseudo code portions provided above.
<tables id="TABLE-US-00013" num="00013"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>public void Save ( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>// save the model</entry></row><row><entry /><entry>Model.SaveAs(“Model.xm”);</entry></row><row><entry /><entry>// save prefetch file</entry></row><row><entry /><entry>ListOfPrefectchStates.Squence.SaveAs(“p.xs”);</entry></row><row><entry /><entry>// save sequences</entry></row><row><entry /><entry>foreach(Sequence s in States.Sequences)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>// {0} represents the sequence id</entry></row><row><entry /><entry>s.SaveAs (“s{0}.xs”);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>// save rest files</entry></row><row><entry /><entry>foreach(Sequence s in</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>RestSequence.SplitSequenceBy(RestPagesPerStream))</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>// {0} represents the rest sequence id</entry></row><row><entry /><entry>s.SaveAs (“r{0}.xs”);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Then, the method <b>1700</b> terminates.
<figref idref="DRAWINGS">FIG. 7</figref> is a block diagram of a method <b>1000</b> that may be performed by the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b>. In first block <b>1010</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> requests that the server computing device <b>7</b> stream the virtual application <b>110</b> to the client computing device <b>9</b>. Arrow “A<b>9</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the client computing device <b>9</b> to the server computing device <b>7</b> requesting that that the server computing device <b>7</b> stream a virtual application (e.g., the virtual application <b>110</b>) to the client computing device <b>9</b>. By way of a non-limiting example, in block <b>1010</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> may request streaming by passing a URL to the server computing device <b>7</b>.
In response to this request, the server computing device <b>7</b> streams the streaming model file <b>1180</b> and the prefetch xsequence file(s) (e.g., the prefetch xsequence file <b>1632</b>) to the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b>. Arrow “A<b>10</b>” in <figref idref="DRAWINGS">FIG. 13</figref> illustrates a communication from the server computing device <b>7</b> to the client computing device <b>9</b> that streams streaming model file <b>1180</b> and the xsequence files <b>1182</b> (which include the prefetch xsequence file <b>1632</b>) from the server computing device <b>7</b> to the client computing device <b>9</b>.
In block <b>1015</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> receive the model file and the prefetch xsequence file(s).
By way of a non-limiting example, the following code may be used in blocks <b>1010</b> and <b>1015</b> to pass a URL to the server computing device <b>7</b> and download the model file and the prefetch xsequence files.
<tables id="TABLE-US-00014" num="00014"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>LaunchApplication(“http://Host/StreamingApp/”);</entry></row><row><entry /><entry>LaunchApplication(WebUrl)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>Model m = DownloadModel(WebUrl + “/Model.xm”);</entry></row><row><entry /><entry>Prefetch p = DownloadPrefetch(WebUrl + “/p.xs”);</entry></row><row><entry /><entry>Execute(m, p);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Then, in block <b>1020</b>, the Sandbox Manager <b>134</b> launches the virtual application <b>110</b>. Thus, the virtual application <b>110</b> begins executing even though less then all of the data stored in the xlayer file <b>300</b> has been downloaded.
In decision block <b>1022</b>, the Sandbox Manager <b>134</b> determines whether it has received a notification from the virtual runtime engine <b>131</b> that a page has been requested by the virtual application <b>110</b> that has not yet been downloaded, or whether there are additional xsequence files to be downloaded for the virtual application <b>110</b>.
The decision in decision block <b>1022</b> is “REQUEST” when the Sandbox Manager <b>134</b> determines it has received a notification from the virtual runtime engine <b>131</b> that a page has been requested by the virtual application <b>110</b> that has not yet been downloaded.
The decision in decision block <b>1022</b> is “MORE TO DOWNLOAD” when the Sandbox Manager <b>134</b> determines there are additional xsequence files to be downloaded for the virtual application <b>110</b> and the Sandbox Manager <b>134</b> determines it has not received a notification from the virtual runtime engine <b>131</b> that a page has been requested by the virtual application <b>110</b> that has not yet been downloaded.
When the decision in decision block <b>1022</b> is “REQUEST,” in block <b>1030</b>, the directing process <b>129</b> identifies the xsequence file storing the page for which access has been requested. The directing process <b>129</b> may use the model file to look up which xsequence file is storing the page for which access has been requested. Optionally, the directing process <b>129</b> may pause execution of the virtual application <b>110</b>.
In block <b>1035</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> download the xsequence file identified in block <b>1030</b> while the virtual application <b>110</b> is in use. Then, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> return to decision block <b>1022</b>.
The Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> may download additional xsequence files even without receiving a notification from the virtual runtime engine <b>131</b> indicating a page stored by the xsequence file has been requested. For example, after the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> have downloaded the model file and the prefetch xsequence file(s), the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> may download the sequence xsequence files.
When the decision in decision block <b>1022</b> is “MORE TO DOWNLOAD,” in decision block <b>1045</b>, the Sandbox Manager <b>134</b> determines whether one or more of the sequence xsequence files have yet to be downloaded. The decision in decision block <b>1045</b> is “YES” when one or more of the sequence xsequence files have yet to be downloaded. Otherwise, the decision in decision block <b>1045</b> is “NO” when all of the sequence xsequence files have been downloaded.
When the decision in decision block <b>1045</b> is “YES,” in block <b>1050</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> download one of the sequence xsequence files. The directing process <b>129</b> may use the model file to determine which sequence xsequence file to download. Because the directing process <b>129</b> knows which of the sequence xsequence file was the last one downloaded, the directing process <b>129</b> may use the model file to traverse the directed graph structure “SD” and locate the next sequence xsequence file to download. By way of a non-limiting example, the following pseudo code provides an exemplary download loop that may be used to download the sequence xsequence file (referred to in the following pseudo code as “blocks”). The function named “GetNextXferBlock( )” reads the model file to identify the next sequence xsequence file to download.
<tables id="TABLE-US-00015" num="00015"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>private void DoStreamDownload( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>while (!DownloadComplete)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>// prediction logic</entry></row><row><entry /><entry>Url urlBlock = GetNextXferBlock( );</entry></row><row><entry /><entry>// download the block using http</entry></row><row><entry /><entry>Block block = DownloadBlock(urlBlock);</entry></row><row><entry /><entry>// write the pages to memory shared</entry></row><row><entry /><entry>// with virtual machine</entry></row><row><entry /><entry>MemoryMap.Write(block);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The above download loop continues looping until all of the sequence xsequence files listed in the model file are written to the shared memory block <b>133</b>. As mentioned above, in the above pseudo code, the order in which the sequence xsequence files are downloaded is determined by the function named “GetNextXferBlock( )” The following pseudo code provides an exemplary implementation of the function named “GetNextXferBlock( )”
<tables id="TABLE-US-00016" num="00016"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>public Block GetNextXferBlock( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>// sort all threads and processes by last</entry></row><row><entry /><entry>// scheduled time to ensure fairness</entry></row><row><entry /><entry>VirtualApp.Threads.SortByLastScheduledTime( );</entry></row><row><entry /><entry>Block xferBlock = null;</entry></row><row><entry /><entry>// get the predicted sequence</entry></row><row><entry /><entry>foreach (VirtualThread vt in VirtualApp.Threads)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>xferBlock =</entry></row><row><entry /><entry> GetPredictedBlock(VirtualApp.Threads.First);</entry></row><row><entry /><entry>if (xferBlock != null)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="63pt" align="left" /><colspec colname="1" colwidth="154pt" align="left" /><tbody valign="top"><row><entry /><entry>vt.LastScheduledTime = DateTime.UtcNow;</entry></row><row><entry /><entry>return xferBlock;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>// finally get a rest block if no other blocks</entry></row><row><entry /><entry>// are required</entry></row><row><entry /><entry>xferBlock = GetNextRestBlock( );</entry></row><row><entry /><entry>return xferBlock;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
As discussed above, the directed graph structure “SD” may include one or more branches. Therefore, when the Sandbox Manager <b>134</b> is traversing the directed graph structure “SD” (using the model file) and encounters a branch, the Sandbox Manager <b>134</b> must select one of the transitions of the branch. The Sandbox Manager <b>134</b> may perform a weighted depth first traversal of the directed graph structure “SD,” which reflects the order(s) in which the pages are most commonly accessed as determined by the profiling process <b>700</b> and the modeling process. Alternatively, other types of traversal, such as a breadth first traversal may be used. The weight assigned to a transition to a particular sequence xsequence file (which stores the pages of one or more transition data structures) may be a percentage that the particular transition occurred out of all of the transitions recorded in the transcripts. <figref idref="DRAWINGS">FIG. 8</figref> illustrates an exemplary traversal of a streaming model containing the sequence xsequence files SXF<b>1</b> to SXF<b>6</b>. Each transition between two consecutively accessed sequence xsequence file is assigned a weight. For example, the weight assigned to the transition between the sequence xsequence file SXF<b>1</b> and SXF<b>2</b> is 40%. In this example, the sequence xsequence files are downloaded in the following order: SXF<b>1</b>, SXF<b>3</b>, SXF<b>5</b>, SXF<b>6</b>, SXF<b>4</b>, and SXF<b>2</b>.
Returning to <figref idref="DRAWINGS">FIG. 7</figref>, the rest xsequence files are downloaded after the sequence xsequence files have been downloaded. Thus, when the decision in decision block <b>1045</b> is “NO,” in block <b>1060</b>, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> download one or more rest xsequence files. The rest xsequence files are ordered by the frequency in which their pages were accessed during the profiling process <b>700</b>. For example, a rest file “0” (r<b>0</b>.xs) may contains pages that are most likely to be accessed, and should be downloaded first. Then, the Sandbox Manager <b>134</b> and/or the Client Application <b>132</b> advances to decision block <b>1065</b>.
In decision block <b>1065</b>, the Sandbox Manager <b>134</b> determines whether all of the xsequence files have been downloaded. The decision in decision block <b>1065</b> is “YES” when all of the xsequence files have been downloaded. Otherwise, the decision in decision block <b>1065</b> is “NO” when all of the xsequence files have not been downloaded.
When the decision in decision block <b>1065</b> is “NO,” the Sandbox Manager <b>134</b> returns to decision block <b>1022</b>.
When the decision in decision block <b>1065</b> is “YES,” all of the rest xsequence files have been downloaded. Therefore, the application download is complete, and the method <b>1000</b> terminates.
The following pseudo code is a non-limiting example of a method of downloading the rest xsequence files and determining when the download is complete.
<tables id="TABLE-US-00017" num="00017"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>private Block GetNextRestBlock( )</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>if (DownloadedRestBlocks < Model.RestBlocks)</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>return Model.RestBlocks[DownloadedRestBlocks++];</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>else</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>DownloadedComplete = true;</entry></row><row><entry /><entry>return null;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Directing Download
U.S. patent application Ser. No. 12/695,107 (which is incorporated herein by reference) describes the Sandbox Manager <b>134</b>, which is a virtual process manager configured to download and execute a virtualized application file from a server computing device to a client computing device. Each of the streaming model file <b>1180</b> (see <figref idref="DRAWINGS">FIG. 19</figref>), the prefetch xsequence files, the sequence xsequence files, and the rest sequence files may be downloaded using well-known conventional download protocols, such as HTTP, FTP, SMB, and the like. As discussed above, the Sandbox Manager <b>134</b> may be used to implement the directing process <b>129</b> configured to direct the delivery and execution of the virtual application <b>110</b>. The directing process <b>129</b> may perform operations on behalf of the virtual application <b>110</b> including, but not limited to, streaming application code and data, profiling execution (e.g., by performing the method <b>800</b> illustrated in <figref idref="DRAWINGS">FIG. 5</figref>), managing the sandbox <b>124</b>, performing shell integration, and performing instance management. To support these operations in a cooperative fashion, the directing process <b>129</b> selectively starts, pauses, terminates, and monitors the virtual application <b>110</b>. By way of a non-limiting example, the directing process <b>129</b> may start, pause, resume, terminate the virtual application <b>110</b> in response to a command or instruction from a user or another process (or application) separate from the Sandbox Manager <b>134</b> and the virtual runtime engine <b>131</b>. The directing process <b>129</b> may also dynamically populate the underlying xlayer file <b>300</b> during execution of the virtual application <b>110</b>.
<figref idref="DRAWINGS">FIG. 14</figref> illustrates the block of shared memory <b>133</b> that may be used to send settings and state between the directing process <b>129</b> and the virtual runtime engine <b>131</b>. As illustrated in <figref idref="DRAWINGS">FIG. 14</figref>, the directing process <b>129</b> may direct multiple virtual runtime engines, which may each communicate with the directing process <b>129</b> via a named pipe connection (described above). Depending upon the implementation details, the directing process <b>129</b> may use one or more special command-line arguments <b>1170</b>, status events, one or more sentinel objects <b>1174</b>, and shared memory structures <b>1172</b> (stored in the shared memory block <b>133</b>) to control the dynamic delivery, starting, monitoring, pausing, and/or termination of the virtual application <b>110</b> executing with the virtual environment implemented by the virtual runtime engine <b>131</b>.
As mentioned above, the directing process <b>129</b> may send one or more special command-line arguments <b>1170</b> to the virtual runtime engine <b>131</b>. For example, settings may be provided to the virtual runtime engine <b>131</b> via the special command-line arguments <b>1170</b>. An exemplary command-line argument may include “/XExecutionSession=<SessionId>.” This SessionId value is used by the directing process <b>129</b> and the virtual runtime engine <b>131</b> to lookup the shared memory by name.
By way of a non-limiting example, the shared memory block <b>133</b> may have a name with the following format:
_xmgr_<managerVersion>_sessioninfo_<sessionId>
In the above format, “managerVersion” is one of the special command-line arguments <b>1170</b> (like the SessionId value). By way of a non-limiting example, the SessionId value may be implemented as a 64-bit integer.
Status events are created and used by the directing process <b>129</b> to signal changes in the state of the session to the virtual runtime engine <b>131</b>. By way of a non-limiting example, the session may have the following states, which may be assigned the exemplary values indicated:
<tables id="TABLE-US-00018" num="00018"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>ESessionStates</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="105pt" align="left" /><colspec colname="2" colwidth="63pt" align="left" /><tbody valign="top"><row><entry /><entry>eSessionPaused</entry><entry>= 0x1,</entry></row><row><entry /><entry>eSessionRunning</entry><entry>= 0x2,</entry></row><row><entry /><entry>eSessionShutdown</entry><entry>= 0x3,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The sentinel object <b>1174</b>, which is a named kernel object, is used to indicate the lifetime of the virtual application. For example, a named mutex may be used. Once the sentinel object <b>1174</b> disappears (which may be determined by polling in the directing process <b>129</b>) all processes of the virtual application <b>110</b> have terminated. As is appreciated by those of ordinary skill in the art, some operating systems, such as Microsoft WINDOWS®, are configured to track or count references by other objects to named kernel objects. Thus, when a WINDOWS® process has a reference (or handle) to the sentinel object <b>1174</b>, the host operating system <b>35</b>A (see <figref idref="DRAWINGS">FIG. 2</figref>) will store an indication of this reference. For example, the host operating system <b>35</b>A may store a reference count indicating how many objects have references to the sentinel object <b>1174</b>. When the reference count is zero, no processes have references to the sentinel object <b>1174</b>.
In addition to the above fixed-sized shared memory structures used to manage execution of the virtual application <b>110</b>, optionally, another named shared memory block <b>1176</b> containing handles to a shared mapping of the xlayer file (e.g., the xlayer file <b>300</b>) itself may be used, along with a shared memory based bit-array structure <b>1178</b> to support dynamic population of the xlayer file (e.g., the xlayer file <b>300</b>) while the virtual application <b>110</b> is running. This is done to support streaming delivery of the virtual application <b>110</b> using the streaming model <b>122</b>.
Starting a Virtual Application
<figref idref="DRAWINGS">FIG. 27</figref> is a flow diagram of a method <b>1200</b> of starting a virtual application in a directed fashion. The method <b>1200</b> may be performed in block <b>1020</b> of the method <b>1000</b> illustrated in <figref idref="DRAWINGS">FIG. 7</figref>.
In first block <b>1210</b>, the directing process <b>129</b> allocates the block of shared memory <b>133</b> (see <figref idref="DRAWINGS">FIG. 2</figref>). In next block <b>1215</b>, the directing process <b>129</b> allocates a status event object used for signaling changes in the state of the session. The status event objects may be implemented using the WINDOWS® event system that uses kernel handles.
Then, in block <b>1220</b>, the directing process <b>129</b> sets the values of any specific settings or values stored in the shared memory block. For example, the shared memory block may store a SignalEvent value and a State value. The SignalEvent value is set to the handle value of the status event object allocated in block <b>1215</b>.
Whenever the State value is changed or the xlayer mapping <b>1176</b> is updated by the directing process <b>129</b> (e.g., when additional xsequence files have been downloaded), the directing process <b>129</b> triggers a SignalEvent. In response to detecting the SignalEvent, each thread launched by the execution of the virtual application <b>110</b> checks the State value to determine if the state of the virtual application <b>110</b> is to be changed (e.g., paused, resumed, or terminated). Any threads waiting for the xlayer mapping <b>1176</b> to indicate a particular portion of the downloading virtualized application file is available (or stored in a local copy of the virtualized application file), also check the xlayer mapping <b>1176</b> to determine whether the data has been delivered.
The initial value of the State value depends upon in which state the virtual application <b>110</b> is to be launched. If the virtual application is to be launched in a “paused” state, the State value is set to a value indicating the application is paused (e.g., the eSessionPaused value). Otherwise, the State value is set to a value indicating the application is executing (e.g., the eSessionRunning value). If at some point, the application is terminated, the State value is set to a value indicating the application has shutdown (e.g., the eSessionShutdown value).
Once the shared memory block <b>133</b>, status event object(s), and command-line arguments are prepared, in block <b>1225</b>, the directing process <b>129</b> launches the virtual application <b>110</b>. By way of a non-limiting example, the virtual application <b>110</b> may be launched via standard a Win32 CreateProcess function or ShellExecute APIs. The following pseudo code provides a non-limiting example of a method of starting a virtual application.
<tables id="TABLE-US-00019" num="00019"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>SessionId = Allocate random 64-bit integer</entry></row><row><entry /><entry>SharedMemoryName =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>“_xmgr_<mgrVersion>_sessionInfo_<SessionId>”</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>SharedMemory = CreateSharedMemory(ReadWritePerms,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>SharedMemoryName)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>Prepare shared memory settings and initial state, either</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>eSessionPaused or eSessionRunning</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><tbody valign="top"><row><entry /><entry>CreateProcessArgs = “/XExecutionSession=<SessionId>”</entry></row><row><entry /><entry>CreateProcess(VirtualAppPath, CreateProcessArgs)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The first code portion to execute within the virtual application <b>110</b> is called “bootstrap” code. The “bootstrap” code includes the virtual runtime engine code that, when executing, sets up the virtual runtime environment, reads the configuration information (e.g., virtual filesystem information, virtual registry settings, and the like), and other initialization tasks. As explained above, the configuration information may be stored in an xlayer file (e.g., the xlayer file <b>300</b>). When the SessionId value is passed to the “bootstrap” code, the “bootstrap” code uses the SessionId value to determine a name of the shared memory block <b>133</b> having the predetermined format specified above, and searches for the shared memory block <b>133</b> using that name. The “bootstrap” code may also create the sentinel object <b>1174</b>. Once found, addition settings can be read as well as the State value. As discussed above, in particular implementations, the State value may be set to the eSessionPaused value, the eSessionRunning value, or the eSessionShutdown value.
Then, the method <b>1200</b> terminates.
Pausing and Resuming a Virtual Application
As mentioned previously, once a virtual application has been started in the directed fashion, it is able to detect Signal Events that provide notification of changes in the state of the session. Depending upon the implementation details, this may be done via the Win32::WaitForMultipleObjects APIs, and by associating the SignalEvent value with the handle of the directing process <b>129</b>. After detecting a SignalEvent, the virtual application <b>110</b> can check the State value of the shared memory block <b>133</b>. If the State value indicates the session has been paused (e.g., the State value is set to the eSessionPaused value), the virtual runtime engine <b>131</b> blocks access by the virtual application <b>110</b> to the underlying xlayer file (which contains the virtual filesystem and registry among other things). The virtual runtime engine <b>131</b> could also explicitly suspend application threads. However, this may not be necessary.
The following pseudo code provides a non-limiting example of a method of pausing a virtual application by setting the value of the State value to the eSessionPaused value and triggering a SignalEvent to indicate a change in the state of the session.
<tables id="TABLE-US-00020" num="00020"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>SetStateInSharedMemory(SharedMemory, eSessionPaused)</entry></row><row><entry /><entry>PulseEvent(SignalEvent)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
When the State value indicates the session is running (e.g., the State value is set to the eSessionRunning value), access to the xlayer file is restored. In other words, the virtual application <b>110</b> resumes. The following pseudo code provides a non-limiting example of a method of resuming a virtual application by setting the value of the State value to the eSessionRunning value and triggering a SignalEvent to indicate a change in the state of the session.
<tables id="TABLE-US-00021" num="00021"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>SetStateInSharedMemory(SharedMemory, eSessionRunning)</entry></row><row><entry /><entry>PulseEvent(SignalEvent)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Monitoring a Virtual Application
The directing process <b>129</b> has the ability to tell the virtual application to shutdown. However, this shutdown occurs asynchronously. Additionally, the virtual application can shut itself down at any time, or may be shut down due to user control, for example when the user closes the virtual application. As mentioned above, the named sentinel object <b>1174</b> is used to determine when the virtual application is completely shutdown. Each process within the virtual application duplicates the handle of the named sentinel object <b>1174</b> to the child process during any create-process call. For example, the name of the named sentinel object <b>1174</b> may be determined as follows:
_xmgr_<managerVersion>_mtx_sentinel_<sessionId>
Duplicating the handle of the named sentinel object <b>1174</b> into each child process ensures that the named sentinel object <b>1174</b> remains alive (e.g., has a reference count greater than zero) for the lifetime of the virtual application. The directing process <b>129</b> may determine the virtual application is executing by polling for the existence of the named sentinel object <b>1174</b> occasionally (e.g., at regular intervals). For example, the directing process <b>129</b> may poll for the named sentinel object <b>1174</b> once every second via a Win32 timer thread function. In embodiments in which a reference count is available, the polling may simply poll to determine if the reference count is equal to zero meaning no objects have references (or handles) to the named sentinel object <b>1174</b>.
The following pseudo code provides a non-limiting example of a method of monitoring for virtual application shutdown.
<tables id="TABLE-US-00022" num="00022"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>Begin Shutdown Polling</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>Delay For Polling Interval</entry></row><row><entry /><entry>SentinelName =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>“_xmgr_<mgrVersion>_mtx_sentinel_<SessionId>”</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>OpenMutex(SyncPermission, SentinelName)</entry></row><row><entry /><entry>If Found</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>Goto Begin Shutdown Polling</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Once shutdown is detected, the directing process <b>129</b> may perform custom actions, such as cleaning up resources, marking the end time in usage statistics, recording the termination in a transcript file, etc.
Dynamic Population of XLayer File During Application Execution
To begin execution of a virtual application as soon as possible, one may try to determine which portions of the xlayer file are necessary for initial execution and deliver those portions to the virtual application first. To actually support dynamic population of the underlying xlayer file while it is being executed requires a system and method for doing so.
The directing process <b>129</b> is responsible for preparing the data-structures described above and illustrated in <figref idref="DRAWINGS">FIG. 15</figref>. The named shared-memory block <b>133</b> contains handle values of the xlayer mapping <b>1176</b> and the bit-array page mask <b>1178</b>. The shared-memory block <b>133</b> includes a file <b>1176</b> mapping of the underlying xlayer file (e.g., the xlayer file <b>300</b>) with read-write access enabled. The shared-memory block <b>133</b> includes a block of shared memory used to store the bit-array <b>1178</b> for indicating which pages have been populated within the xlayer being used by the virtual runtime engine <b>131</b> to execute the virtual application <b>110</b>.
By way of a non-limiting example, the name of the shared memory block <b>133</b> may have the following format: _xmgr_<managerVersion>_mem_xlayerinfo_<xlayerpathhash>. Where “managerVersion” is an argument passed on the command line from the directing process <b>129</b>. The “xlayerpathhash” may be a hash (e.g., a “good” hash) of the normalized path to the xlayer file being populated.
If the shared memory block <b>133</b> has been allocated, the virtual runtime engine <b>131</b> concludes the xlayer file is to be dynamically delivered. If the shared memory block <b>133</b> has not been allocated, the virtual runtime engine <b>131</b> concludes the xlayer file is fully populated.
By way of a non-limiting example, the shared-memory block <b>133</b> may be implemented using the following structure:
<tables id="TABLE-US-00023" num="00023"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>struct SXLayerInfo</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>HANDLE XLayerMapping;</entry></row><row><entry /><entry>HANDLE PageMap;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>};</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
The following pseudo code provides a non-limiting example of a method of preparing dynamic xlayer population data-structures.
<tables id="TABLE-US-00024" num="00024"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><thead><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>xlayerPathHash = GoodHash(xlayerPath)</entry></row><row><entry>String nameSharedMemory =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>_xmgr_<managerVersion>_mem_xlayerinfo_<xlayerPathHash></entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>SXLayerInfo info = CreateSharedMemory(ReadWritePerms,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>nameSharedMemory)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>info.XLayerMapping = CreateFileMapping(xlayerPath)</entry></row><row><entry>PageMapPages = (FileSize(xlayerPath) + PAGESIZE − 1) /</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>PAGESIZE</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>PageMapSize = (PageMapPages + 7) / 8</entry></row><row><entry>into.PageMap = CreateSharedMemory(ReadWritePerms,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>NULL_NAME, PageMapSize)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
After this data structure is prepared, execution of the application may be started as described above. Note the local copy of the xlayer file need not be fully populated to launch the virtual application. However, once started, the virtual application will begin to demand access to various parts of the local copy of the xlayer file and will wait until these requests are satisfied. By way of a non-limiting example, this access may be requested via an IStream interface abstraction of the xlayer file. The blocking is done by way of a check of the pageMap bit-array <b>1178</b>. If a requested page is not yet populated, as indicated by this bit-array, the virtual application waits on the SignalEvent, until the PageMap indicates the page has been populated within the local copy of the xlayer file. The following pseudo code provides a non-limiting example of a method by which the virtual application may access the xlayer file and check the PageMap.
<tables id="TABLE-US-00025" num="00025"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>XLayerAccess (AccessOffset, AccessBytes)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>PageStart = AccessOffset / PAGESIZE</entry></row><row><entry /><entry>PageEnd = (AccessOffset + AccessBytes − 1) / PAGESIZE</entry></row><row><entry /><entry>For Each (Page from PageStart to PageEnd)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>While (IsBitSetInBitArray(PageMap, Page) is FALSE)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>WaitForSingleObject(SignalEvent,</entry></row><row><entry /><entry>ONE_SECOND_POLL_TIMEOUT)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Simultaneously, the directing process <b>129</b> may populate any portion of the xlayer file. The following pseudo code provides a non-limiting example of a method by which the directing process may populate any portion of the xlayer file.
<tables id="TABLE-US-00026" num="00026"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>PopulateXLayer(Data, Index)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>OffsetTarget = Index * PAGESIZE</entry></row><row><entry /><entry>MappedView = MapViewOfFile(info.XLayerMapping,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="133pt" align="left" /><colspec colname="1" colwidth="84pt" align="left" /><tbody valign="top"><row><entry /><entry>OffsetTarget, PAGESIZE)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>Memcopy(MappedView, Data, PAGESIZE)</entry></row><row><entry /><entry>UnMapViewOfFile(MappedView)</entry></row><row><entry /><entry>SetBitInBitArray(info.PageMap, Index)</entry></row><row><entry /><entry>PulseEvent(SignalEvent)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
As the virtual application <b>110</b> executes, it sends messages (e.g., messages using the data structure named “SFeedbackStatsMessage”) to the directing process <b>129</b> indicating which page of the local copy of the xlayer file is currently being accessed by the executing virtual application <b>110</b>. The directing process <b>129</b> uses these messages to determine where in the streaming model file <b>1180</b> the page currently being accessed by the executing virtual application <b>110</b> is located. The directing process <b>129</b> then begins reading the streaming model file <b>1180</b> from that location. This allows the traversal of the directed graph structure stored by the streaming model file <b>1180</b> to be modified by the user choices occurring during the execution of the virtual application <b>110</b>. Thus, the directing process <b>129</b> traverse the streaming model file <b>1180</b> in a custom manner dictated by the actions of a user. As discussed above, the SFeedbackStatsMessage type message includes the blocked value. The virtual runtime engine <b>131</b> may communicate to the directing process <b>129</b> that the virtual runtime engine has tried to access a page that has not yet been downloaded (e.g., is not indicated as being included in the local copy of the downloaded xlayer file by the xlayer mapping <b>1176</b>) by setting the blocked value to “TRUE.”
xsequence File Format
<figref idref="DRAWINGS">FIG. 16</figref> illustrates an exemplary xsequence file format <b>600</b>. The prefetch xsequence file, sequence xsequence files, and rest xsequence files may each be constructed using the xsequence file format <b>600</b>. The xsequence file format <b>600</b> illustrated in <figref idref="DRAWINGS">FIG. 16</figref> includes a file header portion <b>610</b>, which may be the first item of the xsequence file format, and one or more data blocks <b>620</b> (referred to as “xblocks”). Each of the xblocks <b>820</b> may store a single page. The file header portion <b>610</b> includes a signature value <b>622</b>, a version stamp <b>624</b>, one or more flags <b>625</b>, a size indicator <b>626</b>, an indicator of size of the original file <b>628</b>, an indicator of size of the xblocks <b>630</b>, a number of xblocks indicator <b>632</b>, and an optional number of xblocks per chapter indicator <b>634</b>. The data in file header portion <b>610</b> is ordered with the signature value <b>622</b> being first followed by the version stamp <b>624</b>, which is followed by the size indicator <b>626</b>, which is followed by the indicator of size of the original file <b>628</b>, which is followed by the indicator of size of the xblocks <b>630</b>, which is followed by the number of xblocks indicator <b>632</b>, which is followed by the optional number of xblocks per chapter indicator <b>634</b>.
The signature value <b>622</b> is a value used to authenticate the information stored in a file. For example, the signature value <b>622</b> may be used to validate a particular xsequence file. By way of a non-limiting example, the signature value <b>622</b> of a valid xsequence file may store a predetermined value (e.g., the string “xsequencedfile”). Thus, to validate the xsequence file, the Sandbox Manager <b>134</b> may simply confirm the signature value <b>622</b> stores the predetermined value. The signature value <b>622</b> may be implemented as a 16-byte array. The value stored in the signature value <b>622</b> may be generated using any method and the present teachings are not limited to use with a signature value generated using any particular method.
The version stamp <b>624</b> may include a major version identifier <b>636</b> and a minor version identifier <b>638</b>. The major version identifier <b>636</b> is typically modified when a change is made to the xsequence file format <b>600</b> that would make the file incompatible with a previous version of the virtual runtime engine <b>131</b>. The minor version identifier <b>638</b> may be incremented for informational purposes when the xsequence file format <b>600</b> is modified such that it requires special handling to enable backwards compatibility. By way of a non-limiting example, each of the major and minor version identifiers <b>636</b> and <b>638</b> may be implemented as 32-bit integers.
The flags <b>625</b> may include a flag that indicates whether the data stored in the xblocks <b>620</b> has been compressed. The flags <b>625</b> may include a flag that indicates which type of compression was used to compress the data stored in the xblocks <b>620</b>. By way of a non-limiting example, the flags <b>625</b> may be implemented as a 32-bit integer.
The size indicator <b>626</b> identifies a location in memory that corresponds to the end of an xsequence file having the xsequence file format <b>600</b>. The location in memory to which the size indicator <b>626</b> refers is identified in <figref idref="DRAWINGS">FIG. 16</figref> by a curved arrow “A<b>6</b>.” By way of a non-limiting example, the size indicator <b>626</b> may be implemented as a 64-bit integer.
The indicator of size of the original file <b>628</b> indicates the size of the original file (e.g., the xlayer file <b>300</b>). By way of a non-limiting example, the indicator of size of the original file <b>628</b> may be implemented as a 64-bit integer.
The indicator of size of the xblocks <b>630</b> indicates the size of all of the xblocks <b>620</b> in the xsequence file combined. By way of a non-limiting example, the indicator of size of the xblocks <b>630</b> may be implemented as a 32-bit integer.
The number of xblocks indicator <b>632</b> indicates the number of the xblocks <b>620</b> in the xsequence file. By way of a non-limiting example, the number of xblocks indicator <b>632</b> may be implemented as a 32-bit integer.
The number of xblocks per chapter indicator <b>634</b> indicates a number of xblocks stored in a particular chapter. Chapters may be used by the directing process <b>129</b> of the Sandbox Manager <b>134</b> to skip to a particular portion of the xsequence file. By way of a non-limiting example, the number of xblocks per chapter indicator <b>634</b> may be implemented as a 32-bit integer.
As mentioned above, the xsequence file format <b>600</b> includes one or more xblocks <b>620</b> that each contains a portion of the data stored in the original file (e.g., the xlayer file <b>300</b>). Referring to <figref idref="DRAWINGS">FIG. 17</figref>, each of the xblocks <b>620</b> has a block structure <b>660</b> that may include a signature value <b>662</b>, one or more flags <b>668</b>, an xblock index value <b>670</b>, an xblock identifier <b>674</b>, an xblock size indicator <b>678</b>, and a data portion <b>680</b>. The data in the block structure <b>660</b> is ordered with the signature value <b>662</b> being first followed by the flags <b>668</b>, which is followed by the xblock index value <b>670</b>, which is followed by the xblock identifier <b>674</b>, which is followed by the xblock size indicator <b>678</b>, which is followed by the number of the data portion <b>680</b>.
The signature value <b>662</b> is a value used to authenticate the information stored in an xblock and contains a unique value assigned to the xblock. The signature value <b>662</b> may be implemented as a 6-byte array. The value stored in the signature value <b>662</b> may be generated using any method and the present teachings are not limited to use with a signature value generated by any particular method.
The flags <b>668</b> may include values for various block options. By way of a non-limiting example, the flags <b>668</b> may include an indicator that a block stores metadata instead of virtual application data. By way of a non-limiting example, the flags <b>668</b> may be implemented as a 16-bit integer.
The xblock index value <b>670</b> is a numeric index value assigned to the xblock within the xsequence file. This xblock index value <b>670</b> is an index value associated with the block within an xsequence file. For example, if an xsequence file has four xblocks, the xblocks may be assigned index values of 0, 1, 2, and 3 in the order in which the xblocks were written to xsequence file. By way of a non-limiting example, the index value <b>670</b> may be implemented as a 32-bit integer.
The xblock identifier <b>674</b> identifies the data stored in the xblock within the original file (e.g., the xlayer file <b>300</b>). The model builder server <b>8</b> divides the original xlayer file into pages. For example, an xlayer file may be divided into pages P<b>0</b>, P<b>1</b>, P<b>2</b>, P<b>3</b>, P<b>4</b>, . . . PN. The xblock identifier <b>674</b> stores the location of the page in the original xlayer file. Thus, when the xblock is read by the Sandbox Manager <b>134</b>, the Sandbox Manager <b>134</b> knows where to write the xblock in the locally reconstructed copy of the xlayer file. By way of a non-limiting example, the xblock identifier <b>674</b> may be implemented as a 32-bit integer.
The xblock size indicator <b>678</b> indicates the size of the xblock. By way of a non-limiting example, the xblock size indicator <b>678</b> may be implemented as a 32-bit integer.
The data portion <b>680</b> stores the data of the xblock.
As described above, the streaming model is used to create the prefetch xsequence file, sequence xsequence files, and rest xsequence files in accordance with an order specified in the streaming model. After one or more of these files are downloaded, the Sandbox Manager <b>134</b> may begin the process of reassembling or reconstructing the original file (e.g., the xlayer file <b>300</b>).
Reconstructing the Original File from One or More Xsequence Files
<figref idref="DRAWINGS">FIG. 18</figref> is a flow diagram of a method <b>900</b> that may be performed by the Sandbox Manager <b>134</b>. In particular, the method <b>900</b> may be performed by the directing process <b>129</b> of the Sandbox Manager <b>134</b>.
In first block <b>910</b>, the Sandbox Manager <b>134</b> receives an xsequence file.
In next block <b>912</b>, the Sandbox Manager <b>134</b> reads the information stored in the file header portion <b>610</b> (see <figref idref="DRAWINGS">FIG. 16</figref>) of the xsequence file.
In decision block <b>915</b> (using the information read in block <b>912</b>), the Sandbox Manager <b>134</b> determines whether the xsequence file received in block <b>910</b> is valid. An xsequence file must be validated (or authenticated) before it can be used. As mentioned above, the Sandbox Manager <b>134</b> may validate an xsequence file by confirming the signature value <b>622</b> stores the predetermined value (e.g., the unique string “xsequencedfile”). Further, to ensure compatibility, the Sandbox Manager <b>134</b> may confirm that the major and minor versions match those of the virtual runtime engine <b>131</b>.
The following pseudo code provides a non-limiting example of an implementation of blocks <b>912</b> and <b>915</b>.
<tables id="TABLE-US-00027" num="00027"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><thead><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>Method ReadXSequenceFileHeader(File)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Byte[ ] signature = File.Read(GLOBAL_SIGNATURE_LENGTH)</entry></row><row><entry /><entry>For (int i = 0; i < GLOBAL_SIGNATURE_LENGTH; i++)</entry></row><row><entry /><entry>Begin</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>If (signature[i] != GLOBAL_SIGNATURE[i]) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>Throw Invalid signature exception</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry>MajorVersion = File.ReadInt32( )</entry></row><row><entry /><entry>MinorVersion = File.ReadInt32( )</entry></row><row><entry /><entry>If (MajorVersion != CURRENT_MAJOR_VERSION) or</entry></row><row><entry /><entry> (MinorVersion != CURRENT_MINOR_VERSION)</entry></row><row><entry /><entry>Begin</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>Throw Invalid version exception</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry>Flags = File.ReadInt32( )</entry></row><row><entry /><entry>Size = File.ReadInt64( )</entry></row><row><entry /><entry>SourceFileSize = File.ReadInt64( )</entry></row><row><entry /><entry>BlockSize = File.ReadInt32( )</entry></row><row><entry /><entry>BlockCount = File.ReadInt32( )</entry></row><row><entry /><entry>BlocksPerChapter = File.ReadInt32( )</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
In the pseudo code above, if the signature value <b>622</b> (read into variable “signature”) does not equal the predetermined value (stored in the constant “GLOBAL_SIGNATURE”), an exception is generated. Further, if the major version identifier <b>636</b> (read into variable “MajorVersion”) does not match the major version of the virtual runtime engine <b>131</b> (stored in the constant “CURRENT_MAJOR_VERSION”) or the minor version identifier <b>638</b> (read into variable “MinorVersion”) does not match the major version of the virtual runtime engine <b>131</b> (stored in the constant “CURRENT_MINOR_VERSION”), an exception is generated. After the xsequence file has been verified, in the pseudo code above, the remaining data stored in the file header portion <b>610</b> is read (e.g., the flags <b>625</b>, the size indicator <b>626</b>, the indicator of size of the original file <b>628</b>, the indicator of size of the xblocks <b>630</b>, the number of xblocks indicator <b>632</b>, and the number of xblocks per chapter indicator <b>634</b>). At this point, the Sandbox Manager <b>134</b> knows the number of blocks stored in the xsequence file (which is provided by the number of xblocks indicator <b>632</b>) and block sizes (which is provided by the indicator of size of the xblocks <b>630</b>).
The decision in decision block <b>915</b> is “YES” when Sandbox Manager <b>134</b> determines the xsequence file is valid. Otherwise, the decision in decision block <b>915</b> is “NO” when Sandbox Manager <b>134</b> determines the xsequence file is invalid. By way of a non-limiting example, the decision in decision block <b>915</b> is “NO” when the pseudo code above generates an exception because the signature value <b>622</b> does not equal the predetermined value, the major version identifier <b>636</b> does not match the major version of the virtual runtime engine <b>131</b>, and/or the minor version identifier <b>638</b> does not match the minor version of the virtual runtime engine <b>131</b>. Otherwise, in this example, the decision in decision block <b>915</b> is “YES.”
When the decision in decision block <b>915</b> is “NO,” the method <b>900</b> terminates.
As mentioned above, the xsequence files are configured to be transferred from one computing device to another (e.g., using conventional streaming methods). When the client computing device <b>9</b> receives an xsequence file from the server computing device <b>7</b>, portions of the original file contained in the received xsequence file are used to populate a copy of the original file constructed or assembled on the client computing device <b>9</b>.
When the decision in decision block <b>915</b> is “YES,” in decision block <b>920</b>, the Sandbox Manager <b>134</b> determines whether the xsequence file received is the first one for the original file. The decision in decision block <b>920</b> is “YES” when the xsequence file received in block <b>910</b> is the first one for the original file. Otherwise, the decision in decision block <b>920</b> is “NO” when one or more xsequence files have been received previously for the original file.
When the decision in decision block <b>920</b> is “YES,” in block <b>925</b>, the Sandbox Manager <b>134</b> allocates the memory mapped file <b>1176</b> illustrated in <figref idref="DRAWINGS">FIG. 15</figref>. The memory mapped file <b>1176</b> is not yet populated with data at this point. Alternatively, the Sandbox Manager <b>134</b> may create the memory mapped file <b>1176</b> when the Sandbox Manager <b>134</b> receives the model file. In such embodiments, block <b>925</b> is omitted from the method <b>900</b> and when the decision in decision block <b>920</b> is “YES,” the Sandbox Manager <b>134</b> advances directly to block <b>930</b>.
In block <b>930</b>, the Sandbox Manager <b>134</b> reads the data portions <b>680</b> of the xblocks into the memory mapped file <b>1176</b> (optionally allocated in block <b>925</b>). As explained above, the block structure <b>660</b> includes the xblock identifier <b>674</b> that indicates the location in the original file from which the data in the xblock was obtained. The xblock identifier <b>674</b> may be used to write the data stored in the xblock in the correct location of the memory mapped file <b>1176</b>.
The following pseudo code provides a non-limiting example of a method of reading a single xblock into memory.
<tables id="TABLE-US-00028" num="00028"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><thead><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>Method ReadXSequenceBlocks(File)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Byte[ ] signature = File.Read(BLOCK_SIGNATURE_LENGTH)</entry></row><row><entry /><entry>For (int i = 0; i < BLOCK_SIGNATURE_LENGTH; i++)</entry></row><row><entry /><entry>Begin</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>If (signature [i] != BLOCK_SIGNATURE[i]) Then</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="175pt" align="left" /><tbody valign="top"><row><entry /><entry>Throw Invalid block signature exception</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry>Flags = File.ReadInt32( )</entry></row><row><entry /><entry>CurrentBlockIndex = File.ReadInt32( )</entry></row><row><entry /><entry>CurrentBlockOriginId = File.ReadInt32( )</entry></row><row><entry /><entry>CurrentBlockSize = File.ReadInt32( )</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Then, in block <b>932</b>, the Sandbox Manager <b>134</b> sends one or notifications that data has been downloaded. In block <b>932</b>, the Sandbox Manager <b>134</b> may send a notification to the virtual runtime engine <b>131</b> (e.g., that signals an event) that the blocks have been downloaded. The following pseudo code provides a non-limiting example of a method of writing the data in an xblock into the correct location of the memory mapped file <b>1176</b> and sending a notification to the virtual runtime engine <b>131</b>.
<tables id="TABLE-US-00029" num="00029"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>Method ReadXSequenceData(File, TargetStream)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>Byte[ ] CurrentBlockData = File.Read(CurrentBlockSize)</entry></row><row><entry /><entry>TargetStream.Position = CurrentBlockOriginId *</entry></row><row><entry /><entry>BlockSize</entry></row><row><entry /><entry>TargetStream.Write(CurrentBlockData, BlockSize)</entry></row><row><entry /><entry>NotifyBlockDownloaded(CurrentBlockIndex,</entry></row><row><entry /><entry>CurrentBlockOriginId)</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
In block <b>932</b>, the Sandbox Manager <b>134</b> may also modify the bit array page mask <b>1178</b> before sending the notification to the virtual runtime engine <b>131</b>.
Then, in block <b>945</b>, the Sandbox Manager <b>134</b> instructs the virtual runtime engine <b>131</b> to launch the virtualized application file <b>140</b> to thereby execute the virtual application <b>110</b>. Depending upon the implementation details, at this point, a prefetch xsequence file may have been downloaded and used to initiate execution of the virtual application <b>110</b>. However, the data stored in the prefetch xsequence file may be inadequate to support all features of the virtual application <b>110</b>. Therefore, in decision block <b>950</b>, the Sandbox Manager <b>134</b> determines whether all of the xsequence files have been downloaded. The method <b>1000</b> illustrated in <figref idref="DRAWINGS">FIG. 7</figref> and described above is used to determine the order in which the xsequence files are downloaded and to request the download of each of the xsequence files in accordance with that order. Then, the Sandbox Manager <b>134</b> advances to decision block <b>950</b>.
When the decision in decision block <b>920</b> is “NO,” in block <b>955</b>, the Sandbox Manager <b>134</b> reads the data portions <b>680</b> of the xblocks into the memory mapped file <b>1176</b> (optionally allocated in block <b>925</b>). Block <b>955</b> may be substantially identical to block <b>930</b>.
Then in block <b>957</b>, the Sandbox Manager <b>134</b> sends one or more notifications that blocks have been downloaded. Block <b>957</b> may be substantially identical to block <b>932</b>. Then, the Sandbox Manager <b>134</b> advances to decision block <b>950</b>.
The decision in decision block <b>950</b> is “YES” when all of the xsequence files have been downloaded. The decision in decision block <b>950</b> is “NO” when all of the xsequence files have not been downloaded.
When the decision in decision block <b>950</b> is “NO,” the Sandbox Manager <b>134</b> returns to block <b>910</b> whereat the Sandbox Manager <b>134</b> receives another xsequence file.
When the decision in decision block <b>950</b> is “YES,” in block <b>935</b>, in block <b>940</b>, the copy of the original file (which is at least partially populated) is written to the local cache <b>139</b> illustrated in <figref idref="DRAWINGS">FIG. 2</figref>. The following pseudo code provides a non-limiting example of a method of copying the copy of the original file to the local cache <b>139</b>.
<tables id="TABLE-US-00030" num="00030"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="21pt" align="left" /><colspec colname="1" colwidth="196pt" align="left" /><thead><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /><entry>Method WriteXSequenceData(TargetStream, FileName)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>TargetStream.Position = 0</entry></row><row><entry /><entry>FileTarget = OpenFile(FileName)</entry></row><row><entry /><entry>For (int i; i < TargetStream.Length; i++)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="49pt" align="left" /><colspec colname="1" colwidth="168pt" align="left" /><tbody valign="top"><row><entry /><entry>FileTarget.WriteByte(TargetStream.ReadByte)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry>End</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
Thus, the Sandbox Manager <b>134</b> need not wait until the entire original file has been assembled to instruct the virtual runtime engine <b>131</b> to execute the virtual application <b>110</b>. In other words, a partially assembled version of the original file may be written to the local cache <b>139</b> illustrated in <figref idref="DRAWINGS">FIG. 2</figref>.
The copy of the original file is illustrated in <figref idref="DRAWINGS">FIG. 2</figref> as the virtualized application file <b>140</b> (e.g., a copy of the xlayer file <b>300</b>) stored in the local cache <b>139</b>.
Computing Devices
<figref idref="DRAWINGS">FIG. 28</figref> is a diagram of hardware and an operating environment in conjunction with which implementations of the virtual application file <b>140</b>, the xlayer file <b>300</b>, the authoring tool <b>170</b>, the Sandbox Manager <b>134</b>, the Client Application <b>132</b>, and/or virtual runtime engine <b>131</b> may be practiced. The description of <figref idref="DRAWINGS">FIG. 28</figref> is intended to provide a brief, general description of suitable computer hardware and a suitable computing environment in which implementations may be practiced. Although not required, implementations are described in the general context of computer-executable instructions, such as program modules, being executed by a computer, such as a personal computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types.
Moreover, those skilled in the art will appreciate that implementations may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like. Implementations may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
The exemplary hardware and operating environment of <figref idref="DRAWINGS">FIG. 28</figref> includes a general-purpose computing device in the form of a computing device <b>12</b>. Each of the virtual application file <b>140</b>, the xlayer file <b>300</b>, the authoring tool <b>170</b>, the Sandbox Manager <b>134</b>, the Client Application <b>132</b>, and/or virtual runtime engine <b>131</b> may be implemented using one or more computing devices like the computing device <b>12</b>. By way of non-limiting example, the virtual application file <b>140</b>, the xlayer file <b>300</b>, the authoring tool <b>170</b>, the Sandbox Manager <b>134</b>, the Client Application <b>132</b>, and/or virtual runtime engine <b>131</b> may be implemented on the computing device <b>12</b>. Further, each of the server computing device <b>7</b>, the model building server <b>8</b>, the client computing device <b>9</b>, and the computing device <b>11</b> may be implemented by computing devices substantially similar to the computing device <b>12</b>.
The computing device <b>12</b> includes the system memory <b>22</b>, a processing unit <b>21</b>, and a system bus <b>23</b> that operatively couples various system components, including the system memory <b>22</b>, to the processing unit <b>21</b>. There may be only one or there may be more than one processing unit <b>21</b>, such that the processor of computing device <b>12</b> comprises a single central-processing unit (CPU), or a plurality of processing units, commonly referred to as a parallel processing environment. The computing device <b>12</b> may be a conventional computer, a distributed computer, or any other type of computer.
The system bus <b>23</b> may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. The system memory may also be referred to as simply the memory, and includes read only memory (ROM) <b>24</b> and random access memory (RAM) <b>25</b>. A basic input/output system (BIOS) <b>26</b>, containing the basic routines that help to transfer information between elements within the computing device <b>12</b>, such as during start-up, is stored in ROM <b>24</b>. The computing device <b>12</b> further includes a hard disk drive <b>27</b> for reading from and writing to a hard disk, not shown, a magnetic disk drive <b>28</b> for reading from or writing to a removable magnetic disk <b>29</b>, and an optical disk drive <b>30</b> for reading from or writing to a removable optical disk <b>31</b> such as a CD ROM, DVD, or other optical media.
The hard disk drive <b>27</b>, magnetic disk drive <b>28</b>, and optical disk drive <b>30</b> are connected to the system bus <b>23</b> by a hard disk drive interface <b>32</b>, a magnetic disk drive interface <b>33</b>, and an optical disk drive interface <b>34</b>, respectively. The drives and their associated computer-readable media provide nonvolatile storage of computer-readable instructions, data structures, program modules, and other data for the computing device <b>12</b>. It should be appreciated by those skilled in the art that any type of computer-readable media which can store data that is accessible by a computer, such as magnetic cassettes, flash memory cards, USB drives, digital video disks, Bernoulli cartridges, random access memories (RAMs), read only memories (ROMs), and the like, may be used in the exemplary operating environment. As is apparent to those of ordinary skill in the art, the hard disk drive <b>27</b> and other forms of computer-readable media (e.g., the removable magnetic disk <b>29</b>, the removable optical disk <b>31</b>, flash memory cards, USB drives, and the like) accessible by the processing unit <b>21</b> may be considered components of the system memory <b>22</b>.
A number of program modules may be stored on the hard disk drive <b>27</b>, magnetic disk <b>29</b>, optical disk <b>31</b>, ROM <b>24</b>, or RAM <b>25</b>, including an operating system <b>35</b>, one or more application programs <b>36</b>, other program modules <b>37</b>, and program data <b>38</b>. A user may enter commands and information into the computing device <b>12</b> through input devices such as a keyboard <b>40</b> and pointing device <b>42</b>. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit <b>21</b> through a serial port interface <b>46</b> that is coupled to the system bus <b>23</b>, but may be connected by other interfaces, such as a parallel port, game port, or a universal serial bus (USB). A monitor <b>47</b> or other type of display device is also connected to the system bus <b>23</b> via an interface, such as a video adapter <b>48</b>. In addition to the monitor, computers typically include other peripheral output devices (not shown), such as speakers and printers.
The computing device <b>12</b> may operate in a networked environment using logical connections to one or more remote computers, such as remote computer <b>49</b>. These logical connections are achieved by a communication device coupled to or a part of the computing device <b>12</b> (as the local computer). Implementations are not limited to a particular type of communications device. The remote computer <b>49</b> may be another computer, a server, a router, a network PC, a client, a memory storage device, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computing device <b>12</b>. The remote computer <b>49</b> may be connected to a memory storage device <b>50</b>. The logical connections depicted in <figref idref="DRAWINGS">FIG. 28</figref> include a local-area network (LAN) <b>51</b> and a wide-area network (WAN) <b>52</b>. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.
When used in a LAN-networking environment, the computing device <b>12</b> is connected to the local area network <b>51</b> through a network interface or adapter <b>53</b>, which is one type of communications device. When used in a WAN-networking environment, the computing device <b>12</b> typically includes a modem <b>54</b>, a type of communications device, or any other type of communications device for establishing communications over the wide area network <b>52</b>, such as the Internet. The modem <b>54</b>, which may be internal or external, is connected to the system bus <b>23</b> via the serial port interface <b>46</b>. In a networked environment, program modules depicted relative to the personal computing device <b>12</b>, or portions thereof, may be stored in the remote computer <b>49</b> and/or the remote memory storage device <b>50</b>. It is appreciated that the network connections shown are exemplary and other means of and communications devices for establishing a communications link between the computers may be used.
The computing device <b>12</b> and related components have been presented herein by way of particular example and also by abstraction in order to facilitate a high-level view of the concepts disclosed. The actual technical design and implementation may vary based on particular implementation while maintaining the overall nature of the concepts disclosed.
Returning to <figref idref="DRAWINGS">FIGS. 1B and 1C</figref>, the system memory <b>22</b>A and the system memory <b>22</b>B may each be substantially similar to the system memory <b>22</b>. Thus, the host operating system <b>35</b>A, the host operating system <b>35</b>B, the virtual application file <b>140</b>, the xlayer file <b>300</b>, the authoring tool <b>170</b>, the Sandbox Manager <b>134</b>, the Client Application <b>132</b>, and/or virtual runtime engine <b>131</b> may be stored as computer executable components on the system memory <b>22</b>A and/or <b>22</b>B. Each of the host operating system <b>35</b>A, the host operating system <b>35</b>B, the virtual application file <b>140</b>, the xlayer file <b>300</b>, the authoring tool <b>170</b>, and/or virtual runtime engine may be implemented using software components that are executable by the processing unit <b>21</b> and when executed perform the functions described above. Further, each of the methods <b>500</b>, <b>505</b>, <b>518</b>, <b>540</b>, <b>700</b>, <b>800</b>, <b>900</b>, <b>1000</b>, <b>1100</b>, and <b>1200</b> may be implemented as computer executable instructions that are executable by the processing unit <b>21</b>.
The foregoing described embodiments depict different components contained within, or connected with, different other components. It is to be understood that such depicted architectures are merely exemplary, and that in fact many other architectures can be implemented which achieve the same functionality. In a conceptual sense, any arrangement of components to achieve the same functionality is effectively “associated” such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality can be seen as “associated with” each other such that the desired functionality is achieved, irrespective of architectures or intermedial components. Likewise, any two components so associated can also be viewed as being “operably connected,” or “operably coupled,” to each other to achieve the desired functionality.
While particular embodiments of the present invention have been shown and described, it will be obvious to those skilled in the art that, based upon the teachings herein, changes and modifications may be made without departing from this invention and its broader aspects and, therefore, the appended claims are to encompass within their scope all such changes and modifications as are within the true spirit and scope of this invention. Furthermore, it is to be understood that the invention is solely defined by the appended claims. It will be understood by those within the art that, in general, terms used herein, and especially in the appended claims (e.g., bodies of the appended claims) are generally intended as “open” terms (e.g., the term “including” should be interpreted as “including but not limited to,” the term “having” should be interpreted as “having at least,” the term “includes” should be interpreted as “includes but is not limited to,” etc.). It will be further understood by those within the art that if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases “at least one” and “one or more” to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles “a” or “an” limits any particular claim containing such introduced claim recitation to inventions containing only one such recitation, even when the same claim includes the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an” (e.g., “a” and/or “an” should typically be interpreted to mean “at least one” or “one or more”); the same holds true for the use of definite articles used to introduce claim recitations. In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should typically be interpreted to mean at least the recited number (e.g., the bare recitation of “two recitations,” without other modifiers, typically means at least two recitations, or two or more recitations).
Accordingly, the invention is not limited except as by the appended claims.
Contents4
23 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23
Every citation, both waysCites: the store holds 247 of 248
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US10761901B2 | Cited by | United States of America | Applicant |
| US9749393B2 | Cited by | United States of America | Applicant |
| US2001016905A1 | Cites | United States of America | Applicant |
| US2002029283A1 | Cites | United States of America | Applicant |
| US2002032754A1 | Cites | United States of America | Applicant |
| US2002066085A1 | Cites | United States of America | Applicant |
| US2002099951A1 | Cites | United States of America | Applicant |
| US2002112078A1 | Cites | United States of America | Applicant |
| US2002129129A1 | Cites | United States of America | Applicant |
| US2002133491A1 | Cites | United States of America | Applicant |
| US2002161578A1 | Cites | United States of America | Applicant |
| US2002162015A1 | Cites | United States of America | Applicant |
| US2002174193A1 | Cites | United States of America | Applicant |
| US2003031176A1 | Cites | United States of America | Applicant |
| US2003051169A1 | Cites | United States of America | Applicant |
| US2004083474A1 | Cites | United States of America | Applicant |
| US2004128342A1 | Cites | United States of America | Applicant |
| US2004133444A1 | Cites | United States of America | Applicant |
| US2004139315A1 | Cites | United States of America | Applicant |
| US2005132359A1 | Cites | United States of America | Applicant |
| US2005198628A1 | Cites | United States of America | Applicant |
| US2005198647A1 | Cites | United States of America | Applicant |
| US2005262553A1 | Cites | United States of America | Applicant |
| US2005273772A1 | Cites | United States of America | Applicant |
| US2006048136A1 | Cites | United States of America | Applicant |
| US2006053380A1 | Cites | United States of America | Applicant |
| US2006074733A1 | Cites | United States of America | Applicant |
| US2010023640A1 | Cites | United States of America | Search report |
| US2010138479A1 | Cites | United States of America | Search report |
| US2010241718A1 | Cites | United States of America | Search report |
| US4468732A | Cites | United States of America | Applicant |
| US5437031A | Cites | United States of America | Applicant |
| US5495610A | Cites | United States of America | Applicant |
| US5860068A | Cites | United States of America | Applicant |
| US5987590A | Cites | United States of America | Applicant |
| US6023712A | Cites | United States of America | Applicant |
| US6263363B1 | Cites | United States of America | Applicant |
| US6453334B1 | Cites | United States of America | Applicant |
| US6493733B1 | Cites | United States of America | Applicant |
| US6564229B1 | Cites | United States of America | Applicant |
| US6675216B1 | Cites | United States of America | Applicant |
| US6704808B2 | Cites | United States of America | Applicant |
| US6757893B1 | Cites | United States of America | Applicant |
| US7028295B2 | Cites | United States of America | Applicant |
| US7064760B2 | Cites | United States of America | Applicant |
| US7065504B2 | Cites | United States of America | Applicant |
| US7076768B2 | Cites | United States of America | Applicant |
| US7089259B1 | Cites | United States of America | Applicant |
| US7096253B2 | Cites | United States of America | Applicant |
| US7096416B1 | Cites | United States of America | Applicant |
| US7117495B2 | Cites | United States of America | Applicant |
| US7130073B2 | Cites | United States of America | Applicant |
| US7162036B2 | Cites | United States of America | Applicant |
| US7240162B2 | Cites | United States of America | Applicant |
| US7272613B2 | Cites | United States of America | Applicant |
| US7337298B2 | Cites | United States of America | Applicant |
| US7356679B1 | Cites | United States of America | Applicant |
| US7360097B2 | Cites | United States of America | Applicant |
| US7386542B2 | Cites | United States of America | Applicant |
| US7437371B2 | Cites | United States of America | Applicant |
| US7451176B2 | Cites | United States of America | Applicant |
| US7451196B1 | Cites | United States of America | Applicant |
| US7499991B2 | Cites | United States of America | Applicant |
| US7523116B2 | Cites | United States of America | Applicant |
| US7536541B2 | Cites | United States of America | Applicant |
| US7577751B2 | Cites | United States of America | Applicant |
| US7590644B2 | Cites | United States of America | Applicant |
| US7600097B1 | Cites | United States of America | Applicant |
| US7607127B2 | Cites | United States of America | Applicant |
| US7623673B2 | Cites | United States of America | Applicant |
| US7634477B2 | Cites | United States of America | Applicant |
| US7634772B2 | Cites | United States of America | Applicant |
| US7664367B2 | Cites | United States of America | Applicant |
| US7669189B1 | Cites | United States of America | Applicant |
| US7689825B2 | Cites | United States of America | Applicant |
| US7707564B2 | Cites | United States of America | Applicant |
| US7743407B2 | Cites | United States of America | Applicant |
| US7752442B2 | Cites | United States of America | Applicant |
| US7752511B2 | Cites | United States of America | Applicant |
| US7761503B2 | Cites | United States of America | Applicant |
| US7797748B2 | Cites | United States of America | Applicant |
| US7801827B2 | Cites | United States of America | Applicant |
| US7831047B2 | Cites | United States of America | Applicant |
| US7836299B2 | Cites | United States of America | Applicant |
| US7840961B1 | Cites | United States of America | Applicant |
| US7950026B1 | Cites | United States of America | Applicant |
| US7970789B1 | Cites | United States of America | Applicant |
| US7971032B2 | Cites | United States of America | Applicant |
| US8010667B2 | Cites | United States of America | Applicant |
| US8065675B2 | Cites | United States of America | Applicant |
| US8069443B2 | Cites | United States of America | Applicant |
| US8219805B1 | Cites | United States of America | Applicant |
| US8230442B2 | Cites | United States of America | Search report |
| US8271944B2 | Cites | United States of America | Search report |
| US8375140B2 | Cites | United States of America | Applicant |
| US8387006B1 | Cites | United States of America | Applicant |
| US8429248B1 | Cites | United States of America | Applicant |
| US8434093B2 | Cites | United States of America | Applicant |
| US8468175B2 | Cites | United States of America | Applicant |
| US8489513B2 | Cites | United States of America | Applicant |
39 members in 1 office
Priority claims6
| Document | Office | Kind | Date |
|---|---|---|---|
| 36137310 | United States of America | P | |
| 36137310 | United States of America | P | |
| 87608210 | United States of America | A | |
| 61361373 | – | – | – |
| US20100361373P | – | – | – |
| US20100876082 | – | – | – |
Members39
| Document | Office | Kind | |
|---|---|---|---|
| US2011191772A1 | United States of America | A1 | |
| US2012005237A1 | United States of America | A1 | |
| US2012005244A1 | United States of America | A1 | |
| US2012005246A1 | United States of America | A1 | |
| US2012005309A1 | United States of America | A1 | |
| US2012005310A1 | United States of America | A1 | |
| US2012005674A1 | United States of America | A1 | |
| US2012203807A1 | United States of America | A1 | |
| US2012203808A1 | United States of America | A1 | |
| US8468175B2 | United States of America | B2 | |
| US2013282764A1 | United States of America | A1 | |
| US8626806B2 | United States of America | B2 | |
| US8762495B2 | United States of America | B2 | |
| US8769051B2 | United States of America | B2 | |
| US8782106B2 | United States of America | B2 | |
| US2014222904A1 | United States of America | A1 | |
| US2014317243A1 | United States of America | A1 | |
| US8914427B2 | United States of America | B2 | |
| US2015271262A1 | United States of America | A1 | |
| US9208169B2 | United States of America | B2 | |
| US9218359B2This record | United States of America | B2 | |
| US9229748B2 | United States of America | B2 | |
| US2016004448A1 | United States of America | A1 | |
| US2016026496A1 | United States of America | A1 | |
| US2016026509A1 | United States of America | A1 | |
| US9251167B2 | United States of America | B2 | |
| US2016085570A9 | United States of America | A9 | |
| US2016210309A1 | United States of America | A1 | |
| US9483296B2 | United States of America | B2 | |
| US2016373526A1 | United States of America | A1 | |
| US9569286B2 | United States of America | B2 | |
| US2017083557A1 | United States of America | A1 | |
| US9639387B2 | United States of America | B2 | |
| US9984113B2 | United States of America | B2 | |
| US10108660B2 | United States of America | B2 | |
| US10114855B2 | United States of America | B2 | |
| US10158707B2 | United States of America | B2 | |
| US11196805B2 | United States of America | B2 | |
| US11321148B2 | United States of America | B2 |
111 transactions on the USPTO file
Allowed after 1 non-final rejection and 4 RCEs.
- Non-final rejections
- 1
- Final rejections
- 0
- RCEs
- 4
- Appeals
- 0
Over time
Point at a mark for the transactionTransactions
| Event | Code | |
|---|---|---|
| Payment of Maintenance Fee, 8th Yr, Small EntityM2552 | M2552 | |
| Payment of Maintenance Fee, 4th Yr, Small EntityM2551 | M2551 | |
| Recordation of Patent Grant MailedPGM/ | PGM/ | |
| Patent Issue Date Used in PTA CalculationAllowedPTAC | PTAC | |
| Email NotificationEML_NTR | EML_NTR | |
| Issue Notification MailedAllowedWPIR | WPIR | |
| Dispatch to FDCD1935 | D1935 | |
| Email NotificationEML_NTR | EML_NTR | |
| Mailing Corrected Notice of AllowabilityMCNOA | MCNOA | |
| Corrected Notice of AllowabilityCNOA | CNOA | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Pubs Case Remand to TCPUBTC | PUBTC | |
| Workflow - Request for RCE - FinishFRCE | FRCE | |
| Workflow - Request for RCE - FinishFRCE | FRCE | |
| Electronic Information Disclosure StatementEIDS. | EIDS. | |
| Quick Path IDS RequestQPREQ | QPREQ | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Mail-Record Petition Decision of Granted to Withdraw from Issue - with assigned Patent NO.MP015 | MP015 | |
| Record Petition Decision of Granted to Withdraw from Issue - with assigned Patent NO.P015 | P015 | |
| Withdrawal Patent Case from IssueWFIS | WFIS | |
| Petition EnteredPET. | PET. | |
| Workflow - Request for RCE - BeginBRCE | BRCE | |
| Email NotificationEML_NTR | EML_NTR | |
| Issue Notification MailedAllowedWPIR | WPIR | |
| Dispatch to FDCD1935 | D1935 | |
| Application Is Considered Ready for IssuePILS | PILS | |
| Issue Fee Payment VerifiedN084 | N084 | |
| Issue Fee Payment VerifiedN084 | N084 | |
| Issue Fee Payment ReceivedIFEE | IFEE | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Disposal for a RCE / CPA / R129AbandonedABN9 | ABN9 | |
| Request for Continued Examination (RCE)RCEX | RCEX | |
| Electronic Information Disclosure StatementEIDS. | EIDS. | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Workflow - Request for RCE - BeginBRCE | BRCE | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Disposal for a RCE / CPA / R129AbandonedABN9 | ABN9 | |
| Electronic Information Disclosure StatementEIDS. | EIDS. | |
| Reference capture on IDSRCAP | RCAP | |
| Request for Continued Examination (RCE)RCEX | RCEX | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Workflow - Request for RCE - BeginBRCE | BRCE | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Disposal for a RCE / CPA / R129AbandonedABN9 | ABN9 | |
| Request for Continued Examination (RCE)RCEX | RCEX | |
| Electronic Information Disclosure StatementEIDS. | EIDS. | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Workflow - Request for RCE - BeginBRCE | BRCE | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Disposal for a RCE / CPA / R129AbandonedABN9 | ABN9 | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Reference capture on IDSRCAP | RCAP | |
| Electronic Information Disclosure StatementEIDS. | EIDS. | |
| Request for Continued Examination (RCE)RCEX | RCEX | |
| Workflow - Request for RCE - BeginBRCE | BRCE | |
| Email NotificationEML_NTR | EML_NTR | |
| Filing Receipt - CorrectedFLRCPT.C | FLRCPT.C | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Examiner's Amendment CommunicationEX.A | EX.A | |
| Interview Summary - Examiner InitiatedEXIE | EXIE | |
| Date Forwarded to ExaminerFWDX | FWDX | |
| Information Disclosure Statement consideredIDSC | IDSC | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Response after Non-Final ActionA... | A... | |
| Request for Extension of Time - GrantedXT/G | XT/G | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Electronic ReviewELC_RVW | ELC_RVW | |
| Email NotificationEML_NTF | EML_NTF | |
| Mail Non-Final RejectionNon-final rejectionMCTNF | MCTNF | |
| Non-Final RejectionNon-final rejectionCTNF | CTNF | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Email NotificationEML_NTR | EML_NTR | |
| PG-Pub Issue NotificationPG-ISSUE | PG-ISSUE | |
| Email NotificationEML_NTR | EML_NTR | |
| Change in Power of Attorney (May Include Associate POA)PA.. | PA.. | |
| Application Dispatched from OIPEOIPE | OIPE |
6 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Maintenance fee paymentMAFP | MAFP | |
| Maintenance fee paymentMAFP | MAFP | |
| Information on status: patent grantGrantedPATENTED CASESTCF | STCF | |
| AssignmentAS | AS | |
| AssignmentAS | AS | |
| AssignmentAS | AS |
Numbers
- Publication
- 09218359
- Publication, DOCDB
- 9218359
- Publication, EPODOC
- US9218359
- Application
- 12876082
- Application, DOCDB
- 87608210
- Application, EPODOC
- US20100876082
Titles
- English
- Method and system for profiling virtual application resource utilization patterns by executing virtualized application
Patent term adjustment
- A delay
- +436 daysthe office missed an examination deadline
- B delay
- +420 dayspendency past three years
- Applicant delay
- −192 days
- Net adjustment
- 664 days
Classification
- CPC, 20
- G06F17/30233
- G06F9/45537
- H04L67/1085
- G06F16/13
- G06F16/40
- G06F9/445
- G06F16/188
- G06F16/2379
- G06F17/30017
- G06F16/9024
- G06F17/30958
- G06F2212/152
- H04L65/60
- H04L67/10
- G06F21/53
- G06F3/0619
- G06F3/064
- G06F9/466
- G06F11/3466
- G06F2009/45583
- IPC, 7
- G06F9 455
- G06F9 44
- G06F9 445
- G06F17 30
- G06F21 53
- H04L29 06
- H04L29 08
- USPC, 1
- 001001000