CN110018913B - Application merging deployment method, device, equipment and computer readable storage medium - Google Patents

Application merging deployment method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110018913B
CN110018913B CN201811446341.6A CN201811446341A CN110018913B CN 110018913 B CN110018913 B CN 110018913B CN 201811446341 A CN201811446341 A CN 201811446341A CN 110018913 B CN110018913 B CN 110018913B
Authority
CN
China
Prior art keywords
application
applications
service
calling
container
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.)
Active
Application number
CN201811446341.6A
Other languages
Chinese (zh)
Other versions
CN110018913A (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201811446341.6A priority Critical patent/CN110018913B/en
Publication of CN110018913A publication Critical patent/CN110018913A/en
Application granted granted Critical
Publication of CN110018913B publication Critical patent/CN110018913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • 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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure provides an application merging and deploying method, device, equipment and a computer readable storage medium. The application merging and deploying method comprises the following steps: deploying a plurality of applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when the fact that the matched service is provided by another application in the plurality of applications is determined according to the published and called service in the service list of the application, the plurality of applications can be deployed in the same container by binding the calling relation of the matched service provided by the other application called by the application, and when one application in the container performs service calling, the service published by the other application in the container is directly called, so that loss caused by RPC calling is avoided.

Description

Application merging deployment method, device, equipment and computer readable storage medium
Technical Field
The embodiments of the present disclosure relate to the field of computer technologies, and in particular, to an application merge deployment method, an apparatus, a device, and a computer readable storage medium.
Background
When an application is initially running in a computer system, the amount of user and the amount of data are small, and all services can be provided using a single application. As the number of users increases and the complexity of the service increases, deploying all functions with a single application will make the application become increasingly bulkier and maintenance of the application will also face a significant challenge. At this point, a service oriented architecture (Service Oriented Architecture, SOA) may be employed to split the application into multiple applications in terms of service dimensions, with the applications communicating using a remote procedure call (Remote Procedure Call, RPC) protocol.
Fig. 1 shows a procedure of RPC call in the related art.
As shown in fig. 1, in a typical RPC call process, when a client configures an RPC call, a service returns a proxy object, in which the RPC framework performs various processing logic, such as flow-limiting calculation, routing addressing, splicing transmission objects, serializing into binary, and then performing network transmission. When data is transmitted to the server, the server firstly needs to deserialize the interface and the parameter information, then searches for the realization class, and calls the realization class in a reflection way and returns a result. In the return of the result, the serialization of the primary data and the network transmission will be referred to here again.
It has been tested that these processing logic of the RPC framework will take on average around 1ms, i.e. converting a single call to a single RPC call will increase the response time by 1ms on average. Perhaps some feel that this 1ms time is insignificant, but as the granularity of the service division gets finer and finer, a user's one operation may involve several tens of hundred RPC calls. When these tens of hundreds of 1ms are piled up, attention has to be paid. In addition to the impact on response time, converting an in-process call to an RPC call also occupies higher CPU resources because both serialization and de-serialization of objects belong to CPU intensive operations.
Therefore, the SOA architecture introduces the following two problems while solving the continuous and bulky problem of single application:
1. RPC communication results in loss: after being split into the SOA architecture, the call in one system is converted into the RPC call between systems, and the RPC call increases CPU resource loss, network communication time consumption and the like compared with the call in the system.
2. The granularity of service partitioning is too fine: when the SOA architecture is practiced, the service division granularity is too fine, so that the application load is low, and the machine resources cannot be effectively used.
Disclosure of Invention
In view of this, a first aspect of the present disclosure provides an application merge deployment method, including:
deploying a plurality of applications in the same container;
responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications;
when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application;
when it is determined for a published and invoked service in a service list of one application that there is another application of the plurality of applications that provides a matched service, a calling relationship of the one application to invoke the matched service provided by the other application is bound.
A second aspect of the present disclosure provides an application merge deployment apparatus, comprising:
a deployment module configured to deploy a plurality of applications in a same container;
a recording module configured to record a service list of services published and invoked by each of the plurality of applications in response to the launching of the plurality of applications;
a determining module configured to determine, when the starting of the plurality of applications is completed, whether another application of the plurality of applications provides a matched service for the published and invoked service in the service list of each application;
And a binding module configured to bind a calling relationship of one application calling a matching service provided by another application when it is determined that the matching service provided by the other application exists among the plurality of applications for the published and called services in the service list of the one application.
A third aspect of the present disclosure provides an electronic device comprising a memory and a processor; wherein the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the steps of:
deploying a plurality of applications in the same container;
responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications;
when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application;
when it is determined for a published and invoked service in a service list of one application that there is another application of the plurality of applications that provides a matched service, a calling relationship of the one application to invoke the matched service provided by the other application is bound.
A fourth aspect of the present disclosure provides a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a method as described in the first aspect.
In the disclosed embodiments, by deploying multiple applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when the fact that the matched service provided by another application exists in the applications is determined according to the published and called service in the service list of the application, the calling relation of the matched service provided by the application called by the application is bound, the applications can be deployed in the same container, the service published by the application in the container is directly called when the application in the container performs service calling, and loss caused by RPC calling is avoided. Therefore, network communication time consumption and CPU resource loss caused by RPC communication can be reduced, and the problem of low application load caused by too fine service division granularity in an SOA architecture is solved, so that the resources of the service division method and the service division method are effectively utilized. In addition, a plurality of applications are arranged in the same container, so that the flow is conveniently planned in a unified way, the peak clipping and valley filling effects can be achieved, and the operation and maintenance personnel only need to pay attention to the flow of the whole system, so that the capacity evaluation can be conveniently carried out.
These and other aspects of the disclosure will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the related art, a brief description will be given below of the drawings required for the exemplary embodiments or the related technical descriptions, and it is apparent that the drawings in the following description are some exemplary embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 illustrates a flow chart of an application merge deployment method according to an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of an application merge deployment method according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of an application merge deployment method according to another embodiment of the present disclosure;
FIG. 4 shows a flowchart of an example of step S204 of an application merge deployment method in accordance with an embodiment of the present disclosure;
FIG. 5 shows a flowchart of an example of step S201 of an application merge deployment method according to an embodiment of the present disclosure;
FIG. 6 shows a schematic diagram of an application scenario example of an application merge deployment method according to an embodiment of the present disclosure;
FIG. 7 illustrates a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure;
FIG. 8 illustrates a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure;
FIG. 9 illustrates a block diagram of an application merge deployment apparatus according to another embodiment of the present disclosure;
FIG. 10 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 11 is a schematic diagram of a computer system suitable for use in implementing an application merge deployment method according to an embodiment of the present disclosure.
Detailed Description
In order that those skilled in the art will better understand the present disclosure, a technical solution in exemplary embodiments of the present disclosure will be clearly and completely described in the following with reference to the accompanying drawings in exemplary embodiments of the present disclosure.
In some of the flows described in the specification and claims of this disclosure and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 101, 102, etc. is merely for distinguishing between the various operations, and that the order of execution does not itself represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Technical solutions in exemplary embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in exemplary embodiments of the present disclosure, and it is apparent that the described exemplary embodiments are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of the disclosure. .
FIG. 2 illustrates a flow chart of an application merge deployment method according to an embodiment of the present disclosure. The method may include steps S201, S202 and S203 and S204.
In step S201, a plurality of applications are deployed in the same container.
In step S202, in response to the start of the plurality of applications, a service list of services published and invoked by each of the plurality of applications is recorded.
In step S203, when the startup of the plurality of applications is completed, it is determined for the published and invoked service in the service list of each application whether there is another application in the plurality of applications that provides a matched service.
In step S204, when it is determined that there is another application among the plurality of applications that provides a matching service for the published and invoked service in the service list of one application, the calling relationship of the matching service provided by the one application to the other application is bound.
In one embodiment of the present disclosure, the container (Docker) is an open-source application container engine that allows developers to package their applications and rely on packages into a portable container and then release onto devices, as well as to implement virtualization. According to the embodiment of the disclosure, the applications are deployed in the same container through merging and deployment of the applications, a service list of the application release and call is read in the process of starting the applications, when the release between the two applications is found to be matched with the referenced service, the RPC proxy of the application is replaced, and the service released by the current process is directly called during service call, so that RPC call is avoided.
In the disclosed embodiments, by deploying multiple applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when the fact that the matched service is provided by another application in the plurality of applications is determined according to the published and called service in the service list of the application, the plurality of applications can be deployed in the same container by binding the calling relation of the matched service provided by the other application called by the application, and when one application in the container performs service calling, the service published by the other application in the container is directly called, so that loss caused by RPC calling is avoided. Therefore, network communication time consumption and CPU resource loss caused by RPC communication can be reduced, and the problem of low application load caused by too fine service division granularity in an SOA architecture is solved, so that the resources of the service division method and the service division method are effectively utilized. In addition, a plurality of applications are arranged in the same container, so that the flow is conveniently planned in a unified way, the peak clipping and valley filling effects can be achieved, and the operation and maintenance personnel only need to pay attention to the flow of the whole system, so that the capacity evaluation can be conveniently carried out.
An application scenario of an application merge deployment method according to an embodiment of the present disclosure is described below with reference to fig. 6.
Fig. 6 shows a schematic diagram of an application scenario example of an application merge deployment method according to an embodiment of the present disclosure.
As shown in fig. 6, applications are divided into application a and application B according to service functions. When deployed, the application A and the application B can be deployed together. When it is found that the application a and the application B deployed together have service list publications of corresponding published and invoked services, it should be avoided that the application C deployed not in combination with the application a and the application B is called by RPC, but the service published by the application deployed in combination is directly called, for example, JVM (Java virtual machine) call is made. This is the problem that the consolidated deployment needs to solve.
As shown in fig. 6, the service list of the service issued and invoked by each application is recorded at the time of the start of the application a and the application B. And when the application A and the application B are started, searching whether the service which is matched with the service which is called by the application A is published or not in other applications. At this time, the application B is found to issue the matching service, and at this time, the calling relationship of the application a to call the matching service issued by the application B may be bound, for example, JVM binding is performed. At this time, when it is found that there is a binding relationship in which application a calls a service published by application B, the default RPC proxy logic is replaced. That is, when the client code of the application a is invoked, the application a will force the services issued by other applications deployed by the current process to avoid RPC invocation. Therefore, when the application which is merged and deployed discovers the corresponding service and replaces RPC proxy logic successfully, the proxy object directly calls the realization class code of the other application of the current process, and processing logic such as route addressing, serialization deserialization, network transmission and the like is avoided.
Of course, when there is no binding relationship in the container that issues another application with a service that application a needs to invoke, then application a does not find another application in the proxy object that has a binding relationship with application a, such as a JVM, then various processing logic may be performed through the RPC framework, such as invoking a service that application C issues.
An application merge deployment method according to another embodiment of the present disclosure is described below with reference to fig. 3.
Fig. 3 illustrates a flow chart of an application merge deployment method according to another embodiment of the present disclosure. The embodiment shown in fig. 3 differs from the embodiment shown in fig. 1 in that it further comprises steps S301, S302 and S303.
In step S301, in response to a request of a current application to invoke a service issued by another application, it is detected whether there is another application for which a calling relationship binding for the service exists in a container in which the current application is deployed.
In step S302, in response to a detection result of another application for which there is a calling relationship binding of the service in a container in which the current application is deployed, the current application calls the service provided by the other application.
In step S303, in response to a detection result that there is no other application bound to the calling relation of the service in the container where the current application is deployed, the current application initiates a remote procedure call for the service.
An example of step S204 of the application merge deployment method according to an embodiment of the present disclosure is described below with reference to fig. 4.
Fig. 4 shows a flowchart of an example of step S204 of the application merge deployment method according to an embodiment of the present disclosure. Step S204 includes steps S401 and S402.
In step S401, it is detected whether or not a call relationship in which one application calls a matching service provided by another application has an attribute related to a call service timeout.
In step S402, when it is detected that the calling relationship of the matching service provided by one application to another application has an attribute related to calling service timeout, a timeout detection function set for the calling relationship of the matching service provided by one application to another application is activated.
In one embodiment of the present disclosure, the internal service call that the RPC call translates to the merge deployed application defaults to being executed synchronously at the current thread. This will result in the timeout configured for RPC calls not being effective, and some non-critical calls that are too time consuming will directly impact system response time. To address this problem, the merge deployment supports internal service call asynchronization of RPC call-to-merge deployed applications. For performance reasons, asynchronization defaults to non-open because frequent switching of threads itself affects response time. When an application requires the ability of RPC to translate and deploy applications' internal service calls to be asynchronous, the user needs to add attributes to the calling service that are related to the calling service timeout, e.g., timeout-in-multiple = true attribute. The task is committed to the thread pool by merging the applications, and if not completed within the timeout period, timeout exception information, e.g., timeoutException, is thrown at the current thread. At this time, the decision by the business is to ignore the exception and continue execution or to throw the error directly.
An example of step S201 of the application merge deployment method according to an embodiment of the present disclosure is described below with reference to fig. 5.
Fig. 5 shows a flowchart of an example of step S201 of the application merge deployment method according to an embodiment of the present disclosure. Step S201 includes steps S501 and S502.
In step S501, a respective loader is created for each of a plurality of applications deployed in the same container.
In step S502, applications are loaded in the same container by respective loaders of each of the plurality of applications.
In one embodiment of the present disclosure, when multiple applications are deployed in the same container, the dependencies of each application are indeterminate. In some cases, it may occur that different applications rely on different versions of the same package of files (e.g., JAR package). If the same loader (e.g., classLoader) is used to load these different applications, a large number of errors (e.g., classnotfoundation exception and nosuchmethodsxception) must occur without finding the corresponding file. To address this problem, a separate loader may be created for each of a plurality of applications deployed in the same container. For example, based on OSGI ((Open Service Gateway Initiative) class isolation technique, different ClassLoader loads can be created for each application at the application container bottom layer, ensuring code isolation, avoiding classnotfoundation exception and nosuchmethodseaception.
Fig. 7 shows a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure. As shown in fig. 7, a respective loader ClassLoader is created for each of the plurality of applications deployed in a merged manner, application 1 through application n.
In one embodiment of the present disclosure, step S101 includes: multiple applications are deployed in the same container and each application is bound to a different domain name.
In one embodiment of the present disclosure, in addition to file package (e.g., JAR package) quarantine, request conflicts may also occur with multiple applications deployed on the same container. For example, when a user requests/user/register addresses, an accurate determination is needed as to whether the request needs to be forwarded to application A or application B. For example, the Tomcat server naturally supports multi-domain name configuration, application a can be bound to application a.alipoy.com, application B can be bound to application b.alipoy.com, and when a user requests http:// application a.alipoy.com/user/register, the user forwards the request to the application a process, and the request http:// application b.alipoy.com/user/register forwards the application B process, thereby solving the problem of request collision.
As shown in fig. 7, for each application 1 to application n of the plurality of applications that are deployed in a merged manner, each application binds to a different host after loading the service code.
In one embodiment of the present disclosure, the plurality of applications deployed in the same container include at least one facade application and at least one non-facade application, wherein only at least one facade application is allowed to issue services to applications outside the container, and wherein only applications within the container are allowed to be invoked by the services issued by the at least one non-facade application.
Fig. 8 shows a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure.
As shown in fig. 8, when there is only a single application, the user requests a service from the system, and the system returns the result. When the SOA architecture is adopted, the application is split into a plurality of applications according to the service dimension, and the applications are communicated by adopting the RPC protocol. The portal to the overall system remains unique, but the application becomes multiple applications. When the merging deployment is carried out, only the whole merging deployment door surface system A can release services to the outside, and the non-door surface system B, the non-door surface system C and the non-door surface system D do not release services. The services of the non-door-side system B, the non-door-side system C and the non-door-side system D can only be used for in-process calling of the internal systems which are deployed in a merging mode. So designed, the entire merged and deployed system resembles a single application of the door-to-door system for external systems other than the merged and deployed system.
It should be noted that the merging deployment has no limitation on the number of door systems, and the above example shows an example of a single door system, and in fact, the merging deployment also supports multiple door systems.
In embodiments of the present disclosure, multiple systems are deployed together in a combined manner, also facilitating capacity assessment of the systems. Taking payment service as an example, bank cards, account balances, balance financing, credit payments and the like are essentially payment means. When each application is deployed separately, each application needs to perform capacity assessment separately, and in order to cope with the peak value of each payment means, each application performs redundant deployment, but the peak value of each payment means cannot arrive at the same time. Credit payment applications may not peak when the balance financing application peaks. All applications apply for resources according to the highest peak value, and waste of the whole resources is caused. If all payment systems are combined and deployed together, the flow is planned uniformly, and the effects of peak clipping and valley filling can be achieved. When the system is operated and maintained, only the payment amount of the whole system is required to be paid, and the payment amount of a specific payment mode is not required to be paid, so that capacity evaluation can be more conveniently carried out.
When the scheme of the embodiment of the disclosure is actually applied, compared with the use of RPC communication between single applications, after the application of merging deployment is used, each user request can be saved by more than 30ms, the CPU utilization rate is reduced by more than 15%, and more than 2000 physical machines are saved. When an internal person actually uses the management system according to the scheme of the embodiment of the present disclosure, it is found that the management system generally has the characteristics of small access amount and low load. Before the application is deployed by combining, each system occupies one 2C4G machine, 9 systems are combined after the combination deployment transformation is carried out, only one 4C8G machine is occupied, and resources are saved by more than 75%.
Fig. 9 shows a block diagram of an application merge deployment apparatus according to another embodiment of the present disclosure. The apparatus may include a get deployment module 901, a record module 902, a determine module 903, and a bind module 904.
The deployment module 901 is configured to deploy a plurality of applications in the same container.
The recording module 902 is configured to record a list of services published and invoked by each of a plurality of applications in response to the launching of the plurality of applications.
The determining module 903 is configured to determine, when the starting of the plurality of applications is completed, whether there is another application in the plurality of applications that provides a matched service for the published and invoked service in the service list of each application.
The binding module 904 is configured to bind call relationships in which one application invokes a matching service provided by another application when it is determined for published and invoked services in a service list of one application that there is another application in the plurality of applications that provides the matching service.
The internal functions and structures of the application merge deployment apparatus are described above, and in one possible design, the structure of the application merge deployment apparatus may be implemented as an application merge deployment device, as shown in fig. 10, the processing device 1000 may include a processor 1001 and a memory 1002.
The memory 1002 is configured to store a program for supporting the application merge deployment apparatus to execute the application merge deployment method in any of the above embodiments, and the processor 1001 is configured to execute the program stored in the memory 1002.
The memory 1002 is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1001 to perform the steps of:
deploying a plurality of applications in the same container;
responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications;
When the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application;
when it is determined for a published and invoked service in a service list of one application that there is another application of the plurality of applications that provides a matched service, a calling relationship of the one application to invoke the matched service provided by the other application is bound.
In one embodiment of the present disclosure, the container (Docker) is an open-source application container engine that allows developers to package their applications and rely on packages into a portable container and then release onto devices, as well as to implement virtualization. According to the embodiment of the disclosure, the applications are deployed in the same container through merging and deployment of the applications, a service list of the application release and call is read in the process of starting the applications, when the release between the two applications is found to be matched with the referenced service, the RPC proxy of the application is replaced, and the service released by the current process is directly called during service call, so that RPC call is avoided.
In the disclosed embodiments, by deploying multiple applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when the fact that the matched service is provided by another application in the plurality of applications is determined according to the published and called service in the service list of the application, the plurality of applications can be deployed in the same container by binding the calling relation of the matched service provided by the other application called by the application, and when one application in the container performs service calling, the service published by the other application in the container is directly called, so that loss caused by RPC calling is avoided. Therefore, network communication time consumption and CPU resource loss caused by RPC communication can be reduced, and the problem of low application load caused by too fine service division granularity in an SOA architecture is solved, so that the resources of the service division method and the service division method are effectively utilized. In addition, a plurality of applications are arranged in the same container, so that the flow is conveniently planned in a unified way, the peak clipping and valley filling effects can be achieved, and the operation and maintenance personnel only need to pay attention to the flow of the whole system, so that the capacity evaluation can be conveniently carried out.
An application scenario of an application merge deployment method according to an embodiment of the present disclosure is described below with reference to fig. 6.
Fig. 6 shows a schematic diagram of an application scenario example of an application merge deployment method according to an embodiment of the present disclosure.
As shown in fig. 6, applications are divided into application a and application B according to service functions. When deployed, the application A and the application B can be deployed together. When it is found that the application a and the application B deployed together have service list publications of corresponding published and invoked services, it should be avoided that the application C deployed not in combination with the application a and the application B is called by RPC, but the service published by the application deployed in combination is directly called, for example, JVM (Java virtual machine) call is made. This is the problem that the consolidated deployment needs to solve.
As shown in fig. 6, the service list of the service issued and invoked by each application is recorded at the time of the start of the application a and the application B. And when the application A and the application B are started, searching whether the service which is matched with the service which is called by the application A is published or not in other applications. At this time, the application B is found to issue the matching service, and at this time, the calling relationship of the application a to call the matching service issued by the application B may be bound, for example, JVM binding is performed. At this time, when it is found that there is a binding relationship in which application a calls a service published by application B, the default RPC proxy logic is replaced. That is, when the client code of the application a is invoked, the application a will force the services issued by other applications deployed by the current process to avoid RPC invocation. Therefore, when the application which is merged and deployed discovers the corresponding service and replaces RPC proxy logic successfully, the proxy object directly calls the realization class code of the other application of the current process, and processing logic such as route addressing, serialization deserialization, network transmission and the like is avoided.
Of course, when there is no binding relationship in the container that issues another application with a service that application a needs to invoke, then application a does not find another application in the proxy object that has a binding relationship with application a, such as a JVM, then various processing logic may be performed through the RPC framework, such as invoking a service that application C issues.
In one embodiment of the disclosure, the one or more computer instructions are further executable by the processor to perform the steps of:
responding to a request of a current application for calling a service issued by another application, and detecting whether another application bound with a calling relation of the service exists in a container deployed with the current application;
and responding to a detection result of another application which is provided with the calling relation binding of the service in a container of the current application, and calling the service provided by the other application by the current application.
In one embodiment of the disclosure, the one or more computer instructions are further executable by the processor to perform the steps of:
responsive to a detection result that another application bound for the calling relationship of the service does not exist in a container in which the current application is deployed, the current application initiates a remote procedure call for the service.
In one embodiment of the present disclosure, when determining that there is another application in the plurality of applications that provides a matched service for the published and invoked service in the service list of one application, the binding the calling relationship of the one application to call the matched service provided by the other application includes:
detecting whether a calling relation of a matching service provided by one application calling another application has an attribute related to overtime of the calling service;
when it is detected that the calling relationship of the matching service provided by one application calling another application has an attribute related to calling service timeout, a timeout detection function set for the calling relationship of the matching service provided by one application calling another application is activated.
In one embodiment of the present disclosure, the internal service call that the RPC call translates to the merge deployed application defaults to being executed synchronously at the current thread. This will result in the timeout configured for RPC calls not being effective, and some non-critical calls that are too time consuming will directly impact system response time. To address this problem, the merge deployment supports internal service call asynchronization of RPC call-to-merge deployed applications. For performance reasons, asynchronization defaults to non-open because frequent switching of threads itself affects response time. When an application requires the ability of RPC to translate and deploy applications' internal service calls to be asynchronous, the user needs to add attributes to the calling service that are related to the calling service timeout, e.g., timeout-in-multiple = true attribute. The task is committed to the thread pool by merging the applications, and if not completed within the timeout period, timeout exception information, e.g., timeoutException, is thrown at the current thread. At this time, the decision by the business is to ignore the exception and continue execution or to throw the error directly.
In one embodiment of the present disclosure, the deploying a plurality of applications in the same container includes:
creating a respective loader for each application deployed in the same container plurality of applications;
and loading the applications in the same container through respective loaders of each application in the plurality of applications.
In one embodiment of the present disclosure, when multiple applications are deployed in the same container, the dependencies of each application are indeterminate. In some cases, it may occur that different applications rely on different versions of the same package of files (e.g., JAR package). If the same loader (e.g., classLoader) is used to load these different applications, a large number of errors (e.g., classnotfoundation exception and nosuchmethodsxception) must occur without finding the corresponding file. To address this problem, a separate loader may be created for each of a plurality of applications deployed in the same container. For example, based on OSGI ((Open Service Gateway Initiative) class isolation technique, different ClassLoader loads can be created for each application at the application container bottom layer, ensuring code isolation, avoiding classnotfoundation exception and nosuchmethodseaception.
Fig. 7 shows a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure. As shown in fig. 7, a respective loader ClassLoader is created for each of the plurality of applications deployed in a merged manner, application 1 through application n.
In one embodiment of the present disclosure, the deploying a plurality of applications in the same container includes:
multiple applications are deployed in the same container and each application is bound to a different domain name.
In one embodiment of the present disclosure, in addition to file package (e.g., JAR package) quarantine, request conflicts may also occur with multiple applications deployed on the same container. For example, when a user requests/user/register addresses, an accurate determination is needed as to whether the request needs to be forwarded to application A or application B. For example, the Tomcat server naturally supports multi-domain name configuration, application a can be bound to application a.alipoy.com, application B can be bound to application b.alipoy.com, and when a user requests http:// application a.alipoy.com/user/register, the user forwards the request to the application a process, and the request http:// application b.alipoy.com/user/register forwards the application B process, thereby solving the problem of request collision.
As shown in fig. 7, for each application 1 to application n of the plurality of applications that are deployed in a merged manner, each application binds to a different host after loading the service code.
In one embodiment of the present disclosure, the plurality of applications deployed in the same container includes at least one facade application and at least one non-facade application, wherein only the at least one facade application is allowed to issue services to applications outside the container, and the at least one non-facade application issued services only allow applications within the container to invoke.
Fig. 8 shows a schematic diagram of an application scenario example of an application merge deployment method according to another embodiment of the present disclosure.
As shown in fig. 8, when there is only a single application, the user requests a service from the system, and the system returns the result. When the SOA architecture is adopted, the application is split into a plurality of applications according to the service dimension, and the applications are communicated by adopting the RPC protocol. The portal to the overall system remains unique, but the application becomes multiple applications. When the merging deployment is carried out, only the whole merging deployment door surface system A can release services to the outside, and the non-door surface system B, the non-door surface system C and the non-door surface system D do not release services. The services of the non-door-side system B, the non-door-side system C and the non-door-side system D can only be used for in-process calling of the internal systems which are deployed in a merging mode. So designed, the entire merged and deployed system resembles a single application of the door-to-door system for external systems other than the merged and deployed system.
It should be noted that the merging deployment has no limitation on the number of door systems, and the above example shows an example of a single door system, and in fact, the merging deployment also supports multiple door systems.
In embodiments of the present disclosure, multiple systems are deployed together in a combined manner, also facilitating capacity assessment of the systems. Taking payment service as an example, bank cards, account balances, balance financing, credit payments and the like are essentially payment means. When each application is deployed separately, each application needs to perform capacity assessment separately, and in order to cope with the peak value of each payment means, each application performs redundant deployment, but the peak value of each payment means cannot arrive at the same time. Credit payment applications may not peak when the balance financing application peaks. All applications apply for resources according to the highest peak value, and waste of the whole resources is caused. If all payment systems are combined and deployed together, the flow is planned uniformly, and the effects of peak clipping and valley filling can be achieved. When the system is operated and maintained, only the payment amount of the whole system is required to be paid, and the payment amount of a specific payment mode is not required to be paid, so that capacity evaluation can be more conveniently carried out.
When the scheme of the embodiment of the disclosure is actually applied, compared with the use of RPC communication between single applications, after the application of merging deployment is used, each user request can be saved by more than 30ms, the CPU utilization rate is reduced by more than 15%, and more than 2000 physical machines are saved. When an internal person actually uses the management system according to the scheme of the embodiment of the present disclosure, it is found that the management system generally has the characteristics of small access amount and low load. Before the application is deployed by combining, each system occupies one 2C4G machine, 9 systems are combined after the combination deployment transformation is carried out, only one 4C8G machine is occupied, and resources are saved by more than 75%.
The processor 1001 is configured to perform all or part of the steps of the foregoing method steps.
The structure of the application merging and deploying device can also comprise a communication interface used for the application merging and deploying device to communicate with other devices or communication networks.
The exemplary embodiments of the present disclosure also provide a computer storage medium for storing computer software instructions for use by the application merge deployment apparatus, which contains a program for executing the application merge deployment method of any of the above embodiments.
FIG. 11 is a schematic diagram of a computer system suitable for use in implementing an application merge deployment method according to an embodiment of the present disclosure.
As shown in fig. 11, the computer system 1100 includes a Central Processing Unit (CPU) 1101 that can execute various processes in the embodiment shown in fig. 2 described above in accordance with a program stored in a Read Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM1103, various programs and data required for the operation of the system 1100 are also stored. The CPU1101, ROM1102, and RAM1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a LAN card, a modem, and the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the I/O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
In particular, the method described above with reference to fig. 2 may be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the data processing method of fig. 2. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, and/or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (14)

1. An application merge deployment method, comprising: deploying a plurality of applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when determining that a matched service provided by another application exists in the plurality of applications for the issued and called service in the service list of the application, binding the calling relation of the matched service provided by the other application called by the application;
the plurality of applications deployed in the same container comprise at least one portal application and at least one non-portal application, wherein only the at least one portal application is allowed to issue services to applications outside the container, and the at least one non-portal application is allowed to issue services only to applications in the container.
2. The method as recited in claim 1, further comprising: responding to a request of a current application for calling a service issued by another application, and detecting whether another application bound with a calling relation of the service exists in a container deployed with the current application; and responding to a detection result of another application which is provided with the calling relation binding of the service in a container of the current application, and calling the service provided by the other application by the current application.
3. The method as recited in claim 2, further comprising: responsive to a detection result that another application bound for the calling relationship of the service does not exist in a container in which the current application is deployed, the current application initiates a remote procedure call for the service.
4. The method of claim 1, wherein when determining that there is another application of the plurality of applications that provides a matching service for the published and invoked service in the service list of one application, binding a calling relationship of one application to the matching service provided by the other application, comprises: detecting whether a calling relation of a matching service provided by one application calling another application has an attribute related to overtime of the calling service; when it is detected that the calling relationship of the matching service provided by one application calling another application has an attribute related to calling service timeout, a timeout detection function set for the calling relationship of the matching service provided by one application calling another application is activated.
5. The method of claim 1, wherein deploying the plurality of applications in the same container comprises: creating a respective loader for each application deployed in the same container plurality of applications; and loading the applications in the same container through respective loaders of each application in the plurality of applications.
6. The method of claim 1, wherein deploying the plurality of applications in the same container comprises: multiple applications are deployed in the same container and each application is bound to a different domain name.
7. An application merge deployment apparatus, comprising: a deployment module configured to deploy a plurality of applications in a same container; a recording module configured to record a service list of services published and invoked by each of the plurality of applications in response to the launching of the plurality of applications; a determining module configured to determine, when the starting of the plurality of applications is completed, whether another application of the plurality of applications provides a matched service for the published and invoked service in the service list of each application; a binding module configured to bind a calling relationship of one application calling a matching service provided by another application when it is determined that there is another application providing the matching service among the plurality of applications for the published and called service in the service list of the one application;
the plurality of applications deployed in the same container comprise at least one portal application and at least one non-portal application, wherein only the at least one portal application is allowed to issue services to applications outside the container, and the at least one non-portal application is allowed to issue services only to applications in the container.
8. An electronic device comprising a memory and a processor; wherein the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the steps of: deploying a plurality of applications in the same container; responsive to the launching of the plurality of applications, recording a service list of services published and invoked by each of the plurality of applications; when the starting of the plurality of applications is finished, determining whether another application in the plurality of applications provides matched services according to the issued and called services in the service list of each application; when determining that a matched service provided by another application exists in the plurality of applications for the issued and called service in the service list of the application, binding the calling relation of the matched service provided by the other application called by the application;
the plurality of applications deployed in the same container comprise at least one portal application and at least one non-portal application, wherein only the at least one portal application is allowed to issue services to applications outside the container, and the at least one non-portal application is allowed to issue services only to applications in the container.
9. The electronic device of claim 8, wherein the one or more computer instructions are further executable by the processor to perform the steps of: responding to a request of a current application for calling a service issued by another application, and detecting whether another application bound with a calling relation of the service exists in a container deployed with the current application; and responding to a detection result of another application which is provided with the calling relation binding of the service in a container of the current application, and calling the service provided by the other application by the current application.
10. The electronic device of claim 9, wherein the one or more computer instructions are further executable by the processor to perform the steps of: responsive to a detection result that another application bound for the calling relationship of the service does not exist in a container in which the current application is deployed, the current application initiates a remote procedure call for the service.
11. The electronic device of claim 8, wherein when determining that there is another application of the plurality of applications that provides a matching service for the published and invoked service in the service list of one application, binding a calling relationship of one application to the matching service provided by the other application, comprises: detecting whether a calling relation of a matching service provided by one application calling another application has an attribute related to overtime of the calling service; when it is detected that the calling relationship of the matching service provided by one application calling another application has an attribute related to calling service timeout, a timeout detection function set for the calling relationship of the matching service provided by one application calling another application is activated.
12. The electronic device of claim 8, wherein the deploying the plurality of applications in the same container comprises: creating a respective loader for each application deployed in the same container plurality of applications; and loading the applications in the same container through respective loaders of each application in the plurality of applications.
13. The electronic device of claim 8, wherein the deploying the plurality of applications in the same container comprises: multiple applications are deployed in the same container and each application is bound to a different domain name.
14. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of any of claims 1-6.
CN201811446341.6A 2018-11-29 2018-11-29 Application merging deployment method, device, equipment and computer readable storage medium Active CN110018913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811446341.6A CN110018913B (en) 2018-11-29 2018-11-29 Application merging deployment method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811446341.6A CN110018913B (en) 2018-11-29 2018-11-29 Application merging deployment method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110018913A CN110018913A (en) 2019-07-16
CN110018913B true CN110018913B (en) 2023-06-27

Family

ID=67188562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811446341.6A Active CN110018913B (en) 2018-11-29 2018-11-29 Application merging deployment method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110018913B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363888A (en) * 2020-11-13 2021-02-12 广州朗国电子科技有限公司 Multi-application cooperative work method, device and system and computer readable storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789250A (en) * 2016-12-22 2017-05-31 焦点科技股份有限公司 A kind of service multi version based on container coexists implementation method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100483352C (en) * 2007-02-13 2009-04-29 华为技术有限公司 IDE calling device and calling method therefor
US7971209B2 (en) * 2007-05-18 2011-06-28 Sap Ag Shortcut in reliable communication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789250A (en) * 2016-12-22 2017-05-31 焦点科技股份有限公司 A kind of service multi version based on container coexists implementation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A client-server based application using ASTRA—an asynchronous remote procedure call (RPC) mechanism;Akkihebbal L.Ananda 等;《Journal of Microcomputer Applications》;第95-113页 *
移动P2P应用环境下的组件管理模型;田祥宏 等;《计算机工程与设计》;第2996-2998+3069页 *

Also Published As

Publication number Publication date
CN110018913A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
US10701139B2 (en) Life cycle management method and apparatus
US8301746B2 (en) Method and system for abstracting non-functional requirements based deployment of virtual machines
US8930957B2 (en) System, method and program product for cost-aware selection of stored virtual machine images for subsequent use
US8387114B2 (en) Secure workload partitioning in a server environment
US20100131944A1 (en) Graphics Hardware Resource Usage In A Fully Virtualized Computing Environment
EP2244204A1 (en) Securely hosting workloads in virtual computing environments
US20120158819A1 (en) Policy-based application delivery
KR20080106908A (en) Migrating a virtual machine that owns a resource such as a hardware device
EP1989622A1 (en) Method, system, and program product for deploying a platform dependent application in a grid environment
JPWO2012039053A1 (en) Computer system operation management method, computer system, and computer-readable medium storing program
US10353752B2 (en) Methods and apparatus for event-based extensibility of system logic
CN111290827A (en) Data processing method and device and server
US9959136B2 (en) Optimizations and enhancements of application virtualization layers
US9658889B2 (en) Isolating applications in server environment
CN110018913B (en) Application merging deployment method, device, equipment and computer readable storage medium
CN109347716B (en) Instantiation method and device of consumer VNF
Seybold et al. The impact of the storage tier: A baseline performance analysis of containerized dbms
US9465677B2 (en) Partitioned application environment
WO2019121679A1 (en) Cloud management platform
US8752052B2 (en) Sub-dispatching application server
Braun et al. Integrating a new mobility service into the jade agent toolkit
US20240037440A1 (en) Qubit mapped diamond dependency recommendation service
US20240078050A1 (en) Container Data Sharing Via External Memory Device
CN116450221A (en) CPU-driven calling method, device and equipment
CN113505370A (en) Computer-implemented malicious software detection method

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
TA01 Transfer of patent application right

Effective date of registration: 20200918

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200918

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant