Pushlet IM Framework Thread Pool Protocol Adaptation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional Pushlet instant messaging servers experience slowed message delivery and limited protocol compatibility, leading to message accumulation and increased server load due to the use of a stack method and HTTP protocol, restricting their applicability.
Innovation Solution
A Pushlet instant messaging method utilizing a thread pool pattern in a Java-based web service framework that allows message transmission across various protocols, including HTTP, SOAP, and XML, enabling immediate message delivery and multi-threaded processing to handle multiple recipients simultaneously.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a stack method is used to push messages one at a time, then the server structure is simple, but the message delivery speed slows down and messages pile up
Solution Approach 1:
The patent divides the message pushing process into multiple independent threads, where each thread handles a specific recipient. This segmentation allows simultaneous message delivery to multiple clients, resolving the contradiction between simple structure and fast delivery speed.
Solution Approach 2:
The patent introduces a dynamic thread pool mechanism that creates and manages threads based on message receiving patterns. The system dynamically adjusts the number of active threads to match the load, enabling fast message delivery while maintaining manageable system complexity through dynamic resource allocation.
2Device complexity
If a single HTTP protocol is used for communication, then the server implementation is simple, but the applicability to different client devices is limited
Solution Approach 1:
The patent implements a universal communication interface that supports multiple protocols (HTTP, SOAP, XML) through a unified architecture. This allows the same server to serve diverse client devices using different protocols, enhancing adaptability without significantly increasing implementation complexity.
Solution Approach 2:
The patent introduces a protocol adapter pattern that acts as an intermediary between the server and different communication protocols. This mediator layer translates between various protocols (HTTP, SOAP, XML), enabling the server to communicate with diverse client devices while keeping the core server implementation relatively simple.
3Stress or pressure
If messages are pushed sequentially one at a time, then the server load per operation is low, but the total throughput is reduced
Solution Approach 1:
The patent segments the message pushing task into multiple parallel threads, each handling a different recipient. This allows the server to distribute the load across multiple threads, maintaining low per-thread stress while achieving high overall throughput through parallel processing.
Solution Approach 2:
The patent implements continuous message pushing through a thread pool that maintains active connections and continuously delivers messages to multiple recipients simultaneously. This continuous operation eliminates idle time between messages, maximizing throughput while keeping individual operation loads manageable through distribution.
Data Source
AI summary
A Pushlet IM method for pushing a message from a first client device to a second client device includes the steps of: providing a Java-based web service; receiving a message from the first client device, the message including information of a recipient entity; verifying identity of a sender entity who intends to send the message to the recipient entity using the first client device; and creating a thread according to the information of the recipient entity for pushing the message to the second client device that is associated with the recipient entity.

