Disclosed are systems and methods for execution of applications in a container. An exemplary method comprises receiving, by at least one computing device, a request to an application, wherein the application includes a set of instructions for processing the request, determining whether a state snapshot is available for the computing device, restoring state of the process from the state snapshot in a container on the computing device and processing the request based on the set of instructions by the process when the state snapshot is available, preparing at least one new process in the container on the computing device for processing the request, creating a new state snapshot for the application and processing the request based on the set of instructions by the new process when the state snapshot is not available, wherein creating the new state snapshot is performed after preparing the new process and before processing the request.
Legal claims defining the scope of protection, as filed with the USPTO.
2. The method of claim 1, wherein the state snapshot further includes states of one or more variables of the application, wherein the preparing the at least one new process further includes initializing the one or more variables of the application, and wherein the restoring the state of the at least one process from the state snapshot in the container further includes re-initializing at least one of the one or more variables of the application already initialized in the state snapshot.
3. The method of claim 1, wherein preparing the at least one new process further comprises loading to the process memory of the at least one new process a runtime environment for enabling execution of the set of instructions.
4. The method of claim 3, wherein preparing the at least one new process further comprises initializing the runtime environment, and wherein restoring the state of the at least one process further comprises re-initializing at least one variable of the runtime environment.
5. The method of claim 1, wherein preparing the at least one new process further comprises performing code preprocessing of the set of instructions.
6. The method of claim 1, wherein preparing the at least one new process further comprises initializing an interpreter configured to execute the set of instructions.
7. The method of claim 6, wherein initializing the interpreter further includes initializing one or more variables of the interpreter; and wherein restoring the state of the at least one process from the state snapshot includes re-initializing at least one of the one or more variables of the interpreter already initialized in the state snapshot.
8. The method of claim 1, wherein creating the new state snapshot is performed upon receiving the first request to the application, and wherein restoring from the state snapshot is performed upon receiving subsequent requests to the application.
9. The method of claim 1, wherein the state snapshot comprises an image file stored on a disk storage, and wherein restoring state of the at least one process from the state snapshot further comprises: writing a portion of data from the image file to at least one memory page of the process memory of the at least one process in the container on the at least one hardware node.
10. The method of claim 9, wherein writing a portion of data is performed only when the at least one process attempts to access information stored in the portion of data.
13. The system of claim 12, wherein the state snapshot further includes states of one or more variables of the application, wherein the preparing the at least one new process further includes initializing the one or more variables of the application, and wherein the restoring the state of the at least one process from the state snapshot in the container further includes re-initializing at least one of the one or more variables of the application already initialized in the state snapshot.
14. The system of claim 12, wherein preparing the at least one new process further comprises loading to the process memory of the at least one new process a runtime environment for enabling execution of the set of instructions.
15. The system of claim 14, wherein preparing the at least one new process further comprises initializing the runtime environment, and wherein restoring the state of the at least one process further comprises re-initializing at least one variable of the runtime environment.
16. The system of claim 12, wherein preparing the at least one new process further comprises initializing an interpreter configured to execute the set of instructions.
17. The system of claim 16, wherein initializing the interpreter further includes initializing one or more variables of the interpreter; and wherein restoring the state of the at least one process from the state snapshot includes re-initializing at least one of the one or more variables of the interpreter already initialized in the state snapshot.
18. The system of claim 12, wherein the state snapshot comprises an image file stored on a disk storage, and wherein restoring state of the at least one process from the state snapshot further comprises: writing a portion of data from the image file to at least one memory page of the process memory of the at least one process in the container on the at least one hardware node.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
January 3, 2022
January 30, 2024
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.