Unlock instant, AI-driven research and patent intelligence for your innovation.

Automatic retry device and method based on reflection mechanism

A reflection mechanism and automatic technology, applied in the direction of response error generation, redundant operation data error detection, instrumentation, etc., can solve problems such as task processing failure, inconsistency, data inconsistency between services, etc., to ensure stable, The effect of ensuring business data consistency

Pending Publication Date: 2020-07-03
山东汇贸电子口岸有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In some business scenarios, a reflection mechanism-based automatic retry device and method application notifies B application, and B application performs corresponding business processing, and a reflection mechanism-based automatic retry device and method application notification only notifies Once, the B application starts to process the task after receiving the processing notification, but sometimes the task processing fails due to reasons such as the network and application status, resulting in inconsistent results and inconsistent data between businesses

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
  • Automatic retry device and method based on reflection mechanism
  • Automatic retry device and method based on reflection mechanism
  • Automatic retry device and method based on reflection mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] see figure 1 , an automatic retry device based on reflection mechanism of the present invention, comprising:

[0042] The task information storage module is used for storing the failed task information in the database after the task fails;

[0043] Task automatic retry module, when the time condition is reached, the application fetches the task information from the database and starts retrying through the reflection mechanism;

[0044] In the task processing strategy module, when the task retry fails, the number of retries will be increased by 1, and the retry will continue when the time condition is reached again. When the number of retries reaches the threshold, the corresponding processing strategy will be adopted.

[0045] The task information includes the class of the task, the method of executing the task, the task parameters, the number of retries and other parameters required in practical applications.

[0046] The task information is divided into different qu...

Embodiment 2

[0059] An automatic retry method based on a reflection mechanism of the present invention is based on the device of Embodiment 1, and the steps are as follows:

[0060] Step S1, the application receives the task request and executes corresponding business processing;

[0061] Step S2. When the application processing task fails, store the failure information in the database;

[0062] Step S3, when the time condition is reached, the application fetches the task information from the database, and starts retrying through the reflection mechanism;

[0063] Step S4. When the task retry fails, add 1 to the number of retries, and continue to retry when the time condition is reached again. When the number of retries reaches the threshold, adopt a corresponding processing strategy:

[0064] A. Discard: discard the task without retrying;

[0065] B. Continue to retry: the task continues to be saved, and after the set time condition, continue to retry;

[0066] C. Notify operation and ma...

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 an automatic retry device and method based on a reflection mechanism, and belongs to the technical field of software development, and the device comprises a task information storage module which is used for storing failed task information into a database after a task fails; the automatic task retry module is used for extracting task information from the database by the application after a time condition is reached, and retry is started through a reflection mechanism; and the task processing strategy module is used for adding 1 to the number of retry times after the taskretry fails, continuing the retry when the time condition is reached again, and adopting a corresponding processing strategy after the number of retry times reaches a threshold value. According to thetask retry method and device, a task retry scheme can be provided for the applications, the applications can perform automatic retry after the task fails, when the number of times of retry reaches acertain set value, a corresponding disposal strategy can be executed, and the consistency of service data between the applications and the controllability of task processing are guaranteed. And the user can monitor the task processing condition of the application through the method, so that the stability of the service application is ensured.

Description

technical field [0001] The invention relates to the technical field of software development, in particular to an automatic retry device and method based on a reflection mechanism. Background technique [0002] Software application development has developed from the earlier monolithic architecture, SO, an automatic retry device and method service system based on a reflection mechanism, to the current microservice architecture. Each microservice application is independent of each other, realizing loose coupling in structure , the business is unified into a system by the Restful architectural style. Businesses that are processed asynchronously between applications will be implemented through MQ, interfaces, etc. [0003] In some business scenarios, a reflection mechanism-based automatic retry device and method application notifies B application, and B application performs corresponding business processing, and a reflection mechanism-based automatic retry device and method appl...

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): G06F11/14
CPCG06F11/1402
Inventor 魏金雷陈初兴徐士强杨继伟
Owner 山东汇贸电子口岸有限公司