CN108228248A - A kind of determining method and apparatus of dependence - Google Patents

A kind of determining method and apparatus of dependence Download PDF

Info

Publication number
CN108228248A
CN108228248A CN201611155584.5A CN201611155584A CN108228248A CN 108228248 A CN108228248 A CN 108228248A CN 201611155584 A CN201611155584 A CN 201611155584A CN 108228248 A CN108228248 A CN 108228248A
Authority
CN
China
Prior art keywords
application
address information
route
main
associated application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611155584.5A
Other languages
Chinese (zh)
Inventor
张国顺
徐勤华
朱陈良
苗媛媛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201611155584.5A priority Critical patent/CN108228248A/en
Publication of CN108228248A publication Critical patent/CN108228248A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a kind of determining method and apparatus of dependence, and this method includes:Determine the corresponding associated application of main application;The blocking that the associated application can not be called for making the main application by obtaining is route;Wherein, it is described to block routing for the main application to be made routing to be blocked to call the associated application using described;The main application and the dependence of the associated application are determined using call result.It by the technical solution of the application, is route based on blocking, the operation of main application call associated application can be routed to an invalid address, and realize main application and the blocking between associated application, can then determine main application and the dependence of associated application.Above-mentioned blocking process is exactly primary normal malloc failure malloc, does not need to modify to the code of main application, do not have any intrusion to the code of main application for main application.

Description

