CN116643787A - Distribution method, device, equipment and storage medium for distributed application - Google Patents

Distribution method, device, equipment and storage medium for distributed application Download PDF

Info

Publication number
CN116643787A
CN116643787A CN202310629152.7A CN202310629152A CN116643787A CN 116643787 A CN116643787 A CN 116643787A CN 202310629152 A CN202310629152 A CN 202310629152A CN 116643787 A CN116643787 A CN 116643787A
Authority
CN
China
Prior art keywords
application
gray
service
service processing
calling
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
CN202310629152.7A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310629152.7A priority Critical patent/CN116643787A/en
Publication of CN116643787A publication Critical patent/CN116643787A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The method, the device, the equipment and the storage medium for publishing the distributed application can be used in the distributed field. The method comprises the following steps: the service server can receive service processing requests corresponding to target service, then determine identification and gray information of a plurality of service applications corresponding to the target service, determine non-gray application and gray application, determine application calling sequence between the non-gray application and the gray application, call the non-gray application and the gray application to perform service processing on the service processing requests according to the application calling sequence to obtain service processing result implementation, determine a test result of the gray application according to the service processing result, and the test result is used for indicating whether a to-be-issued version of the gray application meets issuing conditions or not. If the release condition is met, the release version to be released of the gray application can be released, and the method and the device can meet the requirement that a plurality of applications in the distributed application need to release new versions at the same time, and improve the efficiency of releasing the new versions of the distributed application.

Description

