Distributed task scheduling method and system

A technology of distributed tasks and tasks, applied in the computer field, can solve the problems of difficult to define expiration time, how long it is difficult to define, and improper setting of expiration time, to achieve the effect of overcoming lock failure and overcoming strong dependence on zookeeper

Pending Publication Date: 2020-09-15
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Under this scheme, the general solution to the problem of failure to release the lock is to set the expiration time of the Redis key, so that even if the release of the lock fails, the lock can be released when it expires, but it is not easy to define how long the key expiration time is set to
[0005] (1) In the Redis scheme, improper setting of the key expiration time will lead to the problem of lock failure, but how long is appropriate is not easy to define
[0006] (2) The Zookeeper solution relies heavily on Zookeeper, so the reliability of the distributed system cannot be guaranteed, and the deployment of the Zookeeper solution is relatively troublesome
[0007] Therefore, the problem of lock failure in the distributed system has not been well solved under the current solution, which makes it difficult to guarantee the reliability of the distributed system

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
  • Distributed task scheduling method and system
  • Distributed task scheduling method and system
  • Distributed task scheduling method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0085] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0086] figure 1 is a schematic diagram of the main flow of the distributed task scheduling method according to the embodiment of the present invention, such as figure 1 As shown, the distributed task scheduling method according to the embodiment of the present invention includes steps S101, S102, S103, S104, S105 and S106.

[0087] Step S101: Receive one or more query re...

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 distributed task scheduling method and system, and relates to the technical field of computers. One specific embodiment of the method comprises the steps of receiving one ormore query requests of one or more servers for task locking objects of a task; querying the task locking object in a database; in response to the queried task locking object, sending a record to the one or more servers, the record comprising a task locking state and a specific version number; receiving first update data of a first server for the task, wherein the first update data comprises a first version number; in response to determining that the first version number is the same as the specific version number, executing a first update on the database; and when an error event occurs in a second server in the one or more servers, enabling other servers in the one or more servers to trigger a monitoring event. According to the embodiment, the reliability of the distributed system is improved, and the scheme deployment complexity is reduced.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and system for distributed task scheduling. Background technique [0002] There are many existing distributed task scheduling schemes, and the common one is to obtain distributed locks through Redis scheme or Zookeeper scheme to solve the scheduling problem of multi-host multi-task processing. Distributed locks are exclusive. Only one process can acquire the lock and perform tasks at the same time, and other processes cannot acquire it at the same time. When the task is completed, the process releases the lock, but the computer is not 100% reliable, so there will be a problem of failure to release the lock. [0003] Obtaining distributed locks through the Redis scheme is currently the most used technology. The basic principle is that multiple threads acquire locks through the atomic operation of the Redis scheme, and only one thread will acquire the lock. Und...

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 BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products