Message queue design and realization method
A technology of message queue and implementation method, applied in the field of distributed cluster storage system, can solve problems such as affecting the operation efficiency of cluster file system, untimely scheduling of high-priority messages, and not being able to process them quickly, so as to improve message processing speed, The effect of optimizing scheduling strategy and improving flexibility
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0019] 1. Message queue
[0020] When a message enters the message queue, the message needs to have a corresponding priority and a quota used (generally, the length of the message is used). According to the priority of the message, first find the sub-message queue of the corresponding priority, if there is no sub-message queue of the corresponding priority, create a sub-message queue, and calculate the sum of all sub-message queues. Then put the message into the sub-message queue of the corresponding priority.
[0021] Second, the message out of the team
[0022] When a message needs to be dispatched out of the queue, first traverse all sub-message queues
[0023] (1) If there is a sub-message queue with enough quota for dequeuing messages, it will directly dequeue the message and consume the quota of the sub-message queue, and calculate the quota that should be compensated for other sub-message pairs according to the quota of the message , the calculation formula is (prior...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 