Master-Slave Execution Model for Legacy Software Parallel Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Legacy application software struggles with thread safety and deadlocks when utilizing multi-threading, making it difficult to scale and debug, and requires a complete rewrite to leverage multi-processing across distributed networks, which is time-consuming and economically unviable.
Innovation Solution
Modifying existing software to implement a master-slave execution model using multiple instances of the application across a network, where computational transactions are distributed efficiently through standard communication protocols, allowing for parallel processing without shared memory, thus avoiding thread safety issues and enabling seamless scaling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If multi-threading is used to utilize more than one processor in a single computer system, then execution speed is improved, but thread safety issues and deadlocks occur making the software difficult to maintain and debug
Solution Approach 1:
The patent segments the monolithic application into multiple independent worker processes that each handle specific computational tasks. Instead of using threads within a single process that share memory and require thread safety, the application is divided into separate processes that communicate through well-defined interfaces, eliminating thread safety issues while maintaining parallel execution capability
Solution Approach 2:
The patent introduces a coordinator process as an intermediary that manages the distribution of work to worker processes and collects results. This mediator pattern allows for simplified communication and coordination between parallel execution units without the complexity of thread synchronization, making the system easier to maintain and debug
2Productivity
If multi-threading is used to speed up execution, then productivity is improved, but the number of threads is limited by the number of processors on a single machine
Solution Approach 1:
The patent transitions from single-dimension parallelism (multiple threads on one machine) to multi-dimensional parallelism by distributing worker processes across multiple machines in a network. This dimensional expansion allows the system to scale from local multi-core processors to distributed clusters, dramatically increasing computational throughput while maintaining the same architectural pattern
Solution Approach 2:
The patent creates a universal architecture where the same application code can run as either a coordinator or a worker process, and the system can scale from single-machine multi-threading to multi-machine distributed processing without requiring different codebases. This multi-functional design enables seamless scaling across different hardware configurations
3Adaptability or versatility
If legacy application software is completely rewritten to utilize multi-processing across distributed networks, then adaptability to distributed systems is improved, but time and cost resources are excessively consumed
Solution Approach 1:
The patent prepares the legacy application for distributed processing by introducing configuration files and environment variables that define worker behavior and communication protocols. These preliminary modifications allow the existing application logic to be reused unchanged while enabling future scaling to distributed systems without requiring a complete rewrite
Solution Approach 2:
Instead of rewriting the entire application to support distributed processing, the patent inverts the approach by making the application thread-safe and processable as individual units, then using those same units as worker processes in a distributed architecture. This inversion allows legacy code to be leveraged directly in the new architecture with minimal modifications
Data Source
AI summary
In one embodiment of the invention, a method is disclosed for modifying a pre-existing application program for multi-processing and/or distributed parallel processing. The method includes searching an application program for a computational loop; analyzing the computational loop to determine independence of the computational transactions of the computational loop; and replacing the computational loop with master code and slave code to provide master-slave execution of the computational loop in response to analyzing the computational loop to determine independence of the computational transactions of the computational loop. Multiple instances of the modified application program are executed to provide multi-processing and/or distributed parallel processing.


