Persistent Worker Processes Outside Virtual Environments
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing models that execute worker processes within virtual environments, such as the 'web workers' model, face disadvantages like termination upon application or virtual environment shutdown, limiting their persistence and resilience, especially during device events like reboots.
Innovation Solution
Executing worker processes outside the virtual environment, allowing them to persist independently of the application and virtual environment, and notifying the application upon completion of tasks or device events, thereby decoupling their life cycles.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If worker processes are executed within the virtual environment, then security and compatibility are improved, but persistence and resiliency deteriorate due to termination upon application or environment shutdown
Solution Approach 1:
The system segments the worker process execution from the application lifecycle by introducing a persistent process host that independently manages worker processes outside the virtual environment. This separation allows worker processes to continue running even when the application or virtual environment terminates, resolving the contradiction between security (maintained through controlled interfaces) and persistence (achieved through external hosting).
Solution Approach 2:
A persistent process host acts as an intermediary between the application and the worker processes. This mediator maintains worker processes after application termination and facilitates communication between completed worker processes and restarted applications, thereby enabling persistence without requiring the worker processes to remain coupled to the original application lifecycle.
2Productivity
If worker processes are terminated with the application, then resource management is simplified, but background processing capability deteriorates due to loss of persistent computation
Solution Approach 1:
The system performs preliminary action by maintaining worker processes in a persistent state before application restart. Worker processes continue executing background tasks and waiting for events during the period when the application is terminated, eliminating the need to restart and reinitialize computation upon application relaunch, thus preserving productivity without permanent resource allocation.
Solution Approach 2:
The persistent process host ensures continuity of useful action by keeping worker processes alive and operational between application sessions. Background processing continues uninterrupted, and worker processes can detect and respond to device events even when the originating application is not running, maintaining productive computation without continuous application execution.
3Reliability
If worker processes execute within the same process as the application, then communication is simplified, but resiliency deteriorates due to cascading failures from process faults or reboots
Solution Approach 1:
The system extracts worker processes from the application process context and places them in a separate persistent process host. This extraction isolates worker processes from application-specific failures, ensuring that faults in the application or its virtual environment do not cascade to terminate worker processes. The separated architecture maintains resiliency while managing complexity through standardized interfaces.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
In the field of computing, many scenarios involve the execution of an application within a virtual environment (e.g., web applications executing within a web browser). In order to perform background processing, such applications may invoke worker processes within the virtual environment; however, this configuration couples the life cycle of worker processes to the life cycle of the application and/or virtual environment. Presented herein are techniques for executing worker processes outside of the virtual environment and independently of the life cycle of the application, such that background computation may persist after the application and/or virtual environment are terminated and even after a computing environment restart, and for notifying the application upon the worker process achieving an execution event (e.g., detecting device events even while the application is not executing). Such techniques may heighten the resiliency and persistence of worker processes and expand the capabilities of applications executing within virtual environments.