Method and device for determining dependency relationship
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for determining a dependency relationship.
Background
With the development of services, in order to meet the rapidly expanding demand and the increasing number of users, an application is gradually split into a plurality of applications, and the applications are relatively independent and dependent on each other. Moreover, the stability of other applications on which the application depends may directly affect the stability of the application, and when the other applications on which the application depends are not available, the application may be abnormal. In general, when other applications on which the present application depends are not available, the present application is strongly dependent on the other applications if all functions or core functions of the present application are not available. When other applications on which the present application depends are not available, the present application is weakly dependent on the other applications if the non-core functions of the present application are not available or have no influence on the present application.
Disclosure of Invention
The application provides a method for determining a dependency relationship, which comprises the following steps:
determining a relevant application corresponding to the main application;
obtaining a blocking route for making the main application unable to call the associated application; wherein the blocking route is used for enabling the main application to call the associated application by utilizing the blocking route;
and determining the dependency relationship between the main application and the associated application by using the calling result.
The process of determining the associated application corresponding to the main application specifically includes:
inquiring a dependent service list through the main application to obtain a relevant application corresponding to the main application; the dependent service list is used for recording each main application and the associated application corresponding to each main application.
The blocking of the route includes:
address information and invalid address information of the primary application; alternatively, the address information is invalidated.
The obtaining of the blocked route for disabling the primary application from invoking the associated application specifically includes: judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the main application and address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
and if not, generating a blocking route comprising the address information of the main application and the invalid address information.
The obtaining of the blocked route for disabling the primary application from invoking the associated application specifically includes: judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
if not, a blocking route including invalid address information is generated.
Before modifying the address information of the associated application in the valid route to invalid address information, the method further includes: saving address information of the associated application in the valid route;
and after determining the dependency relationship between the main application and the associated application by using the calling result, restoring the blocked route to the effective route by using the saved address information of the associated application.
The process of the main application calling the associated application by using the blocking route specifically includes:
and the main application sends a calling request message with the destination address as the invalid address information.
The process of determining the dependency relationship between the main application and the associated application by using the call result specifically includes: verifying the calling result of the main application through a pre-configured test case;
and determining the dependency relationship between the main application and the associated application according to the verification result.
The application provides a device for determining dependency relationship, comprising:
the first determining module is used for determining the associated application corresponding to the main application;
an obtaining module, configured to obtain a blocking route for disabling the main application from invoking the associated application; wherein the blocking route is used for enabling the main application to call the associated application by utilizing the blocking route;
and the second determination module is used for determining the dependency relationship between the main application and the associated application by using the calling result.
The first determining module is specifically configured to, in a process of determining an associated application corresponding to a primary application, query a dependent service list through the primary application to obtain the associated application corresponding to the primary application; the dependent service list is used for recording each main application and the associated application corresponding to each main application.
The blocking of the route includes:
address information and invalid address information of the primary application; alternatively, the address information is invalidated.
The obtaining module is specifically configured to, in a process of obtaining a blocking route for disabling the primary application from invoking the associated application: judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the main application and address information of the associated application; if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route; if not, generating a blocking route comprising the address information of the main application and the invalid address information;
or,
judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the associated application; if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route; if not, a blocking route including invalid address information is generated.
The obtaining module is further configured to store the address information of the associated application in the valid route before modifying the address information of the associated application in the valid route to invalid address information;
and after determining the dependency relationship between the main application and the associated application by using the calling result, restoring the blocked route to the effective route by using the saved address information of the associated application.
The second determining module is specifically configured to verify the calling result of the main application through a pre-configured test case in a process of determining the dependency relationship between the main application and the associated application by using the calling result; and determining the dependency relationship between the main application and the associated application according to the verification result.
Based on the above technical solution, in the embodiment of the present application, based on blocking the routing, the operation of the main application calling the associated application may be routed to an invalid address, and blocking between the main application and the associated application is implemented, so that a dependency relationship between the main application and the associated application may be determined (for example, the dependency relationship is strong dependency or weak dependency, etc.). The blocking process is a normal call failure for the main application, does not need to modify the code of the main application, and does not have any invasion to the code of the main application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a block diagram of a dependency determination system in one embodiment of the present application;
FIG. 2 is a flow diagram of a method for dependency determination in one embodiment of the present application;
FIG. 3A is a schematic diagram of an application scenario in an embodiment of the present application;
FIG. 3B is a flow chart of a method of dependency determination in one embodiment of the present application;
FIG. 3C is a flow diagram of a method for dependency determination in one embodiment of the present application;
FIG. 4 is a diagram of a hardware configuration of a server in one embodiment of the present application;
fig. 5 is a block diagram of a dependency relationship determination apparatus according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the present application provides a method for determining a dependency relationship, which may be applied to a system including a server and multiple applications (i.e., APPs), as shown in fig. 1, which is a schematic diagram of a system structure. The server may include, but is not limited to, a data platform, an e-commerce platform, a PC (Personal Computer), a notebook Computer, a mobile terminal, and the like, and the type of the server is not limited, and all devices capable of determining the dependency relationship are within the scope of the embodiments of the present application. In addition, the application may be a client that implements a certain function (such as a commodity display function, a member function, and the like), may be located on a terminal device such as a PC, a notebook computer, a mobile terminal, and the like, and may also be located on an application server, and the type of the application is not limited, and all applications that can implement the related function are within the scope of the embodiment of the present application.
In one example, the plurality of applications can include a primary application and an associated application to which the primary application corresponds, and the primary application and the associated application are relative. For example, when the dependency relationship between the application a and the application B needs to be determined, that is, when the application B is unavailable, the application a is affected, the primary application may be the application a, and the associated application may be the application B. When the dependency relationship between the application B and the application a needs to be determined, that is, when the application a is unavailable, the application B is affected, the primary application may be the application B, and the associated application may be the application a.
In the embodiment of the present application, an example in which application a is a master application and application B and application C are related applications of application a will be described. In the embodiment, for convenience of distinction, the application is divided into a main application and a related application.
In the application scenario, referring to fig. 2, a flowchart of a method for determining a dependency relationship in the embodiment of the present application is shown, where the method may be applied to a server, and the method may include the following steps:
step 201, determining a related application corresponding to the main application.
Step 202, obtaining a blocking route for making the main application unable to invoke the associated application; wherein the blocking route is used for enabling the main application to call the associated application by using the blocking route.
And step 203, determining the dependency relationship between the main application and the associated application by using the calling result.
In an example, the execution sequence is only an example given for convenience of description, and in practical applications, the execution sequence between the steps may also be changed, and the execution sequence is not limited.
With respect to step 201, in one example, the process for "determining the associated application corresponding to the master application" includes, but is not limited to: and querying the dependent service list through the main application to obtain the associated application corresponding to the main application. Wherein, the dependent service list is used for recording each main application and the associated application corresponding to each main application.
As shown in table 1, an example of a dependent service list is a list in which correspondence relationships between an application a (a master application), an application B (an associated application of the application a), and an application C (an associated application of the application a) are recorded; the correspondence relationship between the application B (master application) and the application a (associated application of the application B), the application D (associated application of the application B), and the application E (associated application of the application B). Based on the dependent service list, when the main application is application a, the dependent service list is queried by application a, so that the associated application corresponding to application a can be obtained, that is, the associated application can be application B and application C.
TABLE 1
Master application Associating applications
Applications A Application B and application C
Application B Application A, application D, and application E
With respect to step 202, in one example, the blocking route may include, but is not limited to: address information and invalid address information of the primary application; alternatively, the address information is invalidated. Therefore, for the procedure of "acquiring a blocked route for making the host application unable to invoke the associated application", a blocked route including address information of the host application and invalid address information may be generated, or a blocked route including invalid address information may be generated. Wherein the blocking route enables the primary application to not invoke the associated application.
In one example, the process of obtaining the blocked route for disabling the master application from invoking the associated application may further include, but is not limited to, the following: firstly, determining whether there is an effective route between the main application and the associated application, where the effective route is used to enable the main application to invoke the associated application, and the effective route may include, but is not limited to: address information of the primary application and address information of the associated application. If yes, the address information of the associated application in the valid route can be directly modified into invalid address information, and the modified valid route is determined as the blocked route. If not, a blocking route may be generated that includes address information for the primary application as well as invalid address information.
In a second manner, it is first determined whether there is an effective route between the primary application and the associated application, where the effective route is used to enable the primary application to invoke the associated application, and the effective route may include, but is not limited to: address information of the associated application. If yes, the address information of the associated application in the valid route can be directly modified into invalid address information, and the modified valid route is determined as the blocked route. If not, a blocking route may be generated that includes invalid address information.
In one example, for the implementation of "modifying the address information of the associated application in the valid route to the invalid address information", before modifying the address information of the associated application in the valid route to the invalid address information, the address information of the associated application in the valid route may also be saved. Based on this, after determining the dependency relationship between the main application and the associated application by using the call result, the blocked route may be restored to the valid route by using the stored address information of the associated application, that is, the invalid address information in the blocked route is modified to the address information of the associated application, so as to restore the valid route.
In one example, the blocking route may be proactively sent to the primary application to cause the primary application to invoke the associated application with the blocking route. In another example, the master application may also actively obtain the blocking route according to its own requirement, and invoke the associated application using the blocking route. Also, since the blocking route is used to disable the primary application from invoking the associated application, the primary application will not be able to invoke the associated application.
In one example, the procedure for the "the master application invokes the associated application with the blocking route" may include, but is not limited to, the following: in the first mode, if the blocking route includes address information and invalid address information of the main application, the main application may parse the address information and the invalid address information of the main application from the blocking route, and after learning that the parsed address information of the main application is address information of itself, may send a call request message whose destination address is the invalid address information. Because the destination address is invalid address information, the call request message is not sent to the associated application, and the associated application does not send a response message to the main application, so that the main application cannot call the associated application. And secondly, if the blocking route comprises invalid address information, the main application can analyze the invalid address information from the blocking route and directly send a call request message with the destination address as the invalid address information. Because the destination address is invalid address information, the call request message is not sent to the associated application, and the associated application does not send a response message to the main application, so that the main application cannot call the associated application.
In one example, after the blocked route is restored to the valid route, the master application may also invoke the associated application with the valid route by sending the valid route to the master application.
The procedure for the "the master application calls the associated application with the valid route" may include, but is not limited to, the following: in the first mode, if the valid route includes the address information of the main application and the address information of the associated application, the main application may parse the address information of the main application and the address information of the associated application from the valid route, and after knowing that the parsed address information of the main application is the address information of the main application, the main application may send a call request message whose destination address is the address information of the associated application. Since the destination address is address information of the associated application, the call request message may be sent to the associated application, and after receiving the call request message, the associated application may send a response message to the host application, so that the host application calls the associated application. And secondly, if the effective route comprises the address information of the associated application, the main application can analyze the address information of the associated application from the effective route and directly send a call request message with the destination address as the address information of the associated application. Since the destination address is address information of the associated application, the call request message may be sent to the associated application, and after receiving the call request message, the associated application may send a response message to the host application, so that the host application calls the associated application.
With respect to step 203, in one example, the process of determining the dependency relationship between the main application and the associated application using the call result may include, but is not limited to, the following: and verifying the calling result of the main application through a pre-configured test case, and determining the dependency relationship between the main application and the associated application according to the verification result. Wherein, the dependency relationship between the main application and the associated application can be strong dependency or weak dependency.
In one example, since the associated application cannot be called by the main application at present, that is, the associated application is unavailable, the calling result of the main application can be verified through a pre-configured test case, and if the verification result is that "all functions or core functions of the main application are unavailable", it is determined that the dependency relationship between the main application and the associated application is strong; and if the verification result is that the non-core functions of the main application are unavailable or all the functions of the main application are normal, determining that the dependency relationship between the main application and the associated application is weak dependency.
Further, after determining that the dependency relationship between the main application and the associated application is a strong dependency or a weak dependency, the unreasonable strong dependency can be corrected, and the reasonable strong dependency can be properly protected without limitation.
Based on the above technical solution, in the embodiment of the present application, based on blocking the routing, the operation of the main application calling the associated application may be routed to an invalid address, and blocking between the main application and the associated application is implemented, so that a dependency relationship between the main application and the associated application may be determined (for example, the dependency relationship is strong dependency or weak dependency, etc.). The blocking process is a normal call failure for the main application, does not need to modify the code of the main application, and does not have any invasion to the code of the main application.
The above process is described in detail below with reference to specific application scenarios. In the application scenario, referring to fig. 3A, a server may include a strong and weak dependency analysis system, a routing system, and an automation system, and these systems may be deployed in a distributed manner (i.e., deployed on different devices), or may be deployed on the same device.
In one example, the strong and weak dependence analysis system is mainly used for completing the following functions: the method comprises the steps of obtaining a dependent service list, generating a blocking route, pushing the blocking route, triggering an automatic system to execute a test case, determining a dependent relation, recovering an effective route and the like. The routing system is mainly used for completing the following functions: providing an active route, receiving a blocking route, sending the blocking route to a master application, etc. The automation system is mainly used for completing the following functions: and verifying the main application through the test case, providing a verification result to a strong and weak dependence analysis system and the like.
In practical applications, the strong and weak dependence analysis system, the routing system, and the automation system may be functional units of a server, and the processing of these systems is substantially the processing of the server, and may also be implemented by other functional units of the server, which is not limited to this. In the subsequent process, the processing of the strong and weak dependence analysis system, the routing system, and the automation system is taken as an example for explanation.
In the application scenario, taking the main application as application a as an example for explanation, as shown in fig. 3B, the method for determining the dependency relationship between application a and its associated application may include, but is not limited to, the following steps:
step 301, the strong and weak dependency analysis system obtains a dependency service list from an RPC (Remote Procedure Call Protocol) service center. As shown in table 1, is an example of this list of dependent services. In the dependent service list, the corresponding relationship between the application a (i.e. the main application) and the applications B and C is recorded; and the corresponding relation between the application B (namely the main application) and the applications A, D and E.
Step 302, the strong and weak dependency analysis system queries the dependency service list through the main application to obtain the associated application corresponding to the main application. For example, when the main application is application a, the dependent service list is queried by application a, so that the associated applications corresponding to application a can be obtained, that is, the associated applications may be application B and application C.
In one example, when the associated application is application B, then the strong and weak dependency analysis system analyzes the dependency relationship of application A and application B. When the associated application is the application C, the strong and weak dependence analysis system analyzes the dependence relationship between the application A and the application C. For convenience of description, in the following process, the strong and weak dependency analysis system is used to analyze the dependency relationship between the application a and the application B as an example, that is, the main application is the application a, and the related application is the application B.
And step 303, the strong and weak dependence analysis system acquires a blocking route for preventing the application A from calling the application B. In one example, the blocking route may include, but is not limited to: address information of application a and an invalid address information. Therefore, for the process of "obtaining a blocking route for disabling the application a from invoking the application B", the strong and weak dependency analysis system may directly generate the blocking route including the address information of the application a and one invalid address information, wherein the blocking route is capable of disabling the application a from invoking the application B.
In one example, as shown in fig. 3C, the process for the "strong and weak dependency analysis system to obtain the blocked route for disabling the application a from invoking the application B" may include, but is not limited to, the following ways:
step 3031, when a blocking route needs to be acquired, the strong and weak dependence analysis system firstly sends a query request message to the routing system, wherein the query request message is used for requesting an effective route between the application A and the application B.
Step 3032, the routing system determines whether there is a valid route between application a and application B locally.
If so, the routing system performs step 3033; if not, the routing system performs step 3036.
Step 3033, the routing system sends the effective route between the application A and the application B to the strong and weak dependence analysis system. The valid route may include address information of application a and address information of application B, and the valid route is used to enable application a to invoke application B. Furthermore, in a routing system, a plurality of address information of the application a (through which the application a can be accessed) and a plurality of address information of the application B (through which the application B can be accessed) are generally stored, whereas in the above-mentioned effective routing, only one address information of the application a and one address information of the application B are included.
Step 3034, the strong and weak dependency analysis system stores the address information of the application B in the effective route.
Step 3035, the strong and weak dependence analysis system obtains an invalid address information, and modifies the address information of the application B in the valid route into the invalid address information, and the modified valid route is the blocked route.
Step 3036, the routing system sends the address information of the application a to the strong and weak dependence analysis system. In the routing system, a plurality of address information of the application a (which can be accessed by the address information) is usually stored, and the routing system only sends one address information of the application a to the strong and weak dependency analysis system.
Step 3037, the strong and weak dependence analysis system obtains an invalid address information and generates a blocking route. Wherein the blocking route may include address information of the application a and the invalid address information.
Through steps 3031 to 3037, the strong and weak dependence analysis system can acquire the blocking route and execute step 304.
And step 304, the strong and weak dependence analysis system sends the blocking route to the routing system.
Step 305, the routing system sends the blocking route to application a (i.e., the master application).
Step 306, the application a calls the associated application (i.e. application B) of the application a by using the blocking route.
In an example, the application a may parse the address information and the invalid address information of the application a from the blocking route, and after knowing that the parsed address information of the application a is the address information of the application a itself, the application a may send a call request message whose destination address is the invalid address information. Since the destination address is invalid address information, the call request message is not sent to the application B, and the application B does not send a response message to the application a, so that the application a cannot call the application B, that is, the application B is not available.
And 307, triggering the automatic system to execute the test case by the strong and weak dependence analysis system.
And 308, verifying the calling result of the application A by the automatic system through the test case.
In one example, a test case may be preconfigured in the automation system, and used to verify the call result of the host application. The user can configure various types of test cases in the automation system according to actual needs, and details of the configuration process are omitted in the embodiment of the application.
In one example, since application a cannot currently call application B, that is, application B is not currently available, the automation system may verify the call result of application a through the test case. Also, the verification result may be "all functions or core functions of the application a are unavailable", "non-core functions of the application a are unavailable or all functions of the application a are normal". Of course, the verification result may be in other forms, which is not limited in this application, and the two verification results are described as examples.
And 309, the automatic system sends the verification result to the strong and weak dependence analysis system.
And 310, determining the dependency relationship between the application A and the application B by the strong and weak dependency analysis system according to the verification result. In one example, if the verification result is "all functions or core functions of application a are unavailable", the strong and weak dependency analysis system may determine that the dependency relationship of application a and application B is a strong dependency. If the verification result is that the non-core function of the application A is unavailable or all functions of the application A are normal, the strong and weak dependency analysis system can determine that the dependency relationship between the application A and the application B is weak dependency.
In one example, after determining that the dependency relationship between the application a and the application B is a strong dependency or a weak dependency, the strong and weak dependency analysis system may correct an unreasonable strong dependency, appropriately protect a reasonable strong dependency, and make a system guarantee policy (e.g., a business decision such as whether to degrade or not), without limitation.
In an example, after the strong and weak dependency analysis system determines that the dependency relationship between the application a and the application B is a strong dependency or a weak dependency, the strong and weak dependency analysis system may further store the dependency relationship between the application a and the application B in a database, thereby completing the determination process of the dependency relationship between the application a and the application B.
And 311, restoring the blocked route to an effective route by the strong and weak dependence analysis system by using the stored address information of the application B, namely modifying the invalid address information in the blocked route to the address information of the application B.
Step 312, the strong and weak dependency analysis system sends the valid route to the routing system.
Step 313, the routing system sends the valid route to application a (i.e., the master application).
In step 314, the application a calls the associated application (i.e., application B) of the application a by using the valid route.
In an example, the application a may parse the address information of the application a and the address information of the application B from the valid route, and after knowing that the parsed address information of the application a is the address information of the application a itself, the application a may send a call request message whose destination address is the address information of the application B. Since the destination address is address information of application B, the call request message may be transmitted to application B. After receiving the call request message, application B may send a response message to application a, so that application a may call to application B, i.e., application B is available, thereby completing the call between application a and application B.
In an example, the application a, the application B, the application C, and the like may be any application in practical use, and the type of each application is not limited in this embodiment. For example, the application a may be a store application, the application B may be a member application, and the application C may be a product application.
Based on the above technical solution, in the embodiment of the present application, based on blocking the routing, the operation of the main application calling the associated application may be routed to an invalid address, and blocking between the main application and the associated application is implemented, so that a dependency relationship between the main application and the associated application may be determined (for example, the dependency relationship is strong dependency or weak dependency, etc.). The blocking process is a normal call failure for the main application, does not need to modify the code of the main application, and does not have any invasion to the code of the main application.
Based on the same application concept as the method described above, the embodiment of the present application provides a dependency relationship determining apparatus 120, and the dependency relationship determining apparatus 120 is applied to the server 10. The dependency determining means 120 may be implemented by software, or by hardware, or by a combination of hardware and software. A logical device, implemented in software for example, is formed by the processor 11 of the server 10 reading corresponding computer program instructions in the non-volatile memory 12. From a hardware level, as shown in fig. 4, the hardware structure diagram of the server 10 where the dependency determining apparatus 120 is located is shown, and besides the processor 11 and the nonvolatile memory 12 shown in fig. 4, the server 10 further includes other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; the server 10 may also be a distributed device in terms of hardware structure, and may include a plurality of interface cards to extend the message processing at the hardware level.
As shown in fig. 5, the apparatus is a block diagram of the dependency relationship determination apparatus, and includes:
a first determining module 1201, configured to determine an associated application corresponding to a primary application;
an obtaining module 1202, configured to obtain a blocking route for disabling the primary application from invoking the associated application; the blocking route is used for enabling the main application to call the associated application by utilizing the blocking route;
a second determining module 1203, configured to determine a dependency relationship between the main application and the associated application by using the call result.
The first determining module 1201 is specifically configured to, in a process of determining an associated application corresponding to a primary application, query a dependent service list through the primary application to obtain the associated application corresponding to the primary application; the dependent service list is used for recording each main application and the associated application corresponding to each main application.
In one example, the blocking of the route may include:
address information and invalid address information of the primary application; alternatively, the address information is invalidated.
In an example, the obtaining module 1202 is specifically configured to, in the process of obtaining the blocking route for disabling the primary application from invoking the associated application: judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the main application and address information of the associated application; if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route; if not, generating a blocking route comprising the address information of the main application and the invalid address information;
or,
the obtaining module 1202 is specifically configured to, in the process of obtaining the blocking route for disabling the primary application from invoking the associated application: judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the associated application; if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route; if not, a blocking route including invalid address information is generated.
The obtaining module 1202 is further configured to store the address information of the associated application in the valid route before modifying the address information of the associated application in the valid route into invalid address information;
and after determining the dependency relationship between the main application and the associated application by using the calling result, restoring the blocked route to the effective route by using the saved address information of the associated application.
The second determining module 1204 is specifically configured to verify the calling result of the main application by using a pre-configured test case in a process of determining the dependency relationship between the main application and the associated application by using the calling result; and determining the dependency relationship between the main application and the associated application according to the verification result.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but is not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A method for determining dependency relationships, the method comprising:
determining a relevant application corresponding to the main application;
obtaining a blocking route for making the main application unable to call the associated application; wherein the blocking route is used for enabling the main application to call the associated application by utilizing the blocking route;
and determining the dependency relationship between the main application and the associated application by using the calling result.
2. The method of claim 1,
the process of determining the associated application corresponding to the main application specifically includes:
inquiring a dependent service list through the main application to obtain a relevant application corresponding to the main application; the dependent service list is used for recording each main application and the associated application corresponding to each main application.
3. The method of claim 1, wherein blocking the route comprises:
address information and invalid address information of the primary application; alternatively, the address information is invalidated.
4. The method according to claim 1, wherein the obtaining a procedure for disabling the primary application from invoking the blocked route of the associated application specifically comprises:
judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the main application and address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
and if not, generating a blocking route comprising the address information of the main application and the invalid address information.
5. The method according to claim 1, wherein the obtaining a procedure for disabling the primary application from invoking the blocked route of the associated application specifically comprises:
judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
if not, a blocking route including invalid address information is generated.
6. The method according to claim 4 or 5, wherein before modifying the address information of the associated application in the valid route to invalid address information, the method further comprises:
saving address information of the associated application in the valid route;
and after determining the dependency relationship between the main application and the associated application by using the calling result, restoring the blocked route to the effective route by using the saved address information of the associated application.
7. The method according to any one of claims 3 to 5,
the process of the main application calling the associated application by using the blocking route specifically includes:
and the main application sends a calling request message with the destination address as the invalid address information.
8. The method according to claim 1, wherein the process of determining the dependency relationship between the main application and the associated application using the call result specifically includes:
verifying the calling result of the main application through a pre-configured test case;
and determining the dependency relationship between the main application and the associated application according to the verification result.
9. An apparatus for determining dependency, the apparatus comprising:
the first determining module is used for determining the associated application corresponding to the main application;
an obtaining module, configured to obtain a blocking route for disabling the main application from invoking the associated application; wherein the blocking route is used for enabling the main application to call the associated application by utilizing the blocking route;
and the second determination module is used for determining the dependency relationship between the main application and the associated application by using the calling result.
10. The apparatus of claim 9,
the first determining module is specifically configured to, in a process of determining an associated application corresponding to a primary application, query a dependent service list through the primary application to obtain the associated application corresponding to the primary application; the dependent service list is used for recording each main application and the associated application corresponding to each main application.
11. The apparatus of claim 9, wherein the blocking of the route comprises:
address information and invalid address information of the primary application; alternatively, the address information is invalidated.
12. The apparatus according to claim 9, wherein the obtaining module is specifically configured to, in obtaining the blocked route for disabling the primary application from invoking the associated application:
judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the main application and address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
if not, generating a blocking route comprising the address information of the main application and the invalid address information;
or,
judging whether an effective route between the main application and the associated application exists or not, wherein the effective route comprises address information of the associated application;
if so, modifying the address information of the associated application in the effective route into invalid address information, and determining the modified effective route as the blocking route;
if not, a blocking route including invalid address information is generated.
13. The apparatus of claim 12,
the obtaining module is further configured to store the address information of the associated application in the valid route before modifying the address information of the associated application in the valid route to invalid address information;
and after determining the dependency relationship between the main application and the associated application by using the calling result, restoring the blocked route to the effective route by using the saved address information of the associated application.
14. The apparatus of claim 9,
the second determining module is specifically configured to verify the calling result of the main application through a pre-configured test case in a process of determining the dependency relationship between the main application and the associated application by using the calling result; and determining the dependency relationship between the main application and the associated application according to the verification result.
CN201611155584.5A 2016-12-14 2016-12-14 A kind of determining method and apparatus of dependence Pending CN108228248A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611155584.5A CN108228248A (en) 2016-12-14 2016-12-14 A kind of determining method and apparatus of dependence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611155584.5A CN108228248A (en) 2016-12-14 2016-12-14 A kind of determining method and apparatus of dependence

