Task Scheduling via Message Queue Mediator for Service Servers
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In highly concurrent environments, conventional multi-process modes for service servers require significant maintenance overhead when adding or deleting servers, as they necessitate reconfiguration of inter-process communication protocols.
Innovation Solution
A method and apparatus for scheduling concurrent tasks that involve receiving service requests, encapsulating them into task objects, allocating these objects to processing threads, which select and send them to service servers for processing, and generating responses, thereby reducing maintenance overheads by simplifying the process of adding or deleting service servers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multi-process mode is used for concurrent task processing, then processing capability is improved, but maintenance overhead increases when adding or deleting service servers
Solution Approach 1:
The patent introduces a message queue as an intermediary component between service servers and clients. Service servers publish tasks to the message queue and subscribe to results, while a dedicated processing thread handles message retrieval, task distribution, and result collection. This mediator architecture allows service servers to be added or removed without requiring reconfiguration of inter-process communication protocols, as the message queue abstracts and standardizes all communication interfaces.
Solution Approach 2:
The patent segments the concurrent processing system into independent functional modules: service servers that generate tasks, a message queue that buffers and routes messages, and processing threads that execute tasks. This segmentation allows each component to operate independently with well-defined interfaces, reducing the complexity of system-wide reconfiguration when adding or removing service servers. Each server only needs to interact with the message queue through standardized publish/subscribe operations.
2Adaptability or versatility
If service servers are added frequently to meet service requirements, then service capacity is improved, but protocol reconfiguration time increases
Solution Approach 1:
The patent establishes the message queue infrastructure and communication protocols in advance, before any service servers are added or removed. The standardized publish/subscribe message format and routing mechanisms are pre-configured, creating a stable communication framework that accommodates dynamic server additions without requiring protocol reconfiguration. Service servers can be added to the existing infrastructure immediately, using the pre-established communication channels.
Solution Approach 2:
The patent creates a dynamic system where service servers can be added or removed at runtime without system reconfiguration. The message queue architecture supports dynamic registration and deregistration of servers, with the processing thread automatically adapting to changes in the number of active servers. This dynamic capability allows the system to scale flexibly in response to changing service requirements while maintaining consistent communication protocols throughout the server lifecycle.
Data Source
AI summary
A method for scheduling a concurrent task includes: receiving an uploaded service request, and encapsulating the service request into a task object; acquiring a processing thread, and allocating the task object to the processing thread, so that the processing thread selects a service server and sends the task object to the selected service server for processing; and receiving, by using the processing thread, a processing result returned by the service server, generating a response according to the processing result, and returning the response.


