Preloaded Web Engine in Node.js for Faster Resource Loading
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing web engine loading process in Node.js-based systems requires significant time and resource expenditure due to the need to start Node.js every time a web page is loaded, leading to inefficiencies in system resource usage and page loading times.
Innovation Solution
A method and system where a web engine is preloaded onto a dynamic language runtime platform, such as Node.js, allowing a first thread to send a resource loading request to a second thread within the same process, and based on the received instruction and preloaded resources, the web engine is merged with the dynamic language runtime platform for efficient resource loading.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If Node.js is started every time a web page is loaded, then the web engine can execute web applications, but the system experiences longer launch time and higher resource consumption
Solution Approach 1:
The patent applies preliminary action by pre-loading the web engine into the Node.js process before web page loading is initiated. The web engine is initialized and ready in advance, so when a web page needs to be loaded, the engine is already available, eliminating the need to start Node.js repeatedly and reducing launch time.
Solution Approach 2:
The patent merges the web engine with the Node.js runtime process by loading the web engine as a module within the existing Node.js process. This integration allows the web engine to share the same memory space and execution context as Node.js, enabling efficient resource utilization without requiring separate process launches.
2Reliability
If Node.js is started every time a web page is loaded, then the web engine can execute web applications, but system resource consumption increases
Solution Approach 1:
The patent makes the Node.js process universal by enabling it to handle multiple web page loading tasks sequentially after the web engine is pre-loaded. Instead of creating a new process for each web page, the same Node.js process with the integrated web engine can serve multiple web pages, reducing overall system resource consumption.
Solution Approach 2:
The patent recovers system resources by maintaining the web engine in memory across multiple web page loading operations. Rather than allocating and deallocating engine resources repeatedly, the engine remains active and reusable, allowing the system to recover the overhead costs of engine initialization for subsequent operations.
3Productivity
If the web engine is preloaded onto the dynamic language runtime platform, then resource loading efficiency improves, but the process requires access to system-provided capabilities
Solution Approach 1:
The patent uses an intermediary approach by implementing a bridge layer between the pre-loaded web engine and the Node.js runtime platform. This intermediary enables the web engine to access system-provided capabilities through standardized interfaces while maintaining isolation and managing complexity, allowing efficient resource loading without direct exposure to underlying system complexities.
Data Source
AI summary
Loading resources is disclosed including sending, using a first thread, a resource loading request to a second thread, the resource loading request including a request for a resource, the first thread and the second thread being located in one process; and the first thread running on a dynamic language runtime platform, receiving, using the first thread, an instruction sent back by the second thread in response to the resource loading request, and based on the instruction and the resource preloaded by the process, loading, using the first thread, the resource included in the resource loading request, the resource being preloaded by the process comprises a web engine.


