Concurrent Stack for Parallel Message Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional group communication protocols process messages sequentially in a First In First Out (FIFO) order, leading to bottlenecks as messages from different senders must wait for their turn to be processed, which can result in inefficiencies in message handling.
Innovation Solution
Implementing a concurrent stack within the transport protocol that allows each message to be handled by a separate thread, forming channels for each sender to process messages in parallel, utilizing thread pools to manage message processing and reduce wait times.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If messages are processed sequentially in a single queue by one thread, then message processing order is maintained (FIFO), but processing speed and throughput deteriorate due to bottlenecks
Solution Approach 1:
The single message queue is segmented into multiple concurrent stacks, one for each sender. Each stack is processed by a separate thread, allowing parallel message processing while maintaining individual FIFO order within each stack. This segmentation resolves the bottleneck by distributing the processing load across multiple threads while preserving message order guarantees.
Solution Approach 2:
The system transitions from a single-dimensional sequential processing model to a multi-dimensional parallel processing model. By introducing the dimension of concurrency with multiple threads processing different sender stacks simultaneously, the system achieves higher throughput while maintaining the original FIFO property within each sender's message stream.
2Productivity
If multiple threads process messages from different senders in parallel, then processing speed increases, but message order management becomes more complex
Solution Approach 1:
Messages from different senders are segmented into separate concurrent stacks, each maintained by its own thread. This ensures that messages from the same sender are processed in FIFO order within their dedicated stack, while different sender stacks can be processed in parallel without interfering with each other's ordering.
Solution Approach 2:
The concurrent stack structure acts as an intermediary between the parallel thread processing and the application layer. Each thread processes its assigned sender's messages independently through its own stack, and the application receives messages in the correct order from each sender without needing to manage complex synchronization across threads.
Data Source
AI summary
A method and apparatus for processing message is described. In one embodiment, an application programming interface is configured for receiving and sending messages. A building block layer is coupled to the application programming interface. A channel layer is coupled to the building block layer. A transport protocol stack is coupled to the channel layer for implementing properties specified by the channel layer. The transport protocol stack has a concurrent stack consisting of an out of band thread pool and a regular thread pool. The transport protocol layer is to process messages from each sender in parallel with the corresponding channel for each sender.