Distribution method, device, equipment and storage medium for distributed application
Technical Field
The present application relates to the field of distributed applications, and in particular, to a method, an apparatus, a device, and a storage medium for publishing a distributed application.
Background
With the popularization of distributed system architecture, more and more enterprises change application systems from single application to distributed application, and a plurality of systems coordinate to work, so that the complexity is increased.
And with the rapid development of the service, the frequency and the times of the development of the new version of the distributed application are obviously increased, the new version of the distributed application can be released through a gray level release method, currently, gray level release is mainly aimed at a single application (namely a single application in the distributed application), namely, a small-scale gray level application (new version) is additionally deployed outside the existing application with a stable version (old version), so that one part of users continue to use the old version, the other part of users start to use the new version, if the users respond well to the use of the new version, the range is gradually widened, and all users are migrated to the new version.
However, the requirement that a plurality of applications in the distributed application need to release new versions at the same time cannot be met, so that the release efficiency of the new versions of the distributed application is low.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for releasing a distributed application, which are used for solving the problem that the release efficiency of the new version of the distributed application is lower because the requirement that a plurality of applications in the distributed application need to release the new version simultaneously in the related technology cannot be met.
In a first aspect, the present application provides a method for publishing a distributed application, applied to a service server, where the method includes:
receiving a service processing request corresponding to a target service;
determining identifiers and gray information of a plurality of service applications corresponding to the target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be distributed in the plurality of service applications;
determining a non-gray application and the at least one gray application according to the identifications of the plurality of business applications and the gray information;
determining an application call order between the non-gray scale application and the at least one gray scale application;
according to the application calling sequence, calling the non-gray-scale application and the at least one gray-scale application to perform service processing on the service processing request to obtain a service processing result;
And determining a test result of the at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets a distribution condition.
In a second aspect, the present application provides a publishing device of a distributed application, including:
the receiving module is used for receiving a service processing request corresponding to the target service;
the first determining module is used for determining the identifiers and the gray information of a plurality of service applications corresponding to the target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be distributed in the plurality of service applications;
a second determining module, configured to determine a non-gray application and the at least one gray application according to the identifiers of the plurality of service applications and the gray information;
a third determining module for determining an application calling order between the non-gray scale application and the at least one gray scale application;
the processing module is used for calling the non-gray application and the at least one gray application to perform service processing on the service processing request according to the application calling sequence to obtain a service processing result;
And the fourth determining module is used for determining a test result of the at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets a distribution condition or not.
In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of publishing a distributed application as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the method of publishing a distributed application as described in the first aspect when executed by a computer.
In a fifth aspect, the present application provides a computer program product comprising a computer program for implementing the method of publishing a distributed application as described in the first aspect when the computer program is executed by a computer.
The application provides a method, a device, equipment and a storage medium for issuing distributed applications, wherein a service server can receive a service processing request corresponding to a target service, then determine identifiers and gray information of a plurality of service applications corresponding to the target service, then determine non-gray applications and at least one gray application according to the identifiers and gray information of the plurality of service applications, then determine an application calling sequence between the non-gray applications and the at least one gray application, and call the non-gray applications and the at least one gray application according to the application calling sequence to process the service processing request to obtain a service processing result, and determine a test result of the at least one gray application according to the service processing result, wherein the test result is used for indicating whether a version to be issued of the gray application meets issuing conditions. If the release condition is met, the release version to be released of the gray application can be released, and the method and the device can meet the requirement that a plurality of applications in the distributed application need to release new versions at the same time, and improve the efficiency of releasing the new versions of the distributed application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of an application scenario to which the present application is applicable;
FIG. 2 is a schematic diagram of a call between applications of an example of the present application;
fig. 3 is a flow chart of a method for publishing a distributed application according to a first embodiment of the present application;
fig. 4 is a flow chart of another method for publishing a distributed application according to the second embodiment of the present application;
fig. 5 is a signaling flow chart of a distribution method of a distributed application according to a third embodiment of the present application;
FIG. 6 is a schematic diagram of an interface for creating gray scale environment information according to an example of the present application;
FIG. 7 is a schematic diagram of an interface for creating routing rules according to an example of the present application;
fig. 8 is a schematic structural diagram of a distributing device for distributed applications according to a fourth embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, the version release method, the device, the equipment and the storage medium of the application system of the present application can be used in the distributed field, and can also be used in any field other than the distributed field, and the application fields of the version release method, the device, the equipment and the storage medium of the application system of the present application are not limited.
With the rapid growth of users and the rapid development of services, the iteration period for developing and developing new versions is faster and faster, on one hand, stable services are required to be provided for users, and on the other hand, rapid service iteration is required.
Currently, a new version of a distributed application can be released through a gray level release method, and currently, gray level release is mainly aimed at a single application (namely, a single application in the distributed application), namely, a small-scale gray level application (new version) is additionally deployed besides an existing stable version (old version) application, so that a part of users continue to use the old version, another part of users start to use the new version, if the users respond well to the use of the new version, the range is gradually expanded, and all users are migrated to the new version.
However, the gray level release method can only release gray level for a single application at a time, and when a plurality of applications in the distributed application need to release new versions at the same time, the release efficiency of the new versions of the distributed application is lower.
Therefore, the application provides a release method of the distributed application, which is characterized in that according to the calling relation of the application, the latest version of the application (namely the gray application) in the gray application environment and the old version of the application (namely the non-gray application) in the non-gray environment are called, so that the non-gray application and the gray application perform service processing on the service processing request to obtain a service processing result, whether the release condition is met or not can be determined based on the service processing result, if so, the release can be performed, the requirement that a plurality of applications in the distributed application need to release new versions at the same time can be met, and the release efficiency of the new versions of the distributed application is improved.
For a clearer description of the present application, the following description will be made with reference to terms related to embodiments of the present application:
an application may typically be formed by a plurality of components, each representing a different functional module (which may be referred to as a service in the present application), each including a plurality of micro-service applications, e.g., a functional module such as "deposit service", "credit card service", etc., in an application, and a plurality of micro-service applications in "deposit service" to provide services to users.
The application of the present application may be a micro-service application, which may be referred to herein as a business application.
Gray scale application: there is a new version of application to be released, the gray application is deployed in a gray environment, which may also be referred to as a swim lane, and the applications deployed in the gray environment are all new version of application to be released, and the gray application may also be referred to as a gray business application.
Non-gray scale application: the method refers to that no new version application to be released exists, the non-gray application is deployed in a non-gray environment, the application deployed in the non-gray environment is the application which is normally released, and the non-gray application can be also called as a non-gray service application.
Gateway application: may be an application for communication between components, i.e. a call between components, which requires a call through a gateway application.
Non-gateway applications: refers to an application in a component, namely a common micro-service application.
For easy understanding, an application scenario to which the embodiment of the present application is applied is described below in conjunction with the example of fig. 1.
Fig. 1 is a schematic diagram of an application scenario to which the present application is applicable, please refer to fig. 1, including: the operation server 101, the service server a102, the service server B103, and the service server C104 can communicate with each other via the internet, among the operation server 101, the service server a102, the service server B103, and the service server C104.
In one possible implementation, a gray scale service application a (i.e., a to-be-published version of the service application a) is deployed in the service server a102, a non-gray scale application (i.e., a published version of the service application B, no to-be-published version of the service application B) is deployed in the service server B103, and a gray scale service application C (i.e., a to-be-published version of the service application C) is deployed in the service server C104, where a call relationship exists among the service application a, the service application B, and the service application C, for example, the application call order is A, B, C, i.e., a calls B, B calls C.
The operation and maintenance server 101 can be used for the establishment of the gray scale environment and the establishment of the routing rules. In one possible implementation, the operation and maintenance server 101 may send the configuration of the gray scale environment and the routing rule to the server where the preset portal application is located, and, for example, if the preset portal application may be a non-gateway application or a gateway application, the server where the preset portal application is located may be the service server a102.
The operation and maintenance server 101 may also implement the configuration of the gray scale environment of the service server a102 and the service server C104, that is, the application of the to-be-deployed version deployed in the service server a102 and the service server C104 is added to the gray scale environment. It will be understood that the application server shown in fig. 1 is in a grayscale environment, meaning that the application deployed in the application server is in a grayscale environment.
It is understood that the number of service servers a102, B103, and C104 may be plural, which are not shown in the figure.
For a clearer description of calls between applications, please refer to fig. 2, and fig. 2 illustrates the calls between applications. And verifying the service processing request of the caller through a routing rule of a preset entry application, and verifying whether the caller has the authority to call the application in the gray environment, if so, routing the flow of the service processing request to the application in the gray environment according to the application calling sequence so as to call the application in the gray environment. The operation and maintenance platform can send the configuration of the gray environment to a server where the gray application is located, and send the configuration of the gray environment and the routing rule to the preset entry application, so that the preset entry application can process the service processing requests of the caller 1 and the caller 2 according to the configuration of the gray environment and the routing rule, and the application for calling the gray environment or the application for non-gray environment is realized. The dashed line in fig. 2 represents a call to an application that is not a gray scale environment (i.e., a non-gray scale application), and the solid line represents a call to an application that is a gray scale environment (i.e., a gray scale application).
In one possible implementation, the caller 1 satisfies the condition of calling the application in the gray environment, the caller 2 does not satisfy the condition of calling the application in the gray environment, if the preset portal application is a gateway application, the caller 1 and the caller 2 may be applications of other components, and if the preset portal application is a non-gateway application, the caller 1 and the caller 2 may be upstream applications of the service application a.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 3 is a flow chart of a method for publishing a distributed application, which is provided in an embodiment of the present application, and the method may be executed by a service server, or may be executed by a publishing device of the distributed application, which may be a chip, or may be a chip module, or may be an integrated development environment (integrated development environment, IDE), etc., and in the following, taking the service server as an example, referring to fig. 3, the method includes the following steps:
S301, receiving a service processing request corresponding to a target service.
The service server may receive a service processing request corresponding to the target service sent by the caller. The number of service processing requests may be one or more.
In a possible implementation manner, a preset entry application is deployed in the service server, the service server may receive a service processing request corresponding to a target service through the preset entry application, where the preset entry application includes at least one routing rule, each routing rule includes a gray scale access condition, and the gray scale access condition is used for performing preliminary verification on the service processing request, and verifying that a caller corresponding to the request has a right to access a target gray scale environment.
S302, determining identifiers and gray information of a plurality of service applications corresponding to a target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be released in the plurality of service applications.
After receiving the service processing request, the service server can determine the identifiers and the gray information of a plurality of service applications corresponding to the target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be released in the plurality of service applications.
For example, the service server may obtain application information of a plurality of service applications of the target service from the registry database, and then determine gray information according to the application information, where the application information may include an identifier of the service application, for example, the application information may further include an identifier of the target gray environment, and if the application information of a certain service application includes an identifier of the target gray environment, it indicates that the service application is a gray application.
In one possible implementation, the service server obtains the service processing request through a preset portal application, and then the multiple service applications of the target service may be downstream applications of the preset portal application.
S303, determining non-gray application and at least one gray application according to the identification and gray information of the plurality of business applications.
After determining the identification and the gray information of the plurality of service applications, the service server may determine the non-gray application and the at least one gray application according to the identification and the gray information of the plurality of service applications.
For example, the service server may determine whether the identifier of each service application is an identifier of a gray application in the gray information, and if the identifier of a certain service application is an identifier of a gray application in the gray information, determine that the service application is a gray application.
S304, determining an application calling sequence between the non-gray-scale application and at least one gray-scale application.
Since there is a calling order between the plurality of service applications, the service server can determine an application calling order between the non-gray scale application and the at least one gray scale application.
The service server may determine the application calling sequence according to application information of the service application, where the application information of each service application includes information of a downstream application of the service application, for example, an identifier of the downstream application or an identifier of a deployment device where the downstream application is located, or other information may be used to identify the downstream application.
S305, according to the application calling sequence, calling the non-gray application and at least one gray application to perform service processing on the service processing request, and obtaining a service processing result.
The service server can call the non-gray application and at least one gray application to perform service processing on the service processing request according to the application call sequence to obtain a service processing result.
Taking fig. 2 as an example, a service application a and a service application C are used as gray applications, a service application B is a non-gray application, a service server can route traffic of a service processing request to the service application a in a target gray environment, then route the traffic of the service processing request from the service application a to the service application B in the non-gray environment, and then receive the traffic from the service application B through the service application C in the target gray environment, so as to realize calling of the service application a, the service application B and the service application C, and perform service processing on the service processing request to obtain a service processing result, wherein the service processing result comprises processing results of the service processing request by the service application a, the service application B and the service application C respectively.
S306, determining a test result of at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets the distribution condition.
According to the service processing result, the service server can determine a test result of at least one gray application according to the service processing result, where the test result is used to indicate whether the to-be-distributed version of the gray application meets the distribution condition.
For example, if the processing result of a certain gray application in the service processing results indicates that the processing of the service processing request is abnormal, that is, the normal processing result of the service processing request is not obtained (which may be understood as that the gray application fails to normally respond to the service processing of the service processing request), it may be determined that the test result of the gray application is abnormal, and correspondingly, the test result indicates that the version to be distributed of the gray application does not meet the distribution condition.
For another example, if the processing result of a certain gray application in the service processing results indicates that the processing of the service processing request is normal, that is, the processing result includes a normal processing result (for example, a certain response value) of the service processing request, it may be determined that the test result of the gray application is normal, and correspondingly, the test result indicates that the version to be distributed of the gray application satisfies the distribution condition.
In this embodiment, the service server may receive a service processing request corresponding to a target service, determine identifiers and gray information of a plurality of service applications corresponding to the target service, determine, according to the identifiers and gray information of the plurality of service applications, a non-gray application and at least one gray application, determine an application calling sequence between the non-gray application and the at least one gray application, call the non-gray application and the at least one gray application according to the application calling sequence to perform service processing on the service processing request, obtain a service processing result, determine, according to the service processing result, a test result of the at least one gray application, where the test result is used to indicate whether a to-be-issued version of the gray application meets an issue condition. If the release condition is met, the release version to be released of the gray application can be released, and the method and the device can meet the requirement that a plurality of applications in the distributed application need to release new versions at the same time, and improve the efficiency of releasing the new versions of the distributed application.
Next, a second embodiment is used to describe another method for publishing a distributed application provided by the present application.
Fig. 4 is a flow chart of another method for publishing a distributed application according to the second embodiment of the present application, where the method may be executed by a service server, or may be executed by a publishing device of the distributed application provided in the service server, where the device may be a chip, a chip module, or an IDE, etc., and in the following case, taking the service server as an example, a preset entry application of a target gray environment is deployed in the service server, and referring to fig. 4, the method includes the following steps:
S401, acquiring a service processing request through a preset entrance application, wherein the preset entrance application comprises at least one routing rule, and each routing rule comprises gray scale access conditions.
The service server can acquire the service processing request through a preset entrance application, and can verify the service processing request through a routing rule in the preset entrance application so as to verify whether a caller of the service processing request has the authority of calling the gray application in the target gray environment. The gray application is isolated from the calling party, the calling party is prevented from directly calling the gray application, the safety of the application is improved, and the calling party capable of calling the gray application is generally a calling party formulated by operation and maintenance personnel because the gray application is in a test stage, and the setting of the preset entry application can further prevent the common calling party from calling the gray application to influence the use experience.
S402, identification and gray information of a plurality of business applications corresponding to the target business are determined.
In one possible implementation manner, the service server may obtain an application list corresponding to the target application from the registry database, where the application list includes application information of a plurality of service applications of the target service, and the application information includes an identifier of the service application, and optionally, the application information may further include an identifier of the target gray environment, so as to indicate that the service application is in the target gray environment, that is, the service application is a gray application. The gray information may be determined according to the identification of the gray application.
The registry database includes application lists of a plurality of applications, and the service server may obtain the application list of the target service from the registry database according to the identifier of the target service.
In this embodiment, the plurality of service applications of the target service may be downstream applications of the preset ingress application, that is, the application list of the target service acquired by the service server may be a downstream application list of the preset ingress application. The preset entry application may be a gateway application or a non-gateway application, that is, a service application in a component corresponding to the target service.
S403, determining a non-gray application and at least one gray application according to the identification and gray information of the plurality of business applications.
S404, determining an application calling sequence between the non-gray-scale application and at least one gray-scale application.
S405, analyzing the service processing request to determine whether the service processing request includes gray scale calling parameters.
If the service processing request includes the gray scale calling parameter, S407 is executed.
If the service processing request does not include the gray scale calling parameter, S406 is executed.
In one possible implementation, the gray scale calling parameter may be represented by a preset tag value, for example, the preset tag value is tag1, tag2, etc. The service server can analyze the service processing request, if the service processing request comprises gray level calling parameters, the service processing request can be further verified, whether the service processing request meets gray level access conditions in the routing rule or not is indicated, and if the service processing request meets the gray level access conditions, the calling party of the service processing request has the authority of accessing gray level application.
It should be noted that, the service processing request carries the parameter to be invoked in gray scale, and when the service application has the version to be released, the operation and maintenance personnel can specify the caller, so that the caller marks the parameter to be invoked in gray scale on the service processing request initiated by the caller.
S406, calling the non-gray application to process the service to obtain the service processing result of the non-gray application.
S407, obtaining at least one routing rule.
If the service processing request includes the gray level calling parameter, at least one routing rule stored in the service server can be obtained. And whether the gray level calling parameter meets gray level access conditions in the routing rules or not is realized, wherein at least one routing rule is sent to the service server after the operation and maintenance server is established.
S408, calling the non-gray application and the at least one gray application to perform service processing on the service processing request according to the gray calling parameters, the at least one routing rule and the application calling sequence to obtain a service processing result.
In one possible implementation, the service server may determine the priority of at least one routing rule, in particular, each routing rule includes a value of priority, e.g., the value of priority is represented by a number, the smaller the value, the higher the priority. The traffic server may then determine the highest priority routing rule of the at least one routing rule as the determination target routing rule.
After determining the target routing rule, the service server can determine whether the gray level calling parameter in the service processing request meets the gray level access condition in the target routing rule, and if the gray level calling parameter meets the gray level access condition of the target routing rule, calling the non-gray level application and at least one gray level application to perform service processing on the service processing request according to the application calling sequence, so as to obtain a service processing result.
In one possible implementation, the gray scale access condition may include a plurality of preset call tags, each preset call tag including a tag name, a matching relationship, a tag value, and a rule relationship, where the matching relationship is any one of equal, unequal, inclusive, and exclusive, and the rule relationship is all tag matches or any one tag matches.
The service server may determine whether the gray level invocation parameter in the service processing request meets the gray level access condition in the target routing rule by:
if the rule relation is that all the labels are matched, determining whether the gray level calling parameters meet the label values of a plurality of preset calling labels according to the matching relation, and if so, determining that the gray level calling parameters meet the gray level access conditions.
For example, the labels of the plurality of preset calling labels are named as tag1, tag2 and tag3, the label value corresponding to tag1 is a, the label value corresponding to tag2 is b, the label value corresponding to tag3 is c, the gray scale calling parameters include tag1, tag2 and tag3, the parameter values corresponding to each label are a, b and c respectively, and the matching relationship is equal, so that the gray scale calling parameters can be determined to meet the gray scale calling condition.
For another example, the label names of the plurality of preset call labels are tag1, tag2 and tag3, the label value corresponding to tag1 is a, the label value corresponding to tag2 is b, the label value corresponding to tag3 is c, the gray call parameters include the label names tag1, tag2 and tag3, the parameter values corresponding to tag1 are a, b and c, the parameter values corresponding to tag2 are b, c and d, the parameter values corresponding to tag3 are c, d and e, and the matching relationship is that each label value in the gray call parameters includes the label value of each preset call label in the target routing rule, and it can be determined that the gray call parameters meet the gray call condition.
If the rule relation is any label matching, determining whether the gray scale calling parameter meets any one of the label values of a plurality of preset calling labels according to the matching relation, and if so, determining that the gray scale calling parameter meets the gray scale access condition. And determining that the gray level calling parameters meet gray level access conditions if the label values of any one label in the gray level calling parameters meet the label values of a plurality of preset calling labels in the target routing rule under the limitation of the matching relation.
In the embodiment of the application, the service server calls the non-gray application and at least one gray application to process the service request,
s409, determining a test result of at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets the distribution condition.
In one possible implementation manner, if the test result of the target gray application in at least one gray application indicates that the to-be-issued version of the target gray application does not meet the issue condition, sending indication information to a first server where the target gray application is located, where the indication information is used for indicating the first server to execute version rollback operation on the target gray application, rolling back the to-be-issued version of the target gray application to a previous version of the to-be-issued version, where the target gray application of the to-be-issued version is used for providing service for the service processing request, so that abnormal occurrence of the target gray application and service interruption can be avoided.
In this embodiment, the service server may obtain the service processing request through a preset portal application, then determine the identifiers and gray information of a plurality of service applications corresponding to the target service, then determine the non-gray application and at least one gray application according to the identifiers and gray information of the plurality of service applications, and then determine the application calling sequence between the non-gray application and the at least one gray application. And then analyzing the service processing request, determining whether the service processing request comprises gray level calling parameters, if so, acquiring at least one routing rule, calling non-gray level applications and at least one gray level application to perform service processing on the service processing request according to the gray level calling parameters, the at least one routing rule and the application calling sequence, obtaining a service processing result, and determining a test result of the at least one gray level application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray level application meets the distribution condition. If the release condition is met, the release version to be released of the gray application can be released, and the method and the device can meet the requirement that a plurality of applications in the distributed application need to release new versions at the same time, and improve the efficiency of releasing the new versions of the distributed application.
Next, a method for publishing a distributed application according to a third embodiment of the present application will be described. The interaction between the operation server and the service server is specifically described.
Fig. 5 is a signaling flow chart of a distribution method of a distributed application according to a third embodiment of the present application, and referring to fig. 5, the method includes the following steps:
s501, the operation and maintenance server creates routing rules and gray scale environment information.
The operation and maintenance server can create a routing rule, the routing rule comprises gray scale access conditions, the gray scale access conditions comprise a plurality of preset call labels, each preset call label comprises a label name, a matching relation, a label value and a rule relation, the matching relation is any one of equal, unequal, containing and not containing, and the rule relation is all label matching or any label matching.
The gray environment information comprises a name of a gray environment, a name of a gray application, a name of a component where the gray application is located, an identification of a physical unit where the gray application is located, and a version number of a version to be distributed of the gray application. For example, the gray scale environment information may refer to fig. 6, and fig. 6 is an interface schematic for creating gray scale environment information.
S502, the operation and maintenance server determines a service server corresponding to the routing rule and a second server corresponding to the gray environment information.
In one possible implementation manner, the routing rule may further include application information of the preset portal application, where the application information includes a name of a component where the preset portal application is located, an application name of the preset portal application, and an identifier of a physical unit where the preset portal application is located.
Illustratively, the routing rules may refer to FIG. 7, where FIG. 7 is an interface schematic for creating the routing rules. Optionally, the routing rule may further include a rule name, an available state (available or unavailable) of the rule, a priority, and an identification of the target gray scale environment. The service server can determine that the invoked gray application is an application in the target gray environment according to the identification of the target gray environment.
In the embodiment of the application, one server is the minimum unit of service application deployment, one physical unit comprises a plurality of servers, and one machine room can comprise a plurality of physical units.
The operation and maintenance server can determine the service server corresponding to the routing rule according to the application information of the preset entrance application in the routing rule.
The operation and maintenance server can determine the equipment deployed by the gray application and all equipment needing to call the gray application as a second server corresponding to the gray environment information.
S503, the operation and maintenance server sends the routing rule and gray environment information to the service server corresponding to the routing rule.
S504, the operation and maintenance server sends gray environment information to a second server corresponding to the gray environment information.
It will be appreciated that the number of second servers in fig. 5 is merely an example, and in practice the number of first servers is a plurality, not shown in fig. 5.
In this embodiment, the operation and maintenance server may create a routing rule and gray environment information, then determine a service server corresponding to the routing rule and a second server corresponding to the gray environment information, send the routing rule and the gray environment information to the service server corresponding to the routing rule, and then send the gray environment information to the second server corresponding to the gray environment information, so that the service server may invoke gray application and non-gray application on the received service processing request based on the routing rule and the gray environment information, and the second server may determine the application in the gray environment according to the gray environment information. The application can meet the requirement that a plurality of applications in the distributed application need to release new versions at the same time, and improves the efficiency of releasing the new versions of the distributed application.
Fig. 8 is a schematic structural diagram of a distributing device for distributed applications according to a fourth embodiment of the present application. Referring to fig. 8, the apparatus 80 includes: a receiving module 801, a first determining module 802, a second determining module 803, a third determining module 804, a processing module 805, and a fourth determining module 806.
A receiving module 801, configured to receive a service processing request corresponding to a target service.
The first determining module 802 is configured to determine identifiers and gray information of a plurality of service applications corresponding to the target service, where the gray information includes at least one identifier of a gray application, and the gray application is an application in which a version to be released exists in the plurality of service applications.
A second determining module 803 is configured to determine a non-gray application and at least one gray application according to the identification and gray information of the plurality of service applications.
A third determining module 804 is configured to determine an application calling order between the non-gray scale application and the at least one gray scale application.
And the processing module 805 is configured to call the non-gray application and at least one gray application to perform service processing on the service processing request according to the application call sequence, so as to obtain a service processing result.
A fourth determining module 806, configured to determine, according to the service processing result, a test result of at least one gray application, where the test result is used to indicate whether the to-be-distributed version of the gray application meets the distribution condition.
In one possible implementation, the first determining module 802 is specifically configured to:
the method comprises the steps of obtaining an application list corresponding to a target application from a registry database, wherein the application list comprises application information of a plurality of business applications of a target business, the application information comprises identifiers of the business applications, and the registry database comprises application lists of the plurality of applications.
And determining the business application comprising the identification of the target gray scale environment in the application information as the gray scale application, wherein the target gray scale environment is the running environment of the gray scale application.
And determining gray information according to the identification of the gray application.
In one possible implementation manner, the service server is deployed with a preset entry application of the target gray scale environment, and the receiving module 801 is specifically configured to:
and acquiring a service processing request through a preset entrance application, wherein the preset entrance application comprises at least one routing rule, and each routing rule comprises gray scale access conditions.
In one possible implementation, the processing module 805 is specifically configured to:
and analyzing the service processing request to determine whether the service processing request comprises gray scale calling parameters.
And if the service processing request comprises the gray level calling parameter, acquiring at least one routing rule.
And calling the non-gray application and the at least one gray application to perform service processing on the service processing request according to the gray calling parameters, the at least one routing rule and the application calling sequence to obtain a service processing result.
In one possible implementation, the processing module 805 is specifically configured to:
a priority of at least one routing rule is determined.
And determining the routing rule with the highest priority among the at least one routing rule as a determined target routing rule.
And determining whether the gray scale calling parameter meets gray scale access conditions of the target routing rule.
And if the gray level calling parameter meets the gray level access condition of the target routing rule, calling the non-gray level application and at least one gray level application to perform service processing on the service processing request according to the application calling sequence, so as to obtain a service processing result.
In one possible implementation, the gray scale access condition includes a plurality of preset call tags, each preset call tag includes a tag name, a matching relationship, a tag value, and a rule relationship, the matching relationship is any one of equal, unequal, inclusive, and exclusive, and the rule relationship is all tag matches or any one tag matches.
The processing module 805 specifically is configured to:
If the rule relation is that all the labels are matched, determining whether the gray level calling parameters meet the label values of a plurality of preset calling labels according to the matching relation, and if so, determining that the gray level calling parameters meet the gray level access conditions.
If the rule relation is any label matching, determining whether the gray scale calling parameter meets any one of the label values of the plurality of pre-calling labels according to the matching relation, and if so, determining that the gray scale calling parameter meets the gray scale access condition.
In one possible implementation, the apparatus 80 further includes: and a transmitting module.
The sending module is specifically used for:
if the test result of the target gray application in the at least one gray application indicates that the to-be-issued version of the target gray application does not meet the issuing condition, sending indication information to a first server where the target gray application is located, wherein the indication information is used for indicating the first server to execute version rollback operation on the target gray application, and rolling back the to-be-issued version of the target gray application to a previous version of the to-be-issued version, wherein the to-be-issued version of the target gray application is used for providing service for the service processing request.
The device of the present embodiment may be used to execute the technical solutions of the foregoing method embodiments, and the specific implementation manner and the technical effects are similar, and are not repeated herein.
Fig. 9 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present application, and as shown in fig. 9, an electronic device 90 may include: at least one processor 901 and a memory 902.
A memory 902 for storing programs. In particular, the program may include program code including computer-executable instructions.
The Memory 902 may include random access Memory (Random Access Memory, RAM) and may also include Non-volatile Memory (Non-volatile Memory), such as at least one disk Memory.
The processor 901 is configured to execute computer-executable instructions stored in the memory 902 to implement the methods described in the foregoing method embodiments. The processor 901 may be a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Optionally, the electronic device 90 may further include: a communication interface 903. In a specific implementation, if the communication interface 903, the memory 902, and the processor 901 are implemented independently, the communication interface 903, the memory 902, and the processor 901 may be connected to each other through buses and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 903, the memory 902, and the processor 901 are integrated on a chip, the communication interface 903, the memory 902, and the processor 901 may complete communication through internal interfaces.
The electronic device 90 may be a chip, a chip module, an IDE, a server, or the like.
The electronic device of the present embodiment may be used to execute the technical solutions of the foregoing method embodiments, and the specific implementation manner and the technical effects are similar, and are not repeated herein.
A sixth embodiment of the present application provides a computer-readable storage medium, which may include: various media capable of storing computer execution instructions, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disc, etc., specifically, the computer execution instructions are stored in the computer readable storage medium, and when the computer execution instructions are executed by a computer, the technical scheme shown in the foregoing method embodiment is executed, and specific implementation manner and technical effects are similar and are not repeated herein.
The seventh embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a computer, the technical solution shown in the foregoing method embodiment is executed, and the specific implementation manner and the technical effect are similar, and are not repeated herein.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for distributing a distributed application, applied to a service server, the method comprising:
receiving a service processing request corresponding to a target service;
determining identifiers and gray information of a plurality of service applications corresponding to the target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be distributed in the plurality of service applications;
Determining a non-gray application and the at least one gray application according to the identifications of the plurality of business applications and the gray information;
determining an application call order between the non-gray scale application and the at least one gray scale application;
according to the application calling sequence, calling the non-gray-scale application and the at least one gray-scale application to perform service processing on the service processing request to obtain a service processing result;
and determining a test result of the at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets a distribution condition.
2. The method of claim 1, wherein determining the identification and gray information of the plurality of service applications corresponding to the target service comprises:
acquiring an application list corresponding to a target application from a registry database, wherein the application list comprises application information of a plurality of business applications of the target business, the application information comprises identifiers of the business applications, and the registry database comprises application lists of a plurality of applications
Determining a service application comprising an identifier of a target gray level environment in application information as the gray level application, wherein the target gray level environment is an operation environment of the gray level application;
And determining the gray information according to the identification of the gray application.
3. The method according to claim 1 or 2, wherein the service server has a preset portal application of a target grey scale environment deployed therein;
the receiving the service processing request corresponding to the target service includes:
and acquiring a service processing request through the preset entrance application, wherein the preset entrance application comprises at least one routing rule, and each routing rule comprises gray scale access conditions.
4. The method according to claim 3, wherein said calling said non-gray scale application and said at least one gray scale application to perform a service process on said service processing request according to said application calling order, to obtain a service processing result, comprises:
analyzing the service processing request, and determining whether the service processing request comprises gray scale calling parameters or not;
if the service processing request comprises the gray level calling parameter, acquiring the at least one routing rule;
and calling the non-gray application and the at least one gray application to perform service processing on the service processing request according to the gray calling parameter, the at least one routing rule and the application calling sequence to obtain a service processing result.
5. The method of claim 4, wherein invoking the non-gray scale application and the at least one gray scale application to perform a business process on the business process request according to the gray scale invocation parameter, the at least one routing rule, and the application invocation order to obtain a business process result comprises:
determining a priority of the at least one routing rule;
the routing rule with the highest priority in the at least one routing rule is taken as a determined target routing rule;
determining whether the gray scale calling parameter meets gray scale access conditions of the target routing rule;
and if the gray level calling parameter meets the gray level access condition of the target routing rule, calling the non-gray level application and the at least one gray level application to perform service processing on the service processing request according to the application calling sequence to obtain a service processing result.
6. The method of claim 5, wherein the gray scale access condition comprises a plurality of preset call tags, each preset call tag comprising a tag name, a matching relationship, a tag value, and a rule relationship, the matching relationship being any one of equal, unequal, inclusive, and exclusive, the rule relationship being either a full tag match or any one tag match;
The determining whether the gray scale calling parameter meets the gray scale access condition of the target routing rule includes:
if the rule relation is that all the labels are matched, determining whether the gray scale calling parameters meet the label values of the preset calling labels according to the matching relation, and if so, determining that the gray scale calling parameters meet the gray scale access conditions;
if the rule relation is any label matching, determining whether the gray scale calling parameter meets any one of the label values of the plurality of pre-calling labels according to the matching relation, and if so, determining that the gray scale calling parameter meets the gray scale access condition.
7. The method of claim 6, wherein if the test result of the target gray application in the at least one gray application indicates that the to-be-published version of the target gray application does not satisfy a publication condition, the method further comprises:
and sending indication information to a first server where the target gray application is located, wherein the indication information is used for indicating the first server to execute version rollback operation on the target gray application, rollback the version to be issued of the target gray application to the previous version of the version to be issued, and the target gray application of the version to be issued is used for providing service for the service processing request.
8. A distribution device for a distributed application, comprising:
the receiving module is used for receiving a service processing request corresponding to the target service;
the first determining module is used for determining the identifiers and the gray information of a plurality of service applications corresponding to the target service, wherein the gray information comprises at least one identifier of a gray application, and the gray application is an application with a version to be distributed in the plurality of service applications;
a second determining module, configured to determine a non-gray application and the at least one gray application according to the identifiers of the plurality of service applications and the gray information;
a third determining module for determining an application calling order between the non-gray scale application and the at least one gray scale application;
the processing module is used for calling the non-gray application and the at least one gray application to perform service processing on the service processing request according to the application calling sequence to obtain a service processing result;
and the fourth determining module is used for determining a test result of the at least one gray application according to the service processing result, wherein the test result is used for indicating whether the version to be distributed of the gray application meets a distribution condition or not.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of issuing a distributed application as claimed in any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the method of issuing a distributed application as claimed in any of claims 1-7.
CN202310629152.7A 2023-05-30 2023-05-30 Distribution method, device, equipment and storage medium for distributed application Pending CN116643787A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310629152.7A CN116643787A (en) 2023-05-30 2023-05-30 Distribution method, device, equipment and storage medium for distributed application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310629152.7A CN116643787A (en) 2023-05-30 2023-05-30 Distribution method, device, equipment and storage medium for distributed application

