Distributed task polling method based on delay queue

A distributed task and queue technology, applied in the field of distributed task scheduling, to achieve simple elastic scaling, achieve elastic scaling, and reduce load pressure.

Inactive Publication Date: 2019-09-20
SICHUAN XW BANK CO LTD
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of the above problems, the present invention provides a method of distributed task polling based on a delay queue, so that the execution interval of each task is equal, the processing timing of the task is relatively fair, and in the case of not using the data grouping method, Solve the problem of repeated data reading and reduce the complexity of the distributed scheduler

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 polling method based on delay queue
  • Distributed task polling method based on delay queue

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0036] Take the payment scenario as an example:

[0037] Scenario description: When the payment system performs a payment transaction, it will return the transaction result in the payment process. For this result, the caller needs to periodically query the final payment result through the transaction result query interface provided by the payment system.

[0038] The application of the above payment scenarios is realized through the method of distributed task polling based on the delay queue of the present invention:

[0039] A. According to the message expiration and dead letter delivery mechanism of the RabbitMQ protocol, establish a payment delay queue of the MQ queue type, and set the delay interval parameters of the payment delay queue.

[0040] The payment queue configuration of the MQ queue type is as follows:

[0041] Exchange: direct-exchange

[0042] Name: PAYMENT_PAY_QUEUE

[0043] B. Establish a payment polling queue for receiving payment polling requests in the...

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 relates to a distributed task polling method based on a delay queue, which comprises the following steps of A, establishing a service delay queue according to a message expiration and dead message delivery mechanism of a message queue; B, establishing a task polling queue for receiving the task polling request in the micro-service; C, converting the service data needing to be polled into a queue message, putting the queue message into the service delay queue, and automatically putting the service data needing to be polled into the task polling queue after the appointed delay time is over; and D, processing the service data in the task polling queue by the system, and judging whether the service data exits the task polling queue according to a processing result. According to the method, the execution intervals of the tasks can be equal, the processing time of the tasks is relatively fair, the problem of the repeated data reading is solved under the condition that a data grouping mode is not adopted, the complexity of a distributed scheduling program is reduced, and meanwhile the good expansibility is achieved.

Description

technical field [0001] The invention relates to a method for dispatching distributed tasks, in particular to a method for polling distributed tasks based on delay queues. Background technique [0002] Microservice architecture is a new technology for deploying applications and services in the cloud. The microservice architecture model has gradually occupied a mainstream position in the field of Internet distributed technology. After splitting the application modules into microservices, each microservice must be stateless when deployed in high availability (High Availability), so as to facilitate expansion. In addition to being stateless, the scheduling job program also needs to solve the problem of data duplication when multiple programs extract data of a certain state from a database at the same time when executing a certain job when doing high-availability distributed deployment. question. The commonly used task scheduling mechanism is no longer suitable for distributed ...

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 SICHUAN XW BANK 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