Publications (1)

Publication Number Publication Date
CN108228248A true CN108228248A (en) 2018-06-29

Family

ID=62650265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611155584.5A Pending CN108228248A (en) 2016-12-14 2016-12-14 A kind of determining method and apparatus of dependence

Country Status (1)

Country Link
CN (1) CN108228248A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120686A (en) * 2018-08-08 2019-01-01 联动优势电子商务有限公司 A kind of method and device servicing pre-authentication
CN113094082A (en) * 2021-04-07 2021-07-09 北京字跳网络技术有限公司 Method and device for determining microservice dependency relationship and storage medium
CN113703946A (en) * 2021-08-31 2021-11-26 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113905105A (en) * 2021-09-30 2022-01-07 阿里巴巴(中国)有限公司 Method and device for establishing application dependency relationship

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655789A (en) * 2009-09-22 2010-02-24 用友软件股份有限公司 Method and device for realizing hot plugging of application components
CN102567055A (en) * 2010-12-23 2012-07-11 微软公司 Satisfying application dependencies
WO2015157502A1 (en) * 2014-04-09 2015-10-15 Convida Wireless, Llc Service enabler function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101655789A (en) * 2009-09-22 2010-02-24 用友软件股份有限公司 Method and device for realizing hot plugging of application components
CN102567055A (en) * 2010-12-23 2012-07-11 微软公司 Satisfying application dependencies
WO2015157502A1 (en) * 2014-04-09 2015-10-15 Convida Wireless, Llc Service enabler function

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阿里中间件团队: "中间件技术及双十一实践•稳定性平台篇", 《HTTP://JM.TAOBAO.ORG/2014/03/10/3497/》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120686A (en) * 2018-08-08 2019-01-01 联动优势电子商务有限公司 A kind of method and device servicing pre-authentication
CN113094082A (en) * 2021-04-07 2021-07-09 北京字跳网络技术有限公司 Method and device for determining microservice dependency relationship and storage medium
CN113094082B (en) * 2021-04-07 2024-02-13 北京字跳网络技术有限公司 Method, device and storage medium for determining micro-service dependency relationship
CN113703946A (en) * 2021-08-31 2021-11-26 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113703946B (en) * 2021-08-31 2023-07-14 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113905105A (en) * 2021-09-30 2022-01-07 阿里巴巴(中国)有限公司 Method and device for establishing application dependency relationship
CN113905105B (en) * 2021-09-30 2024-03-15 阿里巴巴(中国)有限公司 Method and device for establishing application dependency relationship

