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

Request retry method and device

A retry and request technology, applied in the computer field, can solve the problems of retry failure, failure to realize retry logic decoupling, and inability to perform retry gracefully and effectively

Pending Publication Date: 2021-09-07
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Both scheme 1 and scheme 2 cannot limit the number of retry requests, and cannot execute retries elegantly and effectively. Moreover, when the interface relied on by scheme 1 has not recovered from the network exception, subsequent retries will fail, resulting in the execution of There are many invalid retries, and the intrusive modification of the code directly fails to realize the decoupling of retry logic and normal logic. Solution 2 cannot judge the best time for delay, and still cannot avoid more invalid retries

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
  • Request retry method and device
  • Request retry method and device
  • Request retry method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

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

[0043] figure 1 is a schematic diagram of main steps of the request retry method according to the first embodiment of the present invention.

[0044] Such as figure 1 As shown, the request retry method in the embodiment of the present invention mainly includes the following steps S101 to S103.

[0045] Step S101: When the response result returned by the server to the fi...

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 request retry method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: when a response result of a first request indicates failure, judging whether retry can be carried out or not according to the current number of times of retry of the first request; if so, determining the number of second requests which are retried at present; if the number of the second requests is smaller than the maximum number of retry requests, performing retry after the retry waiting time is delayed, otherwise, performing retry after the retry of one second request is finished, and delaying the retry waiting time for retry, wherein the retry waiting time is calculated based on a preset initial waiting time interval and the current number of retry times of the first request. According to the implementation mode, the number of retry requests can be limited, limited times of retry can be executed on each request, the optimal time delay of the retry can be judged, excessive invalid retry is avoided, immersive modification of codes and decoupling of retry logic and normal logic do not need to be conducted, and retry is conducted in a simple, elegant and reusable mode when a front-end calling interface fails.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method and device for request retry. Background technique [0002] In the application, it is often necessary to implement the following functions: upload data to the remote storage service or pull the required data from the remote storage service, and do other operations in the case of a successful response. This function can be simply divided into two steps: call the remote service logic package to return the processing result to the processing method; implement the retry upload logic based on the processing result of the previous step or catch the exception, otherwise continue the logical operation. When the dependent interface returns a system exception due to internal errors or other errors, the retry mechanism is particularly important, otherwise manual operations are required to call again. [0003] At present, there are several schemes for the front-end ajax (...

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): G06F16/958
CPCG06F16/958
Inventor 陈亚秋
Owner BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
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