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

Timed task management method and device under distributed cluster based on Redis

A distributed cluster, timed task technology, applied in the field of timed task processing, can solve problems such as repeated task execution, achieve high availability, save manpower and time, and reduce the number of restarts.

Pending Publication Date: 2020-01-31
上海思询信息科技有限公司
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With the growth of business volume, the program is usually deployed in cluster mode, and there will be a large number of scheduled tasks to run. For any change of scheduled tasks, it is necessary to modify the scheduled task information in the configuration of each cluster. The application in the entire cluster The program needs to be restarted, and each application will read the timed task, and there will be a disadvantage that the task will be executed repeatedly

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 method and device under distributed cluster based on Redis
  • Timed task management method and device under distributed cluster based on Redis
  • Timed task management method and device under distributed cluster based on Redis

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment approach

[0066] In another implementation of the present invention, the task monitoring program design uses the main task monitoring program and the standby task monitoring program to continuously detect the health status of the primary node through keepAlive. keepAlive is a mechanism that can detect dead connections in TCP, such as The service of the task listener on the main task listener machine or the main task listener no longer exists, then the specific implementation method of starting the standby task listener is as follows:

[0067] 1. Start the main task monitor program, and the backup task monitor program does not start;

[0068] 2. Deploy keepAlive, set the connection frequency, and configure the information of the main task listener in keepAlive;

[0069] 3. KeepAlive starts, and sends data to the main task monitor at regular intervals. If the data is available, the main task monitor is alive;

[0070] 4. If the data is unreachable, continue to send and after a timeout, c...

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 provides a timed task management method and device under a distributed cluster based on Redis, being applied to the technical field of timing task processing. The timed task management method comprises the steps that at least one application program sends a timed task; a task monitoring program acquires timed task information, processes a timed task and a timer according to the typeof the timed task, and writes the timed task into a redis task execution queue when the timer of the task monitoring program is triggered; and the application program monitors the redis task executionqueue, and reads and consumes the timed task in the redis task execution queue according to the preemption characteristic of the queue. The timed task management method aims to read all timed task information through the task monitoring program and start timers respectively, and puts timed tasks into a redis task execution queue to wait for being consumed when the timed tasks are triggered, and application programs in a cluster can monitor the redis task execution queue, and the tasks are executed when the tasks are consumed.

Description

technical field [0001] The invention relates to the technical field of timing task processing, in particular to a method and device for managing timing tasks under a Redis-based distributed cluster. Background technique [0002] Timed task system is a business system that executes tasks regularly or periodically according to a specified period policy. [0003] The traditional task setting is through the configuration agreement. When the application starts, the configuration will be read, and the timer will be started according to the scheduled task information in the configuration. After the scheduled task in the configuration is changed, the application needs to be restarted to read the scheduled task information again. With the growth of business volume, the program is usually deployed in cluster mode, and there will be a large number of scheduled tasks to run. For any change of scheduled tasks, it is necessary to modify the scheduled task information in the configuration ...

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/48
CPCG06F9/4881
Inventor 耿洪杰王颖康谢屈强张雷
Owner 上海思询信息科技有限公司
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