Publications (1)

Publication Number Publication Date
CN116643787A true CN116643787A (en) 2023-08-25

Family

ID=87624279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310629152.7A Pending CN116643787A (en) 2023-05-30 2023-05-30 Distribution method, device, equipment and storage medium for distributed application

Country Status (1)

Country Link
CN (1) CN116643787A (en)

Similar Documents

Publication Publication Date Title
CN111556059A (en) Abnormity detection method, abnormity detection device and terminal equipment
CN110532025B (en) Data processing method, device and equipment based on micro-service architecture and storage medium
CN112733206A (en) Resource allocation method, device, server and medium
CN111461763A (en) Resource allocation method and device
CN109189494B (en) Configuration gray level publishing method, device and equipment and computer readable storage medium
CN108664343B (en) State calling method and device for micro-service
CN113312675A (en) Attribute checking method and device, electronic equipment and storage medium
CN116643787A (en) Distribution method, device, equipment and storage medium for distributed application
CN116647603A (en) Distribution method, device, equipment and storage medium for distributed application
CN114115933A (en) Method, system, device, electronic equipment and medium for software upgrading
CN111367694B (en) Event processing method, server and computer storage medium
CN113296911A (en) Cluster calling method, cluster calling device, electronic equipment and readable storage medium
CN116633856A (en) Service processing method, device, equipment and storage medium
CN109918895B (en) Method, electronic device, and computer-readable medium for outputting data
CN114327602B (en) Information processing method, device, electronic equipment and storage medium
CN111915336B (en) Method, apparatus, device and storage medium for determining authenticity of complaint message
CN115334006B (en) Gray level verification method and system based on client implementation
CN111324472B (en) Method and device for judging garbage items of information to be detected
CN116777376B (en) Saas system applied to intelligent middle station of enterprise
CN108008966B (en) Resource updating method and system
CN114064384A (en) Method, device and system for printing log
CN117235026A (en) Log processing method and related device
CN115981743A (en) Service data processing method, device, equipment and medium
CN112540775A (en) Method, device and equipment for detecting compatibility of program package
CN117764327A (en) Service application dispatching method and device

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