Web Browser Background Processing via Worker Threads
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Web-based graphical user interfaces (GUIs) often become unresponsive when user interactions trigger computations, as they are executed by a single thread, preventing interaction with other graphical objects until the computation is complete, leading to a frozen GUI experience.
Innovation Solution
Executing client instructions in worker threads separate from the primary thread that implements the web-based GUI, allowing these threads to process background tasks while the primary thread remains responsive to user interactions, using data structures for temporary data and outcomes to update graphical objects dynamically.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If client instructions are executed by the primary thread that implements the web-based GUI, then computation can be performed, but the GUI becomes unresponsive and frozen during the computation
Solution Approach 1:
The patent divides the execution of client instructions into two separate threads: the primary thread that handles GUI rendering and user interactions, and worker threads that execute computation-intensive client instructions. This segmentation allows the GUI to remain responsive while computations are performed in the background, resolving the contradiction between productivity and ease of operation.
2Reliability
If the primary thread performs computation in response to user instructions, then the computation is completed, but user interaction with other graphical objects is blocked
Solution Approach 1:
The patent segments the thread execution model into a primary thread dedicated to GUI operations and separate worker threads for computation. This allows the primary thread to maintain reliability for computation completion while worker threads handle the actual processing, ensuring user interaction capability is not blocked.
3Ease of operation
If worker threads are used for background processing, then GUI responsiveness is maintained, but thread management complexity increases
Solution Approach 1:
The patent introduces an intermediary mechanism (the thread pool manager and task queue system) that handles the complexity of worker thread management. This intermediary layer abstracts the complex thread management details from the application code, allowing developers to simply submit tasks for background execution while the system manages the worker threads automatically.
Data Source
AI summary
A system for executing a software program comprises: a display device for displaying a web based GUI of the software program; and a hardware processor adapted for executing in a web browser a code comprising: executing, in a worker thread that is not a primary thread executing code implementing the web based GUI, a client instruction identified in the primary thread for background processing; while the worker thread executes: displaying in a graphical object of the web based GUI data retrieved from a data structure associated with an outcome of executing the client instruction, where the data structure contains temporary data; and modifying another graphical object of the web based GUI in response to a user instruction received by a user selecting a selectable object of the web based GUI; and modifying the graphical object of the web based GUI when the contents of data structure is modified.


