Method and system for processing asynchronous task

A technology of asynchronous tasks and tasks, applied in the direction of multi-programming devices, etc., can solve problems such as insufficient database connections, system crashes, slow processing, etc., and achieve the effects of improving processing efficiency, increasing reliability, and reducing the number of connections

CN103345423AActive Publication Date: 2013-10-09重庆天极云服科技有限公司
5 Cites 30 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2013-10-09

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
Patent Text Reader

Abstract

The invention provides a method and system for processing an asynchronous task. The method and system are helpful to improve the performance of an asynchronous task processing system and meanwhile guarantee the reliability. The method comprises the steps that a gateway inserts just received task data to a task data queue of a Redis according to an algorithm; an asynchronous task processing program acquires the task data from a Redis queue according to a scheduling algorithm, and then relevant task processing is carried out according to the acquired task data; under the condition that the Redis is abnormal, a database task list is used for replacing the Redis to conduct task processing.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to a method and system for processing asynchronous tasks. Background technique

[0002] In the logistics and distribution industry, distribution personnel usually use personal digital assistants (PDAs) to perform various distribution tasks through wireless networks, such as receiving goods, inspecting goods, and delivering them properly. For large-scale logistics and distribution systems, there are scenarios where a large number of distribution personnel operate the system at the same time, resulting in large concurrent system calls. For complex business logic and slow background calculations, there are many problems in using direct synchronous calls. Therefore, synchronous calls are generally used. Convert to asynchronous call method to solve.

[0003] Not only the logistics distribution system, but also for general Internet products, in the case of large concurrency, asynchronous processing solutions will also be adopted, and t...

Examples

Embodiment Construction

[0020] 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.

[0021] figure 1 is a schematic diagram of basic steps of a method for processing asynchronous tasks according to an embodiment of the present invention. like figure 1 As shown, the method mainly includes step S11 and step S12.

[0022] Step S11: The gateway inserts the received task data into the task data queue in Redis. The task data insertion here is performed accor...