Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Timed task management system based on message queue and allocation method

A technology for timed tasks and message queues, which is applied in electrical digital data processing, inter-program communication, instruments, etc., can solve the problems of resource consumption and tedious business expansion, and achieve the effect of ensuring asynchrony

Active Publication Date: 2019-12-03
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF12 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Timing tasks are indispensable in many Internet projects. Traditional timing task management is implemented by starting threads inside the program. This management method consumes resources and is cumbersome when expanding business, and it does not natively support distributed , it can barely be used in a distributed system through a more complicated design

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Timed task management system based on message queue and allocation method
  • Timed task management system based on message queue and allocation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] The timing task management system based on the message queue of the present invention includes an executor, a message queue, a node and a database.

[0041] There are many kinds of executors in the system, at least one of each kind of executor, and the executor is a process created in the corresponding program, which is used for registration, modification, deletion and execution of timed tasks.

[0042] There are multiple message queues, and each message queue corresponds to a kind of executor, which is used to transmit the scheduled tasks to the corresponding executors, and the message queue supports selective random distribution of scheduled tasks or sequential distribution of scheduled tasks.

[0043] There are multiple nodes. The node is a component designed through decentralization. The timing task allocation algorithm is configured in the node, and the timing task is allocated to the message queue through this algorithm.

[0044] The principle of the allocation al...

Embodiment 2

[0052] The message queue-based timed task allocation method of the present invention is applied to the message queue-based timed task system disclosed in Embodiment 1. The allocation method includes the following steps:

[0053] S100, regularly accessing the node table through the nodes, judging whether each node in the node table is a dead node or a living node, marking each dead node, and counting the number of all living nodes;

[0054] S200. Mark and erase the scheduled task corresponding to the dead node, and the scheduled task corresponding to the dead node becomes an unowned scheduled task;

[0055] S300. Based on the number of scheduled tasks and the number of surviving nodes, re-allocate the scheduled tasks for the surviving nodes. When re-assigning the scheduled tasks, the number of scheduled tasks corresponding to each surviving node is:

[0056] The number of scheduled tasks to be allocated = the number of all scheduled tasks / the number of all surviving nodes.

...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a timed task management system based on a message queue and an allocation method, belongs to the field of timed task allocation, and aims to solve the technical problem of howto manage and allocate timed tasks based on the message queue, and the system comprises an actuator, the message queue, nodes and a database. The distribution method comprises the following steps: periodically accessing a node table through nodes, judging whether each node in the node table is a dead node or a survival node, marking each dead node, and counting the number of all survival nodes; performing mark erasing on the timing task corresponding to the dead node, wherein the timing task corresponding to the dead node is changed into a master-free timing task; based on the number of the timing tasks and the number of the survival nodes, reallocating the timing tasks to the survival nodes, and when the timing tasks are reallocated, the number of the timing tasks needing to be allocatedcorresponding to each survival node is that the number of the timing tasks needing to be allocated is equal to the number of all the timing tasks / the number of all the survival nodes.

Description

technical field [0001] The invention relates to the field of timing task allocation, in particular to a message queue-based timing task management system and allocation method. Background technique [0002] Timing tasks are indispensable in many Internet projects. Traditional timing task management is implemented by starting threads inside the program. This management method consumes resources and is cumbersome when expanding business, and it does not natively support distributed , it can barely be used in a distributed system through a more complicated design. [0003] Now the open source timing task management platform in the industry adopts a complex design to ensure its scalability, asynchrony, peak-shaving capability, idempotency, etc., and these features can be fully realized through message queues. Message queuing is already a mature technology in the industry. There are many open source technologies that can be used, and its performance is stable, and its usability ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/546
Inventor 王大帅邵士雨于昊高传集
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products