Application calling method, computer equipment and storage medium
Through the control plane component and edge proxy component of the service mesh, the problem that SpringCloud applications and Service Mesh applications cannot be called each other is solved, cross-architecture application calls are implemented, and system performance and scalability are improved.
Patent Information
- Application Number
- CN202510551117.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-29
AI Technical Summary
In the prior art, SpringCloud applications and Service Mesh applications cannot call each other due to different working principles, which increases system complexity and maintenance costs.
Through the control plane component of the service mesh, application information is obtained from the registry of the target microservice architecture according to the call request, and cross-architecture application calls are realized through the edge proxy component.
The call of the service mesh to the target microservice architecture (such as SpringCloud) application and the call of the target microservice architecture to the service mesh application is realized, which solves the cross-architecture call problem, improves the scalability and overall performance of the system, and reduces the difficulty of development and maintenance.
Smart Images

Figure CN120066624A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technologies, and particularly to an application calling method, a computer device, and a storage medium. Background Art
[0002] With the development of software technologies, microservice architectures are widely applied to the development of various systems. Microservice architectures include SpringCloud, Service Mesh, etc.
[0003] An application based on SpringCloud (hereinafter referred to as a SpringCloud application) usually depends on traditional service registration and discovery mechanisms, such as Eureka or Nacos, etc., and realizes service registration, discovery, and calling through configuration on the server side and the client side. An application based on Service Mesh (hereinafter referred to as a Service Mesh application) realizes service governance by deploying proxies between services, including functions such as traffic control, circuit breaking, retry, monitoring, etc.
[0004] In practical applications, there are scenarios where SpringCloud applications and Service Mesh applications are used simultaneously. Due to the significant differences between the two microservice architectures and their working principles, it is impossible to call between SpringCloud applications and Service Mesh applications, increasing the complexity and maintenance cost of the system. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide an application calling method, a computer device, and a storage medium, which can realize the calling of a target microservice architecture such as a SpingCloud application by a service mesh application, and realize the calling of a service mesh application by a target microservice architecture such as a SpingCloud application.
[0006] This application provides an application calling method applied to a service mesh. The method includes:
[0007] Receiving a call request for a first application; the first application is an application provided based on a target microservice architecture; the target microservice architecture is heterogeneous from the service mesh;
[0008] Through a control plane component of the service mesh, according to the call request for the first application, obtaining application information of the first application from a registration center of the target microservice architecture; the control plane component and the registration center are respectively configured with a target service;
[0009] Calling the first application according to the application information of the first application.
[0010] In one embodiment, the control plane component of the service mesh obtains the application information of the first application from the registration center of the target microservice architecture according to the call request for the first application, including:
[0011] Configuring the target service for the control plane component; the target service includes a messaging and collaboration platform service based on the Extensible Service Discovery Protocol;
[0012] Based on the target service, the control plane component obtains the first full amount of information based on the target microservice architecture from the registration center; the first full amount of information includes the application information of all applications registered in the registration center, and the first full amount of information at least includes the application information of the first application;
[0013] According to the call request for the first application, obtain the application information of the first application from the control plane component.
[0014] In one embodiment, the service mesh is configured with an edge proxy component; the obtaining the application information of the first application from the control plane component according to the call request for the first application includes:
[0015] Obtain the first full amount of information from the control plane component through the edge proxy component;
[0016] Through the edge proxy component, determine the application information of the first application from the first full amount of information according to the call request for the first application.
[0017] In one embodiment, the method further includes:
[0018] Monitor the second full amount of information of the service mesh; the second full amount of information includes the application information of all applications registered in the control plane component;
[0019] When it is monitored that the second full amount of information is updated, synchronize the updated second full amount of information to the target microservice architecture through the control plane component.
[0020] The application calling method provided by the above embodiments is applied to a service mesh. The method receives a call request for a first application, and through the control plane component of the service mesh, according to the call request for the first application, obtains the application information of the first application from the registry of the target microservice architecture, and calls the first application according to the application information of the first application; Since the control plane component of the service mesh and the registry of the target microservice architecture are respectively configured with the same target service, the control plane component can synchronously obtain the application information in the target microservice architecture from the registry through the target service; Based on this, the application based on the service mesh can obtain the application information of the first application, so that the first application can be called through the application information of the first application, and thus the service mesh's call to the target microservice architecture is realized, solving the problem that the service mesh cannot call the applications of heterogeneous target microservice architectures such as SpingCloud in the related art, improving the scalability and overall performance of the system, and reducing the development and maintenance difficulty.
[0021] This application provides an application calling method, which is applied to a target microservice architecture. The method includes:
[0022] Receiving a call request for a second application; the second application is an application provided based on a service mesh; the service mesh uses the application calling method as described above to call the first application; the target microservice architecture and the service mesh are heterogeneous to each other;
[0023] According to the call request for the second application, obtaining the application information of the second application from the registry of the target microservice architecture; a proxy plugin is mounted on the target microservice architecture, and the proxy plugin is used to obtain second full information from the control plane component of the service mesh, and the second full information at least includes the application information of the second application;
[0024] Calling the second application according to the application information of the second application.
[0025] In one of the embodiments, the method further includes:
[0026] Mounting the proxy plugin on the target microservice architecture; the proxy plugin and the control plane component respectively support the target protocol;
[0027] Based on the target protocol, obtaining the second full information based on the service mesh from the control plane component through the proxy plugin; the second full information includes the application information of all applications registered to the control plane component;
[0028] Sending the second full information to the registry through the proxy plugin.
[0029] In one embodiment, sending the second full amount of information to the registry through the proxy plugin includes:
[0030] Converting the format of the second full amount of information through the proxy plugin; the second full amount of information after format conversion meets the format requirements of the target microservice architecture;
[0031] Sending the second full amount of information after format conversion to the registry through the proxy plugin.
[0032] In one embodiment, the method further includes:
[0033] Monitoring the first full amount of information based on the target microservice architecture; the first full amount of information includes the application information of all applications registered in the registry;
[0034] When it is monitored that the first full amount of information is updated, synchronize the updated first full amount of information to the service mesh through the registry.
[0035] The present application provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.
[0036] The present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0037] The application calling method, computer device, and storage medium provided in the above embodiments. The method receives a call request for a second application, obtains the application information of the second application from the registry of the target microservice architecture according to the call request for the second application, and calls the second application according to the application information of the second application; since the target microservice architecture is mounted with a proxy plugin, and the proxy plugin can obtain the second full amount of information from the control plane component of the service mesh, and the second full amount of information at least includes the application information of the second application, therefore, the target microservice architecture obtains the application information of the second application based on the service mesh; based on this, the second application can be called through the application information of the second application. In this way, on the basis of realizing the call of the service mesh application to the target microservice architecture application, the call of the application based on the target microservice architecture to the application based on the service mesh is further realized, solving the problem that there is no call between the service mesh and heterogeneous target microservice architectures such as SpingCloud in the related art, improving the scalability and overall performance of the system, and reducing the development and maintenance difficulty. Description of the Drawings
[0038] Figure 1It is an application environment diagram of an application calling method in an embodiment;
[0039] Figure 2 It is a schematic structural diagram of a target microservice architecture in an embodiment;
[0040] Figure 3 It is a schematic structural diagram of a service mesh in an embodiment;
[0041] Figure 4 It is a schematic flowchart of an application calling method in an embodiment;
[0042] Figure 5 It is a schematic structural diagram of a target microservice architecture and a service mesh in an embodiment;
[0043] Figure 6 It is a schematic flowchart of an application calling method in another embodiment;
[0044] Figure 7 It is a schematic flowchart of an application calling method in yet another embodiment;
[0045] Figure 8 It is a schematic structural diagram of a target microservice architecture and a service mesh in another embodiment;
[0046] Figure 9 It is a schematic flowchart of an application calling method in still another embodiment;
[0047] Figure 10 It is a schematic structural diagram of a target microservice architecture and a service mesh in yet another embodiment;
[0048] Figure 11 It is a structural block diagram of an application calling device in an embodiment;
[0049] Figure 12 It is a structural block diagram of an application calling device in another embodiment;
[0050] Figure 13 It is an internal structural diagram of a computer device in an embodiment. Detailed implementation manners
[0051] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It can be understood that with the continuous development and maturity of the microservices architecture based on service mesh, many projects will use the microservices architecture based on service mesh as the microservices architecture. However, existing projects use the microservices architecture based on SpringCloud. Since the service registration and discovery mechanisms of SpringCloud applications and service mesh applications are different, applications of the two architectures cannot call each other, or communicate with each other.
[0053] Based on the above, the embodiments of the present application provide an application calling method, which can implement the call of SpringCloud applications by service mesh applications, and can also implement the call of service mesh applications by SpringCloud applications, thus realizing the mutual call of service mesh applications and SpingCloud applications, that is, realizing the mutual communication of applications between mutually heterogeneous microservices architectures, which helps to improve the overall performance and scalability of the system and reduce the development and maintenance difficulties.
[0054] The application calling method provided by the embodiments of the present application can be applied to Figure 1 the application environment shown. Among them, the target microservices architecture 10 and the service mesh 20, such as SpingCloud, are two mutually heterogeneous microservices architectures. Among them, the target microservices architecture 10, such as SpingCloud, is a microservices framework based on the Java language, which provides a series of tools and components for building distributed systems. The service mesh 20 is an infrastructure layer for handling inter-service communication. Its core idea is to separate the logic of inter-service communication from the application program and deploy it in the form of an independent proxy process beside each service instance, responsible for functions such as inter-service communication, load balancing, circuit breaking, and security. The service mesh 20 is a new type of microservices architecture in the cloud native era. It solves the problem of mutual communication between services in a non-intrusive manner and has no restrictions on the development language. Based on the application calling method provided by the embodiments of the present application, the mutual call of applications between the service mesh 20 and the target microservices architecture 10, such as SpingCloud, can be realized.
[0055] In some embodiments, as Figure 2 shown, a schematic structural diagram of a target microservices architecture 10 is provided. Combining Figure 2As shown, the target microservice architecture 10 can be configured with at least one first application 11 (or at least one type of service). Moreover, the target microservice architecture 10 can be configured with a registry 12 and a service invocation component 13. Among them, each first application 11 is correspondingly configured with a service invocation component 13. Taking the target microservice architecture 10 including SpingCloud as an example, SpingCloud includes the registry Nacos and the service invocation component feign. SpringCloud can achieve service registration and discovery through the registry Nacos, and can achieve the same communication between services through the service invocation component feign. Feign can obtain the service list of the registry Nacos. When a service call needs to be initiated, the corresponding service list is matched by the service name, and the service is called.
[0056] In some embodiments, as Figure 3 shown, a schematic structural diagram of a service mesh 20 is provided. Combining Figure 3 shown, the service mesh 20 can be configured with at least one second application 21 (or at least one type of service). Moreover, the service mesh 20 is configured with a control plane component 22 and an edge proxy component 23. Among them, each second application 21 is correspondingly configured with an edge proxy component 23, and the second application 21 and the corresponding edge proxy component 23 are deployed in a container 24. Among them, the container 24 can be built based on Kubernetes (container orchestration platform, abbreviated as K8s). Taking the service mesh including Istio as an example, the service mesh Istio includes the control plane component pilot and the edge proxy component Envoy; among them, pilot is responsible for service discovery and intelligent routing; Envoy, as a data platform proxy, can achieve mutual communication between applications. When the service starts, Envoy sends the service information to Pilot, and Pilot will synchronize the latest service information to the Envoy of other services. When services need to communicate with each other, Envoy can obtain the corresponding service list and initiate a call to the service.
[0057] It should be noted that in the embodiments of the present application, an application can be understood as a service, and a service can also be understood as an application. The terms "first", "second", etc. used in the present application can be used in this article to describe various objects, but these objects are not limited by these terms. These terms are only used to distinguish the first object from another object. For example, without departing from the scope of the present application, the first application 11 can be called the second application 21, and similarly, the second application 21 can be called the first application 11. Both the first application 11 and the second application 21 are applications, but they are not the same application.
[0058] In some embodiments, combining Figures 1 to 5, an application calling method is provided. Taking the application calling method applied to the service mesh 20 as an example for illustration, this method may include the following steps.
[0059] S402: Receive a call request for the first application.
[0060] The first application 11 is an application provided based on the target microservice architecture 10. The target microservice architecture 10 and the service mesh 20 are heterogeneous to each other. Exemplarily, the target microservice architecture 10 includes SpingCloud; correspondingly, the first application 11 is an application based on SpingCloud.
[0061] The call request for the first application 11 can be initiated by the service mesh 20. The call request for the first application 11 is used to call the first application 11 in the target microservice architecture 10.
[0062] In the application, it is possible to receive a call request from the service mesh 20 for the SpingCloud application.
[0063] S404: Through the control plane component of the service mesh, obtain the application information of the first application from the registration center of the target microservice architecture according to the call request for the first application.
[0064] The control plane component 22 is responsible for managing all services in the service mesh 20, including configuration, service discovery, certificate distribution, etc. It does not directly handle the communication between services, but manages and configures the proxies in the data plane to route traffic and enforce policies. Taking the service mesh Istio as an example, correspondingly, the control plane component 22 may include pilot, and pilot is responsible for service discovery and intelligent routing.
[0065] The registration center 12 of the target microservice architecture 10 is a dynamic service discovery, configuration management, and service management platform, which can be used to build cloud-native applications. The core functions of the registration center 12 mainly include service discovery and health check, dynamic configuration service, and dynamic DNS service, etc. Taking the target microservice architecture 10 as SpingCloud as an example, correspondingly, the registration center 12 may include Nacos.
[0066] Among them, the control plane component 22 and the registration center 12 are respectively configured with target services. That is, the control plane component 22 based on the service mesh 20 and the registration center 12 based on the target microservice architecture 10 are respectively configured with the same service.
[0067] In some embodiments, the target service may be a service natively provided by the service mesh 20. In this regard, the target microservice architecture 10 can be pre-configured with the target service. In some embodiments, the target service may be a service natively provided by the target microservice architecture 10. In this regard, the service mesh 20 can be pre-configured with the target service. In this way, the service mesh 20 and the target microservice architecture 10 can be separately configured with the target service, so that the service mesh 20 can synchronize the application information of the target microservice architecture 10 from the target microservice architecture 10 based on the target service.
[0068] It can be understood that since the control plane component 22 of the service mesh 20 and the registry 12 of the target microservice architecture 10 are separately configured with the same target service, the control plane component 22 can synchronously obtain the application information in the target microservice architecture 10 from the registry 12 through the target service. Based on this, when receiving a call request for the first application 11 in the target microservice architecture 10, the terminal can obtain the application information of the first application 11 from the registry 12 through the control plane component 22 according to the call request for the first application 11.
[0069] In some embodiments, the call request for the first application 11 includes a first application identifier, which can be understood as the unique identifier of the first application 11. Based on this, the terminal can obtain the application information of the first application 11 from the registry 12 through the control plane component 22 according to the first application identifier. The application information of the first application 11 is used to call the first application 11 and may include all information related to calling the first application 11. For example, the application information includes service registration information, service instance list, etc., which are not limited herein.
[0070] S406: Call the first application according to the application information of the first application.
[0071] In the application, the service mesh 20 can send a call request to the first application 11 according to the application information of the first application 11 and receive the processing result returned by the first application 11, so as to realize the call of the first application 11 by the service mesh 20.
[0072] Taking the service mesh Istio, the control plane component pilot, the target microservice architecture SpingCloud, and the registry Nacos as an example, the service mesh 20 can obtain the application information of the SpingCloud application from Nacos through the pilot according to the call request for the SpingCloud application, and realize the call of the SpingCloud application according to the obtained application information, thereby realizing the call of the SpingCloud application by the service mesh application.
[0073] The application calling method provided by the above embodiments is applied to the service mesh 20. This method receives a call request for the first application 11, and through the control plane component 22 of the service mesh 20, according to the call request for the first application 11, obtains the application information of the first application 11 from the registration center 12 of the target microservice architecture 10, and calls the first application 11 according to the application information of the first application 11. Since the control plane component 22 of the service mesh 20 and the registration center 12 of the target microservice architecture 10 are respectively configured with the same target service, the control plane component 22 can synchronously obtain the application information in the target microservice architecture 10 from the registration center 12 through the target service. Based on this, the application based on the service mesh 20 can obtain the application information of the first application 11, so that the call to the first application 11 can be realized through the application information of the first application 11, and then the call of the service mesh 20 to the target microservice architecture 10 is realized, solving the problem that the application between the service mesh 20 and the heterogeneous target microservice architecture 10 (such as SpingCloud) cannot be called in the related technology, improving the scalability and overall performance of the system, and reducing the development and maintenance difficulty.
[0074] In some embodiments, as Figure 6 shown, S404, through the control plane component of the service mesh, according to the call request for the first application, obtaining the application information of the first application from the registration center of the target microservice architecture may include the following steps.
[0075] S602: Configure the target service for the control plane component.
[0076] Among them, the target service may include a messaging and collaboration platform (MCP-over-XDS) service based on the extensible service discovery protocol.
[0077] It can be understood that the registration center 12 of the target microservice architecture 10, such as Nacos of SpingCloud, natively provides the MCP-over-XDS service, while the service mesh 20 does not natively provide the MCP-over-XDS service. In this regard, the control plane component 22 of the service mesh 20, such as pilot, can be configured with the MCP-over-XDS service.
[0078] In the application, as Figure 5 shown, the control plane component pilot in the service mesh Istio can be configured with the MCP-over-XDS service. Based on this, after pilot is started, pilot can establish a gRPC (remote interface call) link with the MCP-over-XDS service.
[0079] S604: Based on the target service, obtain the first full amount of information based on the target microservice architecture from the registration center through the control plane component.
[0080] The first full amount of information includes the application information of all applications registered with the registration center 12. The first full amount of information includes at least the application information of the first application 11. It should be noted that the first full amount of information refers to all information related to the target microservice mesh 20, including but not limited to registration information and service lists. Among them, the registration center 12 of the target microservice architecture 10 includes the first full amount of information. For example, the registration center Nacos caches the registered application registration information, which can be briefly recorded as NacosServer information.
[0081] In the application, the service mesh 20 (including the first application 11) can be registered with the registration center 12, and the registration center 12 stores the first full amount of information of the service mesh 20, and this first full amount of information includes the information of the first application 11. In this way, the control plane component 22 in the service mesh 20 can synchronously obtain the first full amount of information from the registration center 12 based on the target service. For example, when registering a SpingCloud application with the registration center Nacos, the control plane component pilot can synchronously obtain the first full amount of information in SpingCloud from the registration center Nacos based on the MCP-over-XDS service.
[0082] It can be understood that the application information formats of heterogeneous microservice architectures are different, or rather, the application information structures of heterogeneous microservice architectures are different. In this regard, when the control plane component 22 synchronizes the first full amount of information based on the target service, it can also convert the format of the first full amount of information based on the target service, so as to obtain the first full amount of information that meets the format requirements of the service mesh 20, providing support for the application of the service mesh 20 to call the application based on the target microservice architecture 10. Taking the registration center Nacos and the control plane component pilot as an example, the service mesh 20 can convert the NacosServer information into an Endpoint list based on the MCP-over-XDS service, and this Endpoint list meets the format requirements of the service mesh 20.
[0083] S606: Obtain the application information of the first application from the control plane component according to the call request for the first application.
[0084] Exemplarily, the call request for the first application 11 includes a first application identifier, and the first application identifier can be understood as the unique identifier of the first application 11; based on this, through the control plane component 22, the application information of the first application 11 can be matched from the first full amount of information according to the first application identifier. In this way, the application based on the service mesh 20 can initiate a call to the first application 11 according to the application information of the first application 11.
[0085] The application calling method provided by the above embodiments configures a target service for the control plane component 22. Based on the target service, through the control plane component 22, the first full amount of information based on the target microservice architecture 10 is obtained from the registry 12. According to the call request for the first application 11, the application information of the first application 11 is obtained from the control plane component 22. Since the registry 12 of the target microservice architecture 10, such as Nacos of SpingCloud, natively provides the target service, i.e., the MCP-over-XDS service, while the service mesh 20 does not natively provide the MCP-over-XDS service. In this regard, in this application, the control plane component 22 of the service mesh 20, such as pilot, is configured with the MCP-over-XDS service, so that the control plane component 22 can establish a link with the registry 12 based on the MCP-over-XDS service and synchronously obtain the first full amount of information of all applications registered in the registry 12 from the registry 12. Furthermore, the applications based on the service mesh 20 can realize the call to the applications of the target microservice architecture 10.
[0086] Please continue to refer to Figures 1 to 6 , in some embodiments, the service mesh 20 is configured with an edge proxy component 23, and the edge proxy component 23 can be used for the data plane of the service mesh 20.
[0087] Based on the above, in S606, according to the call request for the first application, obtaining the application information of the first application from the control plane component may include: obtaining the first full amount of information from the control plane component through the edge proxy component; determining the application information of the first application from the first full amount of information according to the call request for the first application through the edge proxy component.
[0088] In this way, the applications in the service mesh 20 can realize the call to the applications of the target microservice architecture 10 based on the edge proxy component 23, improving the scalability of the system.
[0089] Taking the target microservice architecture 10 as SpingCloud as an example, if the second application 21 in the service mesh Istio needs to call the first application 11 in the target microservice architecture 10, such as SpingCloud, in this case, the edge proxy component Envoy of the second application 21 receives the call request for the first application 11. The edge proxy component Envoy can obtain the first full amount of information from the control plane component pilot and match the application information of the first application 11 from the first full amount of information according to the call request. Thus, the second application 21 can initiate a call to the first application 11 based on the edge proxy component Envoy.
[0090] Please continue to refer to Figures 1 to 6, in some embodiments, the application invocation method further includes: listening for the second full information of the service mesh; in the case where the second full information is monitored to be updated, synchronize the updated second full information to the target microservice architecture through the control plane component.
[0091] In this way, the second full information in the service mesh 20 is synchronized to the target microservice architecture 10, providing support for the application in the target microservice architecture 10 to invoke the service mesh 20.
[0092] The second full information includes the application information of all applications registered to the control plane component 22. Listening for the second full information can be understood as listening for the applications in the service mesh 20. The second full information being updated can be understood as the applications in the service mesh 20 changing; where the application change includes, but is not limited to, adding or deleting applications in the service mesh 20, and changes in the registered services.
[0093] In the application, the applications in the service mesh 20 can be listened for, and in the case where the applications in the service mesh 20 are monitored to be updated, through the control plane component 22, synchronize the updated second full information to the proxy plugin 14 in the target microservice architecture 10 based on a target protocol such as the XDS (Extensible Discovery Service) protocol, such as the agent of the proxy plugin of SpingCloud. For a specific introduction, refer to the embodiments of the application invocation method applied to the target microservice architecture SpingCloud below.
[0094] Based on a similar inventive concept, in some embodiments, the present application further provides an application invocation method, which is applied to a target microservice architecture such as SpingCloud, can realize the invocation of the service mesh by the target microservice architecture, solves the problem that the target microservice architecture and the service mesh cannot be invoked, improves the scalability and overall performance of the system, and reduces the development and maintenance difficulty.
[0095] In some embodiments, such as Figure 7 and Figure 8 shown, an application invocation method is provided. Taking the application invocation method applied to the target microservice architecture 10 such as SpingCloud as an example for illustration, the method may include the following steps.
[0096] S702: Receive a call request for the second application.
[0097] The second application 21 is an application provided based on the service mesh 20. Among them, the target microservice architecture 10 and the service mesh 20 are heterogeneous to each other. The service mesh 20 can use the aforementioned application calling method to call the first application 11 based on the target microservice architecture 10. For specific details, please refer to the relevant introduction above and will not be elaborated here.
[0098] The call request for the second application 21 can be initiated by the target microservice architecture 10. The call request for the second application 21 is used to call the second application 21 in the service mesh 20.
[0099] In the application, it is possible to receive a call request from the target microservice architecture 10, such as a SpingCloud application, to the service mesh 20, such as the second application 21.
[0100] S704: According to the call request for the second application, obtain the application information of the second application from the registration center of the target microservice architecture.
[0101] The target microservice architecture 10 is mounted with a proxy plugin 14. Exemplarily, each first application 11 in the target microservice architecture 10 is respectively mounted with a proxy plugin 14. Taking the target microservice architecture 10 as SpingCloud as an example, correspondingly, the proxy plugin 14 can be an agent.
[0102] The proxy plugin 14 is used to obtain the second full information from the control plane component 22 of the service mesh 20. Exemplarily, the control plane component 22 is configured with an interface; correspondingly, the proxy plugin 14 can be used to access the interface of the control plane component 22; based on this, the proxy plugin 14 can obtain the second full information from the control plane component 22 through the interface of the control plane component 22. Exemplarily, the interface includes an interface based on the XDS protocol.
[0103] Among them, the second full information may include the application information of all applications registered to the control plane component 22. The second full information at least includes the application information of the second application 21. It should be noted that the second full information refers to the information related to all service meshes 20 registered to the control plane component 22, including but not limited to registration information, service list, etc. Exemplarily, the second full information includes an Endpoint list.
[0104] In the application, after the proxy plugin 14 obtains the second full information from the control plane component 22, it can send the second full information to the registration center 12, and integrate and cache the first full information and the second full information locally. Among them, the first full information refers to the information related to all target microservice architectures 10 registered to the registration center 12.
[0105] In some embodiments, the call request for the second application 21 includes a second application identifier, which can be understood as the unique identifier of the second application 21. Based on this, the service call component 13 can match the application information of the second application 21 from the second full information according to the second application identifier. The application information of the second application 21 is used to call the second application 21 and may include all information related to calling the second application 21. For example, the application information includes service registration information, service instance list, etc., which are not limited herein.
[0106] In the application, the service call component 13 can obtain the application information of the second application 21 from all the integrated full information according to the call request for the second application 21.
[0107] S706: Call the second application according to the application information of the second application.
[0108] In the application, the target microservice architecture 10 can send a call request to the second application 21 according to the application information of the second application 21 and receive the processing result returned by the second application 21, thereby realizing the call of the second application 21 by the target microservice architecture 10, that is, realizing the call of the service mesh 20 by the target microservice architecture 10.
[0109] Taking the service mesh Istio including the control plane component pilot and the edge proxy component Envoy, and the target microservice architecture SpingCloud including the registry Nacos, the proxy plugin agent, and the service call component feign as an example, the SpingCloud application can synchronously obtain the second full information from the pilot through the agent and send it to the registry Nacos; in the case of receiving a call request for the service mesh 20, SpingCloud can obtain the application information of the SpingCloud application from Nacos through feign according to the call request for the SpingCloud application, and realize the call of the SpingCloud application through feign, thereby realizing the call of the service mesh 20 by the SpingCloud application.
[0110] The application calling method provided by the above embodiments is applied to the target microservice architecture 10. The method receives a call request for the second application 21, obtains the application information of the second application 21 from the registration center 12 of the target microservice architecture 10 according to the call request for the second application 21, and calls the second application 21 according to the application information of the second application 21. Since the target microservice architecture 10 is mounted with a proxy plugin 14, and the proxy plugin 14 can obtain the second full information from the control plane component 22 of the service mesh 20, and the second full information at least includes the application information of the second application 21. Therefore, the target microservice architecture 10 obtains the application information of the second application 21 based on the service mesh 20. Based on this, the call to the second application 21 can be realized through the application information of the second application 21. In this way, on the basis of realizing the call of the service mesh application to the target microservice architecture application, the call of the application based on the target microservice architecture 10 to the application based on the service mesh 20 is further realized, solving the problem that the service mesh 20 and the applications of the heterogeneous target microservice architecture 10 (such as SpingCloud) cannot be called in the related art, improving the scalability and overall performance of the system, and reducing the development and maintenance difficulty.
[0111] In some embodiments, such as Figure 8 and Figure 9 shown, the application calling method applied to the target microservice architecture 10 such as SpingCloud may further include the following steps.
[0112] S902: Mount a proxy plugin to the target microservice architecture.
[0113] The proxy plugin 14 and the control plane component 22 respectively support the target protocol. Exemplarily, the service mesh 20 is Istio, and the control plane component 22 is pilot; correspondingly, the target protocol includes the XDS protocol.
[0114] It can be understood that the control plane component pilot natively supports the XDS protocol, or rather, the control plane component pilot provides an interface that supports the XDS protocol. In this regard, in this application, a proxy plugin 14 is mounted to the target microservice architecture 10 such as SpingCloud, so as to access the interface of the pilot that supports the XDS protocol through the proxy plugin 14.
[0115] Exemplarily, through bytecode enhancement technology, the logic for the target microservice architecture 10 to obtain the second full amount of information from the control plane component 22 can be enhanced. That is, by mounting a proxy plugin 14 on the target microservice architecture 10, the synchronization function of the second full amount of information is realized. Among them, bytecode enhancement technology refers to operating on the generated.class file (containing Java bytecode) in the post-compilation stage of a Java application to dynamically modify or add functions; this technology can enhance the behavior of a class when the program is running or loaded without changing the original source code.
[0116] It can be understood that the target microservice architecture SpingCloud is a Java-based microservice architecture. Based on this, in this application, through bytecode enhancement technology, a proxy plugin agent is mounted in each application in SpingCloud. Without changing the SpingCloud source code, the performance of obtaining the application information of the service mesh 20 from the service mesh 20 is increased, and the impact on the original architecture is small and it is easy to implement.
[0117] S904: Based on the target protocol, obtain the second full amount of information based on the service mesh from the control plane component through the proxy plugin.
[0118] The second full amount of information includes the application information of all applications registered in the control plane component 22, and the second full amount of information at least includes the application information of the second application 21.
[0119] Based on the foregoing, it can be known that the proxy plugin 14 and the control plane component 22 support the same target protocol, that is, the XDS protocol. In this way, the proxy plugin 14 can obtain the second full amount of information from the control plane component 22 based on the XDS protocol. In the application, the proxy plugin 14 can periodically obtain the second full amount of information to improve the synchronization and consistency of the application information between the target microservice architecture 10 and the service architecture.
[0120] S906: Send the second full amount of information to the registration center through the proxy plugin.
[0121] After the proxy plugin 14 obtains the second full amount of information, it can send the second full amount of information to the registration center 12. The registration center 12 can integrate the second full amount of information with the first full amount of information, and all the integrated full amount of information can be cached locally. In this way, it helps to directly obtain the application information from the local, realize the call of the application, and improve the data processing performance.
[0122] In the application, the registration center Nacos may store the first full amount of information in a pre-established data structure for storing application information, such as serviceInfoMap. Based on this, the registration center 12 can integrate the second full amount of information sent by the proxy plugin 14 with the first full amount of information by calling an integration function based on this data structure, such as serviceInfoMap.put().
[0123] For the application call method provided in the above embodiment, the proxy plugin 14 is mounted on the target microservice architecture 10. Based on the target protocol, the proxy plugin 14 obtains the second full amount of information based on the service mesh 20 from the control plane component 22, and sends the second full amount of information to the registration center 12 through the proxy plugin 14. Thus, the registration center 12 can integrate the second full amount of information with the first full amount of information to obtain all the full amount of information of the service mesh 20 and the target microservice architecture 10. In this way, it provides support for the target microservice architecture 10 to call the service mesh 20, so that not only can the call between the target microservice architectures 10 be realized, but also the call of the target microservice architecture 10 to the service mesh 20 can be realized, improving the system performance.
[0124] Please continue to refer to Figure 8 and Figure 9 , in some embodiments, S906, sending the second full amount of information to the registration center through the proxy plugin includes: performing format conversion on the second full amount of information through the proxy plugin; sending the format-converted second full amount of information to the registration center through the proxy plugin.
[0125] Among them, the format-converted second full amount of information meets the format requirements of the target microservice architecture 10.
[0126] It can be understood that the application information formats of heterogeneous microservice architectures are different, or rather, the application information structures of heterogeneous microservice architectures are different. In this regard, after the proxy plugin 14 obtains the second full amount of information from the control plane component 22, it can perform format conversion on the second full amount of information to obtain the format requirements that meet the target microservice architecture 10. Taking the registration center Nacos and the control plane component pilot as an example, the proxy plugin agent can obtain the Endpoint list from the pilot based on the XDS protocol and convert the Endpoint list into NacosServer information, and the NacosServer information meets the format requirements of the service mesh 20.
[0127] During the process of the control plane component 22 synchronizing the first full amount of information based on the target service, it can also perform format conversion on the second full amount of information based on the target service, so as to obtain the second full amount of information that meets the format requirements of the target microservice architecture 10, providing support for the application of the target microservice architecture 10 to call the application based on the service mesh 20.
[0128] Please continue to refer to Figure 8 and Figure 9 In some embodiments, the application call method further includes: listening to the first full amount of information based on the target microservice architecture; in the case where the first full amount of information is monitored to be updated, synchronize the updated first full amount of information to the service mesh through the registry center.
[0129] In this way, the first full amount of information in the target microservice architecture 10 is synchronized to the service mesh 20, providing support for the application in the service mesh 20 to call the application in the target microservice architecture 10.
[0130] The first full amount of information includes the application information of all applications registered in the registry center 12. Listening to the first full amount of information can be understood as listening to the applications in the target microservice architecture 10. When the first full amount of information is updated, it can be understood that the applications in the target microservice architecture 10 have changed; where the change of the application includes, but is not limited to, adding or deleting applications in the target microservice architecture 10, and changes in the registered services.
[0131] In the application, the applications in the target microservice architecture 10 can be listened to, and in the case where the applications in the target microservice architecture 10 are monitored to be updated, through the registry center 12 such as Nacos of SpingCloud, the updated first full amount of information is synchronized to the control plane component 22 in the service mesh 20, such as pilot of Istio, based on the MCP-over-XDS service. The specific implementation process for the registry center 12 to synchronously obtain the first full amount of information from the control plane component 22 can refer to the foregoing application call method applied to the service mesh 20, which will not be elaborated here.
[0132] It should be noted that in the embodiments of the present application, the service mesh 20 can implement the service mesh 20 to call the target microservice architecture 10 such as SpingCloud application based on the foregoing application call method applied to the service mesh 20; in addition, the target microservice architecture 10 such as SpingCloud can implement the target microservice architecture 10 such as SpingCloud application to call the service mesh 20 based on the foregoing application call method applied to the target microservice architecture 10; in this way, the mutual call between the service mesh 20 and the target microservice architecture 10 such as SpingCloud application is realized, or rather, the mutual communication.
[0133] In one embodiment, in combination with Figures 1 to 10 , an application call method is provided. Taking the consumer application 121 and the provider application 211 as examples, this application call method will be described.
[0134] The consumer application 111 is a Spring Cloud application, and the provider application 211 is the service mesh 20. The implementation process of the consumer application 111 calling the provider application 211 is introduced below.
[0135] In the application, the consumer application 111 is registered with the registration center Nacos. The specific configuration content includes:
[0136] Spring:
[0137] Cloud: / / Spring Cloud microservice architecture
[0138] Nacos: / / Registration center Nacos
[0139] Discovery: / / Service registration
[0140] Server-addr: 127.0.0.1:8848 / / Service address
[0141] Group: default
[0142] Namespace: public
[0143] Service: consumer / / consumer application
[0144] Username: nacos
[0145] Password: XXXXXXX
[0146] For ease of understanding, the text after the above " / / " is the annotation content. Based on the above, a proxy plugin agent based on the Java language, which can be simply called javaagent, is mounted on the consumer application 111. The javaagent is used to synchronize the application registration information of the service mesh 20, that is, the second full amount of information. Specifically, the javaagent parameter and the environment variable profile.micro.service.envoy.xds.server can be added to the startup command to indicate the service information address in the service mesh 20. The specific configuration is as follows:
[0147] java - javaagent:agent.jar - Dprofile.micro.service.envoy.xds.server = istiod.istio - system.svc:15010 - jar consumer.jar
[0148] After the above configuration, the SpringCloud service, i.e., the consumer application 111, can be registered in the Nacos registry 12 and mount the javaagent. The javaagent will synchronize the application registration information in the service mesh 20, such as the Endpoint list, through the XDS protocol.
[0149] In the application, the consumer application 111 obtains the Endpoint list from the pilot based on the XDS protocol through the javaagent, converts the Endpoint list into NacosServer information and sends it to Nacos. Nacos integrates the NacosServer information of the service mesh 20 with the NacosServer information of the SpingCloud application and caches it locally. When the consumer application 111 calls the provider application 211 in the service mesh 20, it can obtain the application information of the provider application 211 from Nacos through feign, so as to initiate a call to the provider application 211.
[0150] The following introduces the implementation process of the provider application 211 calling the consumer application 111.
[0151] First, configure the MCP-over-XDS service for the control plane component pilot in the service mesh Istio. In this way, the pilot can establish a connection with the Nacos registry through the MCP-over-XDS service. In the application, the pilot can synchronize the service registration information in Nacos, i.e., the first full amount of information, such as NacosServer information, through the MCP-over-XDS protocol. The configuration of the MCP-over-XDS service for the pilot is as follows:
[0152] configSources:
[0153] - address: xds: / / 127.0.0.1:18848
[0154] Then, deploy the provider application 211 in K8s.
[0155] In the application, the pilot can obtain the first full amount of information of the SpingCloud application from Nacos. When the provider application 211 calls the consumer application 111, the provider application 211 can obtain the application information of the consumer application 111 from the pilot through the corresponding edge proxy component Envoy, so as to initiate a call to the consumer application 111.
[0156] After the consumer application 111 and the provider application 211 are respectively deployed in the above manner, the consumer application 111 and the provider application 211 can call each other, that is, the consumer application 111 and the provider application 211 can communicate with each other. It should be noted that the above is configured with the consumer application 111 as a SpingCloud application and the provider application 211 as the service mesh 20. In the application, the SpingCloud application and the service mesh 20 can be correspondingly configured according to the actual scenario to achieve communication between the two applications.
[0157] In the application calling method provided by the above embodiment, when the service mesh 20 calls the SpringCloud application, Envoy can obtain the information of the SpringCloud application and initiate a call to the SpringCloud application. When the SpringCloud application calls the service mesh 20, javaagent enhances the method for obtaining the service list, and the information of the service mesh 20 is synchronized to the service list. The feign component can then obtain the information of the service mesh 20 and initiate a call to the service mesh 20. In this way, the mutual communication between the SpingCloud application and the service mesh 20 is realized, the scalability and overall performance of the system are improved, and the development and maintenance difficulties are reduced.
[0158] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0159] Based on the same inventive concept, the embodiment of the present application also provides an application calling device for implementing the above-mentioned application calling method. The implementation solution provided by this device to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the application calling device provided below can refer to the limitations on the application calling method in the above text and will not be repeated here.
[0160] In some embodiments, such as Figure 11As shown in the figure, an application calling device 1100 is provided, which is applied to a service mesh. The application calling device 1100 includes: a first receiving module 1101, a first obtaining module 1102, and a first calling module 1103. Among them, the first receiving module 1101 is used to receive a call request for a first application; the first application is an application provided based on a target microservice architecture; the target microservice architecture and the service mesh are heterogeneous to each other. The first obtaining module 1102 is used to obtain the application information of the first application from the registration center of the target microservice architecture according to the call request for the first application through the control plane component of the service mesh; the control plane component and the registration center are respectively configured with a target service. The first calling module 1103 is used to call the first application according to the application information of the first application.
[0161] The above application calling device 1100 receives a call request for the first application through the first receiving module 1101; the first application is an application provided based on the target microservice architecture. The first obtaining module 1102 obtains the application information of the first application from the registration center of the target microservice architecture according to the call request for the first application through the control plane component of the service mesh, and the first calling module 1103 calls the first application according to the application information of the first application; since the control plane component of the service mesh and the registration center of the target microservice architecture are respectively configured with the same target service, the control plane component can synchronously obtain the application information in the target microservice architecture from the registration center through the target service; based on this, the application based on the service mesh can obtain the application information of the first application, so that it can call the first application through the application information of the first application, and thus realizes the call of the application of the target microservice architecture by the service mesh application, solves the problem that the service mesh and the application of the heterogeneous target microservice architecture (such as SpingCloud) cannot be called in the related art, improves the scalability and overall performance of the system, and reduces the development and maintenance difficulty.
[0162] In some embodiments, the first obtaining module is further used to configure the target service for the control plane component; the target service includes a messaging and collaboration platform service based on the Extensible Service Discovery Protocol; based on the target service, through the control plane component, obtain the first full amount of information based on the target microservice architecture from the registration center; the first full amount of information includes the application information of all applications registered in the registration center, and the first full amount of information at least includes the application information of the first application; obtain the application information of the first application from the control plane component according to the call request for the first application.
[0163] In some embodiments, the service mesh is configured with an edge proxy component. The first obtaining module is further used to obtain the first full amount of information from the control plane component through the edge proxy component; determine the application information of the first application from the first full amount of information according to the call request for the first application through the edge proxy component.
[0164] In some embodiments, the application calling device further includes a first monitoring module and a first synchronization module. The first monitoring module is configured to monitor the second full information of the service mesh; the second full information includes the application information of all applications registered to the control plane component. The first synchronization module is configured to, when it is monitored that the second full information is updated, synchronize the updated second full information to the target microservices architecture through the control plane component.
[0165] In some embodiments, as Figure 12 shown, an application calling device 1200 is provided, which is applied to a target microservices architecture such as SpingCloud. The application calling device 1200 includes: a second receiving module 1201, a second obtaining module 1202, and a second calling module 1203. The second receiving module 1201 receives a call request for a second application; the second application is an application provided based on the service mesh; the service mesh can call a first application by using the foregoing application calling method; the target microservices architecture and the service mesh are heterogeneous to each other. The second obtaining module 1202 is configured to obtain the application information of the second application from the registry of the target microservices architecture according to the call request for the second application; a proxy plugin is mounted on the target microservices architecture, and the proxy plugin is configured to obtain the second full information from the control plane component of the service mesh, and the second full information at least includes the application information of the second application. The second calling module 1203 is configured to call the second application according to the application information of the second application.
[0166] The above application calling device 1200 receives a call request for a second application through the second receiving module 1201; the second application is an application provided based on the service mesh. The second obtaining module 1202 obtains the application information of the second application from the registry of the target microservices architecture according to the call request for the second application, and the second calling module 1203 calls the second application according to the application information of the second application. Since a proxy plugin is mounted on the target microservices architecture, and the proxy plugin can obtain the second full information from the control plane component of the service mesh, and the second full information at least includes the application information of the second application, therefore, the target microservices architecture obtains the application information of the second application based on the service mesh; based on this, the second application can be called through the application information of the second application, thereby realizing the call of the application based on the service mesh by the application based on the target microservices architecture, solving the problem that applications between the service mesh and the heterogeneous target microservices architecture (such as SpingCloud) cannot be called in the related art, improving the scalability and overall performance of the system, and reducing the development and maintenance difficulty.
[0167] In some embodiments, the application calling device method further includes a mounting module, which is used to mount a proxy plugin to the target microservice architecture; the proxy plugin and the control plane component respectively support the target protocol. The second obtaining module is further used to obtain second full information based on the service mesh from the control plane component through the proxy plugin based on the target protocol; the second full information includes the application information of all applications registered to the control plane component; and send the second full information to the registration center through the proxy plugin.
[0168] In some embodiments, the second obtaining module is further used to perform format conversion on the second full information through the proxy plugin; the second full information after format conversion meets the format requirements of the target microservice architecture; and send the second full information after format conversion to the registration center through the proxy plugin.
[0169] In some embodiments, the application calling device further includes a second listening module and a second synchronization module. Among them, the second listening module is used to listen to the first full information based on the target microservice architecture; the first full information includes the application information of all applications registered to the registration center. The second synchronization module is used to synchronize the updated first full information to the service mesh through the registration center when it is monitored that the first full information has been updated.
[0170] Each module in the above application calling device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of the processor, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0171] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 13 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an application calling method.
[0172] Those skilled in the art can understand, Figure 13The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0173] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the foregoing method are implemented.
[0174] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the foregoing method are implemented.
[0175] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the foregoing method are implemented.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties.
[0177] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0178] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0179] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An application calling method, characterized in that: Applied to a service grid, the method comprises: Receiving a call request for a first application; the first application is an application provided based on a target microservice architecture; the target microservice architecture and the service grid are heterogeneous; Obtaining application information of the first application from a registration center of the target microservice architecture through a control plane component of the service grid according to a call request to the first application; the control plane component and the registration center are respectively configured with a target service; The first application is called according to the application information of the first application.
2. The method according to claim 1, characterized in that The obtaining, through the control plane component of the service grid, application information of the first application from a registration center of the target microservice architecture according to a call request to the first application, includes: configuring the target service for the control plane component; the target service comprises a messaging and collaboration platform service based on an extensible service discovery protocol; Based on the target service, obtaining first full information based on the target microservice architecture from the registration center through the control plane component; the first full information includes application information of all applications registered to the registration center, and the first full information includes at least application information of the first application; According to the call request for the first application, application information of the first application is obtained from the control plane component.
3. The method according to claim 2, characterized in that The service grid is configured with an edge proxy component; and obtaining application information of the first application from the control plane component according to a call request to the first application includes: Obtaining the first full amount of information from the control plane component through the edge proxy component; The edge proxy component determines application information of the first application from the first full information according to a call request for the first application.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Monitoring second full information of the service grid; the second full information includes application information of all applications registered to the control plane component; When it is monitored that the second full amount of information is updated, the updated second full amount of information is synchronized to the target microservice architecture through the control plane component.
5. An application calling method, characterized in that: Applied to a target microservice architecture, the method comprises: Receiving a call request for a second application; the second application is an application provided based on a service grid; the service grid uses the application calling method according to any one of claims 1 to 4 to call the first application; the target microservice architecture and the service grid are heterogeneous; According to a call request for the second application, application information of the second application is obtained from a registration center of the target microservice architecture; the target microservice architecture is mounted with a proxy plug-in, and the proxy plug-in is used to obtain second full information from a control plane component of the service grid, where the second full information includes at least application information of the second application; The second application is called according to the application information of the second application.
6. The method according to claim 5, characterized in that The method further comprises: Mounting the proxy plug-in on the target microservice architecture; the proxy plug-in and the control plane component support the target protocol respectively; Based on the target protocol, obtaining second full information based on the service grid from the control plane component through the proxy plug-in; the second full information includes application information of all applications registered to the control plane component; The second full amount of information is sent to the registration center through the proxy plug-in.
7. The method according to claim 6, characterized in that The sending the second full amount of information to the registration center through the proxy plug-in includes: The second full amount of information is formatted by the proxy plug-in; the second full amount of information after format conversion meets the format requirements of the target microservice architecture; The second full amount of information after format conversion is sent to the registration center through the proxy plug-in.
8. The method according to claim 5, characterized in that The method further comprises: Monitoring first full information based on the target microservice architecture; the first full information includes application information of all applications registered to the registration center; When it is monitored that the first full amount of information is updated, the updated first full amount of information is synchronized to the service grid through the registration center.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Microservice invocation method, apparatus, system and device and readable storage medium
CN109246251A
Framework integration method and device, electronic equipment and storage medium
CN112988223A
Network system, network proxy method and equipment
CN113542437A
Containerized micro-service orchestration method and system for cloud edge heterogeneous environment, and medium
CN114138486A
Service management method and device and electronic equipment
CN116074372A
Cited By
Biological information MCP service calling method, system, equipment and medium
CN120336048A
Acquisition optimization method and device based on AI analysis
CN121233865A