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

Method and device for deadlock monitoring for application programming interface

An application program interface and deadlock technology, applied in the computer field, can solve problems such as low applicability and ineffective detection

Active Publication Date: 2017-10-24
ALIBABA GRP HLDG LTD
View PDF8 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The dynamic method can only cover limited software running conditions, and cannot effectively detect defects such as deadlocks with a low probability of occurrence, and the applicability is also not high

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
  • Method and device for deadlock monitoring for application programming interface
  • Method and device for deadlock monitoring for application programming interface
  • Method and device for deadlock monitoring for application programming interface

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0108] refer to figure 1 , which shows a flow chart of the steps of an embodiment of an application program interface deadlock monitoring method of the present application, which may specifically include the following steps:

[0109] Step 110, receiving a call request from a client to an API.

[0110] During data encapsulation, each layer in the network layer interacts with each other and provides services through an interface, and the interface between the application layer and the client is called an application program interface. In practical applications, the client can request the system to provide services by calling an application program interface.

[0111] Step 120, creating a deadlock detection node for the call request.

[0112] In the embodiment of the present application, the deadlock detection node is used to save the deadlock detection information of each call request. Among them, API deadlock refers to a phenomenon that in a distributed system, a user calls ...

Embodiment 2

[0128] refer to figure 2 , which shows a flow chart of the steps of an embodiment of an application program interface deadlock monitoring method of the present application, which may specifically include the following steps:

[0129] Step 210, receiving a call request from a client to an API.

[0130] Step 220, when calling the application program interface, create a deadlock detection node in the application program interface context environment data structure.

[0131] In the embodiment of this application, the deadlock detection node will be created in the context data structure of the corresponding API, so that the life cycle of the deadlock detection node is the same as the corresponding API context data structure, and the deadlock detection node The memory space can be allocated in the context environment, so as to avoid frequently calling functions to separately allocate and release memory space for the deadlock detection node. In addition, the deadlock detection node...

Embodiment 3

[0198] refer to image 3 , which shows a flow chart of the steps of an embodiment of an application program interface deadlock monitoring method of the present application, which may specifically include the following steps:

[0199] Step 310, receiving a call request from a client to an API.

[0200] Step 320, creating a deadlock detection node for the call request.

[0201] Step 330, calculating the priority of the deadlock detection node; the priority of the deadlock detection node is the deadline; the deadline is the sum of the creation time of the detection node and the deadlock time threshold.

[0202] In the embodiment of the present application, the first queue for storing deadlock detection nodes is a priority queue. Among them, the priority queue (priority queue) is a collection of 0 or more elements, each element has a priority, and elements with the same priority can be processed in first-in first-out order or according to any priority. For the priority queue, e...

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

Embodiments of the invention provide a method and a device for deadlock monitoring of an application programming interface and relate to the technical field of computers. The method comprises the following steps of receiving a call request of a client for one application programming interface; establishing deadlock detection nodes for the call request; inserting the deadlock detection nodes into a first queue; deleting the corresponding deadlock detection nodes in the first queue when the call of the application programming interface corresponding to the call request ends; monitoring whether the existence time of each deadlock detection node in the first queue exceeds a deadlock time threshold; and if the existence time of any deadlock detection node is detected to exceed the deadlock time threshold, determining as deadlock of the corresponding called application programming interface. According to the method and the device, the deadlock monitoring of the API is realized based on the deadlock detection nodes through monitoring of the existence time of the deadlock detection nodes, the applicability is stronger and the precision is higher.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to an application program interface deadlock monitoring method and an application program interface deadlock monitoring device. Background technique [0002] In a step-by-step system, the system architecture and design are very complex, and errors in processing logic are inevitable. For example, if the client requests a service by calling the application programming interface (Application Programming Interface, API) of the system, there will be a low probability that the response will not be received for a long time, and the system will neither return user success nor return user error. This is the API deadlock. The occurrence of a deadlock will cause the program to wait indefinitely or consume resources severely, causing the entire system to be paralyzed without available resources, seriously affecting system security and reliability. [0003] Existing deadlock detecti...

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/52
CPCG06F9/524G06F9/52
Inventor 邢勇
Owner ALIBABA GRP HLDG LTD