Similar Documents

Publication Publication Date Title
AU2019101613A4 (en) Method and apparatus for processing transaction requests
CN108810006B (en) Resource access method, device, equipment and storage medium
CN107040585B (en) Service checking method and device
CN107426169B (en) Service processing method and device based on permission
CN107018174B (en) Unitized system service processing method and device and business processing system
JP2021504847A (en) Cross-blockchain interaction methods, devices, systems, and electronic devices
EP3178011B1 (en) Method and system for facilitating terminal identifiers
US10783277B2 (en) Blockchain-type data storage
CN113079200A (en) Data processing method, device and system
CN108228248A (en) A kind of determining method and apparatus of dependence
US10911251B2 (en) Blockchain ledger authentication
CN111651467B (en) Block chain node interface issuing and calling method and device
CN106878367B (en) Method and device for realizing asynchronous call of service interface
CN113315750B (en) Kafka message issuing method, device and storage medium
CN112131478B (en) Transaction detection method and device
CN114398631A (en) Business processing method and device, electronic equipment and storage medium
CN111753270A (en) Application program login verification method, device, equipment and storage medium
CN112291321B (en) Service processing method, device and system
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium
CN111506895A (en) Construction method and device of application login graph
CN105144073A (en) Removable storage device identity and configuration information
CN112734349A (en) Interface generation method, data calling method, device and electronic equipment
CN110855764A (en) Network traffic scheduling method and device and electronic equipment
CN116467738A (en) Data processing method and device
CN109144743A (en) A kind of acquisition methods of data, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180629

RJ01 Rejection of invention patent application after publication