CN112256351A - Implementation method of Feign component, micro-service calling method and device - Google Patents

Implementation method of Feign component, micro-service calling method and device Download PDF

Info

Publication number
CN112256351A
CN112256351A CN202011159522.8A CN202011159522A CN112256351A CN 112256351 A CN112256351 A CN 112256351A CN 202011159522 A CN202011159522 A CN 202011159522A CN 112256351 A CN112256351 A CN 112256351A
Authority
CN
China
Prior art keywords
meta
feign
information
component
service
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.)
Granted
Application number
CN202011159522.8A
Other languages
Chinese (zh)
Other versions
CN112256351B (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.)
Winning Health Technology Group Co Ltd
Original Assignee
Winning Health Technology Group 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 Winning Health Technology Group Co Ltd filed Critical Winning Health Technology Group Co Ltd
Priority to CN202011159522.8A priority Critical patent/CN112256351B/en
Publication of CN112256351A publication Critical patent/CN112256351A/en
Application granted granted Critical
Publication of CN112256351B publication Critical patent/CN112256351B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method for realizing a Feign component, a method and a device for calling micro-services, wherein the method for realizing the Feign component comprises the following steps: creating a main class of the Feign component; and the method for creating load balance is realized under the main class and is used for retrieving the micro-service instance corresponding to the meta-information according to the meta-information. And realizing the first JavaBean under the main class, wherein a meta-information acquisition method is realized in the first JavaBean, and the meta-information acquisition method allows the creation of load balanced method calls. And the meta-information obtaining method is used for obtaining the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist. Therefore, the Feign component has the capability of acquiring the meta-information, so that the corresponding micro-service instance can be determined according to the meta-information, and the Feign component can realize more flexible management of the micro-service cluster.

Description

Implementation method of Feign component, micro-service calling method and device
Technical Field
The application relates to the technical field of micro services, in particular to a method for realizing a Feign component, a method and a device for calling the micro services.
Background
In a traditional service architecture, the size of the service is within the controllable range of operation and maintenance personnel. When a plurality of nodes of a service are deployed, setting of service information is generally realized in a static configuration mode. In microservice applications, the number of service instances and the network addresses are dynamically changed, which presents a huge challenge to system operation and maintenance. Therefore, dynamic service registration and discovery is important.
Under the current mainstream spring cloud framework, the mutual calling between the micro-services is realized by adopting a Feign component. The Feign component obtains the micro-services registered in the service registration and discovery component according to the names of the micro-services.
However, in practical applications, considering other factors such as micro-service administration, when a micro-service registers in a service registration and discovery component, extra information is often put in, and the information is placed in a meta-information area of the service registration and discovery component. However, the information in the meta information area (hereinafter, the information in the meta information area is referred to as meta information) may be actually used for implementing the micro service call, thereby implementing some special functions (such as a non-inductive upgrade, etc.). However, under the current spring cloud framework, the Feign component cannot acquire meta-information from the service registration and discovery component, so that the Feign component can only call corresponding micro-services according to names of the micro-services, and thus the governance of the micro-service cluster is influenced.
Disclosure of Invention
An object of the embodiment of the present application is to provide a method for implementing a Feign component, a method and a device for invoking a micro service, so as to solve a problem that the Feign component cannot obtain meta information to implement micro service processing at present.
The embodiment of the application provides a method for realizing a Feign assembly, which comprises the following steps: creating a main class of the Feign component; a method for establishing load balance is realized under the main class; the method for creating the load balance is used for retrieving the micro service instance corresponding to the meta-information according to the meta-information; implementing a first JavaBean under the primary class; the first JavaBean is used for creating a Feign client; implementing a meta-information acquisition method in the first JavaBean, wherein the meta-information acquisition method allows the method for creating load balance to be called; the method for acquiring the meta-information is used for acquiring the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
In the implementation process, a method for creating load balance of the micro service instance corresponding to the meta-information can be retrieved according to the meta-information is implemented in the main class of the Feign component, and an obtaining method of the meta-information is implemented in the main class, so that the obtaining method of the meta-information can be called by the method for creating load balance. Therefore, the connection driving from the Feign component to the service registration and discovery component is realized through the meta-information acquisition method, so that the meta-information in the meta-information of the service registration and discovery component is acquired, and the meta-information is called by the method for establishing load balance. Therefore, the Feign component has the capability of acquiring the meta-information, so that the corresponding micro-service instance can be determined according to the meta-information, and the Feign component can realize more flexible administration of the micro-service cluster.
Further, implementing the first JavaBean under the primary class includes: creating a first sub-class under the main class, wherein the first sub-class inherits the Feign client; in the first sub-class, realizing an interface definition method of the Feign client; and in the first sub-class, realizing the method for acquiring the meta-information.
In the implementation mode, the first subclass can be fused with the framework by inheriting the Feign client, and the standard required by the framework is met. And because the interface definition method of the Feign client is realized, when other meta-information acquisition methods are newly added, the access to the whole Feign component can be realized through the interface definition method of the Feign client. Therefore, the first subclass obtained by the implementation method can meet the framework requirement, and the method for acquiring the meta-information is conveniently connected with the service registration and discovery component, so that the meta-information is acquired, and the method for creating the load balance is conveniently called.
Further, the method further comprises: implementing a second JavaBean under the primary class; the second JavaBean is a JavaBean used for creating a client factory mode for load balancing; the method of creating load balancing is implemented in the second JavaBean.
Further, implementing a second JavaBean under the primary class includes: creating a second sub-class under the main class; providing a first constructor in the second subclass; the parameters of the first constructor comprise a client factory class provided by a framework and a routing configuration class supporting hot loading; implementing a method of creating load balancing within the first constructor; the inclusion of the method of creating load balancing includes the meta-information.
Further, the method further comprises: a third JavaBean is also implemented under the primary class; the third JavaBean is a JavaBean used for creating a client factory mode supporting the load balance of the retry function; the third JavaBean has the method of creating load balancing implemented therein.
Further, implementing a third JavaBean under the primary class includes: creating a third sub-class under the main class; providing a second constructor in the third subclass; the parameters of the second constructor comprise a client factory class provided by a framework, a routing configuration class supporting hot loading and a load balancing retry factory class providing a retry strategy; implementing a method of creating load balancing within the second constructor; the inclusion of the method of creating load balancing includes the meta-information.
Further, the method for creating load balance has the implementation of finding service balance; and the entry parameter for realizing the search of the service balance is the meta-information, and the entry parameter is returned to be an object containing the micro-service instance which meets the requirement and is retrieved according to the meta-information.
Through the implementation process, the search of the micro-service instance through the meta-information can be realized, and therefore more flexible micro-service calling can be realized.
Further, the method further comprises: adding cut-in configuration in the starting program of the Feign component to guide the process to enter the main class when the project is started.
In the embodiment of the application, the cut-in configuration is added in the starting program of the Feign component, so that when a project is started, a process is guided to enter a main class, the acquisition of the meta-information is executed, the search of the micro-service instance is realized according to the meta-information, and the capability of the Feign component is expanded.
The embodiment of the application also provides a micro-service calling method, which comprises the following steps: adding a Feign component realized according to the realization method of any one of the preceding methods into the dependence of the project; and when the micro service is called, starting the Feign component to determine the required micro service instance.
Through the implementation process, the micro-service calling based on the meta-information can be achieved when the micro-service is called, and therefore the functions which are more flexible and rich than the calling mode based on the micro-service name can be achieved.
Further, after adding the Feign component to the dependency of the project, the method further comprises: adding an enabling item of the Feign component in a configuration file of the project, and setting the enabling item to enable.
In the implementation process, the configuration of the Feign component can be realized by configuring the enabling item, the start-stop control of the capacity of the Feign component for performing micro-service query based on the meta-information is realized, and the operator is given more abundant operation options.
The embodiment of the present application further provides a micro-service invoking method, which is applied to a Feign component implemented according to the foregoing implementation method, and includes: when a micro-service calling request is received, the method for establishing load balance of the Feign component calls the method for acquiring the meta-information to acquire the meta-information corresponding to the micro-service calling request from the service registration and discovery component; the method for creating the load balance retrieves the micro service instance corresponding to the meta-information according to the meta-information; returning the object of the microservice instance.
Through the implementation mode, the Feign assembly has the capability of acquiring the meta-information from the meta-information area of the service registration and discovery assembly, the meta-information corresponding to the micro-service calling request can be acquired from the service registration and discovery assembly, and then the micro-service instance corresponding to the meta-information is retrieved according to the meta-information, so that the Feign assembly can realize more flexible management of the micro-service cluster.
Further, the acquiring method for invoking the meta information acquires the meta information corresponding to the micro service invocation request from the service registration and discovery component, and includes: calling an acquisition method of the meta information; the method for acquiring the meta information judges whether a connection driver corresponding to the current service registration and discovery component exists; if yes, obtaining the meta-information corresponding to the micro-service calling request from the service registration and discovery component; and if the service registration request does not exist, constructing a connection driver of the service registration and discovery component, and acquiring meta-information corresponding to the micro-service calling request from the service registration and discovery component.
In the implementation process, the Feign component and the service registration and discovery component can be directly connected by acquiring the connection driver for constructing the service registration and discovery component, so that the Feign component can effectively acquire the meta-information in the service registration and discovery component.
The embodiment of the present application further provides an implementation apparatus for a Feign component, including: a creating module and an implementing module; the creating module is used for creating a main class of the Feign component; a method for establishing load balance is realized under the main class; the implementation module is used for implementing the first JavaBean under the main class; the first JavaBean is used for creating a Feign client; implementing a meta-information acquisition method in the first JavaBean, wherein the meta-information acquisition method allows the method for creating load balance to be called; the method for acquiring the meta-information is used for acquiring the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
The embodiment of the present application further provides a micro service invoking device, including: an adding module and a determining module; the adding module is used for adding the Feign component realized by the realizing method to the dependence of the project; and the determining module is used for starting the Feign assembly to determine the required micro-service instance when the micro-service is called.
The embodiment of the present application further provides a Feign component implemented according to the foregoing implementation method, including: the processing module is used for calling the meta-information acquisition method to acquire the meta-information corresponding to the micro-service calling request from the service registration and discovery component when receiving the micro-service calling request; the processing module is further used for retrieving the micro service instance corresponding to the meta-information according to the meta-information; and the return module is used for returning the object of the micro service instance.
An embodiment of the present application further provides an electronic device, including: a processor, a memory, and a communication bus; the communication bus is used for realizing connection communication between the processor and the memory; the processor is configured to execute one or more programs stored in the memory to implement the method of any of the above.
Also provided in embodiments of the present application is a readable storage medium storing one or more programs which are executable by one or more processors to implement the method of any of the above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of an implementation method of a Feign module provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for invoking a micro service according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another micro-service invocation method provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an implementation apparatus of a Feign component provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a micro service invocation device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The first embodiment is as follows:
in order to enable the Feign component to have the capability of acquiring the meta-information and to realize corresponding micro-service governance based on the meta-information, the embodiment of the application provides an implementation method of the Feign component.
Referring to fig. 1, an implementation method of a Feign module provided in an embodiment of the present application includes:
s101: a main class of Feign components is created.
In the embodiment of the application, a main class of the Feign component can be created, and the main class registers the implementation of the main class to the framework system, so that the framework enters the related function flow and provides the implementation of the related function to the framework system.
In embodiments of the present application, the main class may be configured to be automatically loaded when it is created, so that the main class can be recognized and loaded by the framework.
In the embodiment of the present application, when the main class is created, a switch may be further configured, so that the main class can be controlled to be enabled or not.
In the embodiment of the present application, when creating the main class, a method for creating load balancing (hereinafter referred to as createFeignLoadBalancer method) may be implemented under the main class. In the embodiment of the application, the createFeignLoadBalancer method can retrieve the micro-service instance corresponding to the meta-information according to the meta-information, so as to realize micro-service calling based on the meta-information.
In order to achieve the above capability, in the embodiment of the present application, the createFeignLoadBalancer method may be implemented by create () function. In the createFeignLoadBalancer method, the entry may include the registration name, meta information, etc. of the microservice that needs to be called, and the return may be the object in the Feign component, such as a microservice instance.
In the embodiment of the application, a createFeignLoadBalancer method can be implemented in a JavaBean in a way of creating the JavaBean, so as to be used globally by a system.
It should be appreciated that in an actual application process, different configurations of service registration and discovery components in different projects often result in different requirements for the required javabeans. Some configurations require adapting javabeans that do not need to support the retry function, while some configurations require adapting javabeans that do need to support the retry function.
To meet practical needs, in the embodiment of the present application, two javabeans (hereinafter referred to as a second JavaBean and a third JavaBean) may be implemented under the main class at the same time. Wherein the second JavaBean is a JavaBean for creating a client factory mode for load balancing and the third JavaBean is a JavaBean for creating a client factory mode for load balancing that supports a retry function.
In this embodiment of the present application, in order to implement the second JavaBean, the second JavaBean may be implemented by creating a second sub-class under the main class and providing the first constructor in the second sub-class, thereby creating a method for load balancing in the first constructor. The parameters of the first constructor comprise a client factory class provided by the framework, a routing configuration class supporting hot loading and the like. In the method of creating load balancing, the entry references include meta information.
Similarly, to implement the third JavaBean, the third JavaBean may be implemented by creating a third sub-class under the main class and providing a second constructor in the third sub-class to create a method of load balancing in the second constructor. Compared with the first constructor, the parameters of the second constructor comprise a client factory class provided by the framework, a routing configuration class supporting hot loading, and a load balancing retry factory class providing a retry strategy, so that retry can be supported. In the method of creating load balancing, the input parameters also include meta-information.
In the embodiment of the present application, in order to ensure that the second subclass and the third subclass can conform to the framework standard and be compatible with the framework, the existing load balancing factory of the framework may be inherited when the second subclass and the third subclass are created.
In the embodiment of the present application, there should be an implementation (which may also be referred to as a function or a method) for finding a service balance in the createFeignLoadBalancer method. In the embodiment of the present application, the implementation of finding service balance may be implemented in a createFeignLoadBalancer method through an existing implementation manner of implementing retrieval of a micro service instance corresponding to a certain entry parameter, and compared with the implementation of traditional finding service balance, the difference is that the entry parameter is meta information.
It should be understood that, in the actual application process, according to the difference of the actual call request, it may be adapted to adopt the second java bean or the third java bean. The following are exemplary: for example, for the service class call, a third JavaBean that needs to support the retry function may be adapted; for the heartbeat detection class, a second JavaBean that does not need to support the retry function may be adapted.
It should be understood that in the embodiment of the present application, only the second java bean or only the third java bean may be provided. At this time, the scheme of the embodiment of the application can still be implemented in a partial scene.
S102: the first JavaBean is implemented under the main class.
In the embodiment of the application, the first JavaBean is a JavaBean used for creating a Feign client, and can be globally used by a framework system.
In the embodiment of the present application, the first java bean implements a method for acquiring meta information, and the method for acquiring meta information allows a createFeignLoadBalancer method to call.
In the embodiment of the application, the method for acquiring the meta-information is used for acquiring the meta-information from the service registration and discovery component. And the method is also used for constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
In this embodiment of the present application, the method for acquiring meta information may include: judging whether a connection driver corresponding to the service registration and discovery component exists or not; if the drive is not connected, the connection drive is constructed. And after the construction is successful, acquiring the meta-information in the meta-information area of the service registration and discovery component. And if the connection driver exists, directly acquiring the meta information in the meta information area of the service registration and discovery component.
It should be noted that, if the meta-information acquisition method can achieve meta-information acquisition of multiple service registration and discovery components, before determining whether there is a connection driver corresponding to the service registration and discovery component, there is a process of determining the type of the service registration and discovery component. In this case, it is determined whether or not there is a connection driver corresponding to the service registration and discovery component, that is, it is determined whether or not there is a connection driver corresponding to the service registration and discovery component of the type.
For example, in the embodiment of the present application, if the meta information obtaining method is used to obtain meta information from three service registration and discovery components, namely, Consul, Nacos, and Eureka, the meta information obtaining method may be set as follows:
1. judging whether the service registration and discovery component is Consul;
if yes, judging whether a Consul connection drive exists;
if there is no Consul connection drive, the Consul connection drive is constructed. And after success, acquiring the meta information in the Consul meta information area.
2. Judging whether the service registration and discovery component is Nacos or not;
if yes, judging whether a Nacos connection drive exists;
if there is no Nacos connection drive, the Nacos connection drive is constructed. And after success, acquiring the meta-information in the Nacos meta-information area.
3. Judging whether the service registration and discovery component is Eureka or not;
if yes, judging whether the Eureka connection drive exists or not;
if there is no Eureka link driver, the Eureka link driver is constructed. After success, meta information in the Eureka meta information area is acquired.
In the embodiment of the present application, the first java bean may be implemented by creating a subclass under the main class.
Illustratively, a first subclass can be created under the main class, and the first subclass inherits the Feign client provided by the framework, so that the first subclass can be fused with the framework and meet the standard required by the framework.
Then, in the first sub-class, an interface definition method of the Feign client and an acquisition method of the aforementioned meta information can be realized.
In this embodiment of the present application, the interface definition method for implementing the Feign client may be implemented by an execute () function, where the entry references include Http Request (Http Request), Options (Options), and the Options include optional configurations such as timeout time.
In the embodiment of the application, the calling from the createFeignLoadBalancer method to the meta-information obtaining method is realized through the interface definition method of the Feign client, and in addition, when the meta-information obtaining method needs to be newly added in the later period, the access can also be realized through the interface definition method of the Feign client.
In the embodiment of the application, a cut-in configuration can be added in a starting program of the Feign component when or before the main class is created, so that a process is guided to enter the main class when a project is started.
For example, a spring. factors file can be added under the resources \ META-INF directory of the Feign component, and related configurations can be added, so that the addition of the cut-in configuration is realized.
The relevant configuration added may be: spring frame, boot, autoconfiguration, enabled autoconfiguration, com, winnin g, base, akso, client, autoconfiguration (notify the spring frame, load WinFeignConfiguration this class at project start).
It should be noted that, in the above codes, WinFeignConfiguration characterizes the main class in the embodiments of the present application.
It should be noted that, the method realizes the function added to the Feign component, and the original processing flow of the Feign component can still be retained.
It should be understood that the implementation method of the Feign component described above can be implemented by manual configuration by an engineer, but can also be implemented automatically by electronic devices such as a computer by setting a configuration script in advance.
According to the implementation method of the Feign component, the method for creating load balance of the micro service instance corresponding to the meta-information can be retrieved according to the meta-information under the main class of the Feign component, the meta-information obtaining method is achieved under the main class, and the meta-information obtaining method can be called by the method for creating load balance. Therefore, the connection driving from the Feign component to the service registration and discovery component is realized through the meta-information acquisition method, so that the meta-information in the meta-information of the service registration and discovery component is acquired, and the meta-information is called by the method for establishing load balance. Therefore, the Feign component has the capability of acquiring the meta-information, so that the corresponding micro-service instance can be determined according to the meta-information, and the Feign component can realize more flexible administration of the micro-service cluster.
Correspondingly, the embodiment of the application also provides a micro-service calling method which is applied to the Feign component realized according to the realization method.
As shown in fig. 2, the method for calling the micro service includes:
s201: when a micro-service calling request is received, a createFeignLoadBalancer method of a Feign component calls an obtaining method of meta-information, and meta-information corresponding to the micro-service calling request is obtained from a service registration and discovery component.
It should be understood that, in the embodiment of the present application, when acquiring the meta information corresponding to the micro service invocation request from the service registration and discovery component, the method for acquiring the meta information may first determine whether a connection driver corresponding to the current service registration and discovery component exists. If the request exists, the meta information corresponding to the micro-service calling request can be directly acquired from the service registration and discovery component; if the meta information does not exist, the connection driver of the service registration and discovery component can be constructed, and then the meta information corresponding to the micro-service calling request is obtained from the service registration and discovery component.
It should be understood that, in the embodiment of the present application, the microservice invocation request will generally have information such as the registration name of the microservice requested to be invoked. According to information such as a registration name, meta-information related to the microservice requested to be invoked can be found in the meta-information area.
S202: and the method for creating the load balance retrieves the micro-service instance corresponding to the meta-information according to the meta-information.
In the embodiment of the application, the createFeignLoadBalancer method calls the meta-information obtaining method, so that the corresponding micro-service instance is obtained through retrieval.
S203: the object of the microservice instance is returned.
It should be noted that, since a micro service call is usually required when a certain project is performed, a Feign component needs to be applied to the project, so as to implement the use of the Feign component. To this end, an embodiment of the present application further provides a method for invoking a micro service, which can be seen from fig. 3, and includes:
s301: the Feign component implemented according to the foregoing implementation method is added to the dependency of the project.
It should be understood that, in the embodiment of the present application, after the Feign component is added to the dependency of the project, the enable item of the Feign component may be added in the configuration file of the project, and the enable item is set to be enabled.
The set enable entry enables, that is, the function of starting the added Feign component is characterized, and the code value of the set enable entry in the program is usually "true". The enable item can be set to off in addition to being set to enable, thereby turning off the added function of the Feign component, whose code value in the program is typically "false".
S302: when a microservice is invoked, the Feign component is launched to determine the required microservice instance.
When the micro-service needs to be called in the project, the Feign component can determine the micro-service instance according to the micro-service calling method shown in the aforementioned fig. 2.
It should be understood that the method of fig. 3 may be implemented by manual configuration by an engineer, but may also be implemented automatically by an electronic device such as a computer by setting a configuration script in advance.
Through the scheme of the embodiment of the application, the Feign component has the capability of acquiring the meta-information from the meta-information area of the service registration and discovery component, and can realize the selection of the micro-service instance based on the meta-information, so that the Feign component can realize more flexible management of the micro-service cluster.
Example two:
in this embodiment, with reference to the introduction of the first embodiment, a specific implementation method of the Feign component is used to further illustrate the solution of the embodiment of the present application.
In this embodiment, the implementation of the Feign component includes the following processes:
1. add spring. factors files under resources \ META-INF directory and add related configurations:
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.w inning.base.akso.cloud.client.autoconfigure.WinFeignConfiguration。
2. creating a main class WinFeignConfiguration:
2.1 the implementation can be automatically loaded, so that the main class can be identified by the framework and loaded;
2.2 implementing a configuration switch so that the main class can control whether to enable or not through a configuration file;
2.3 implementing the Bean: cachingllbclientfactory (second JavaBean):
the role of implementing the captinglbclientfactory is to create a cacheable load-balanced client factory-mode JavaBean in single-instance mode, which is provided to the framework system for global use (which is implemented with reference to process 3).
2.4 implementing the Bean: retryabecacinclbclientfactory (third JavaBean):
the role of implementing retryabeeccichinglbclientfactory is to create a client-side factory schema JavaBean supporting cacheable load balancing of the retry function in a single-instance schema, which is provided to the framework system for global use (which implements process 3).
2.5 implementing the Bean: feignClient (first JavaBean):
the role of implementing the Feign client is to create a single-case mode Feign client JavaBean, which is provided for the framework system to use globally (the implementation is winloadbalancerfiging client (load balancing Feign client, first sub-class), and the implementation refers to process 4).
3. Create the subclass wincachingsringloadbalancefactory (second and third subclasses):
this class provides specific implementations of two beans, namely a capacibenglbclientfactory and a retraybebecenglbclientfactory, in WinFeignConfiguration.
3.1 inherits the CaCingSpringLoadBalancFactory (a cacheable load balancing factory), so that the created subclass WinCachingSpringLoadBalancFactory meets the standard and can be fused with the framework.
3.2 realizing WinCachingSpringLoadBanancFactory (SpringClientFactory factory, WinRoutesConfig) method.
It should be noted that the parameter of the wincathing spring loadbalancer factory method (SpringClientFactory factory, WinRoutesConfig) characterizing the constructor is a constructor, and includes a client factory class SpringClientFactory provided by the framework and a routing configuration class WinRoutesConfig supporting hot loading.
3.3 realizing WinCachingSpringLoadBanancFactory (SpringClientFactory, LoadBancedRetryFactory, WinRoutesConfig) method.
It should be noted that, the wincathing springloadbalancefactory method is a constructor, (SpringClientFactory factor, loadbalancedretryfactor, WinRoutesConfig with routestconfig) characterizing parameters of the constructor include a client factory class SpringClientFactory provided by the framework, a route configuration class winroutestconfig supporting hot loading, and a loadbalancedretryfactor factory class providing retry strategy.
It should be understood that both the wincachich spring loadbalancefactory methods in 3.2 and 3.3 are constructors, but there is one more parameter loadbalancedretryfactor in 3.3 than in 3.2, so the constructor in 3.3 has one more retry support capability than the constructor in 3.2. In an embodiment, the constructor of 3.2 is a first constructor and the constructor of 3.3 is a second constructor.
3.4 implementing createFeignLoadBalancer (String client name, Map < String, Collection > header tags) method.
The createfiginloadbalancer method is an important implementation in the above constructor, the entry is the registration name of the micro-service to be called and the meta-information, and the returned object is the WinFeignLoadBalancer (load balancing of Feign component).
3.5 implementing findServerBalancer (born if Default, String client name, String serial, String version, Borean end Mode) method.
The findServerBalancer method (i.e., the implementation of finding service balance in the embodiments of the present application) is an important implementation in the createFeignLoadBalancer method. The entry of the findServerBalancer method is meta-information, and the returned object is a WinFeignLoadBalancer object containing the micro-service instance retrieved according to the meta-information.
In this embodiment, beans are realized by 3.1, 3.2, 3.4, and 3.5: a cachingllbclientfactory; bean is realized by 3.1, 3.3, 3.4 and 3.5: retryabecacinclbrientfactory.
4. Create subclass windloadbalancerfeignclient (first subclass):
it should be noted that this class provides the Bean in WinFeignConfiguration: specific implementation of feignClient.
4.1 inherits the Client, so that WinLoadBalancerFeign Client meets the standard and can be fused with the framework.
4.2 implementing execute (Request, options) through IOException method
The execute () strokes IOException method is a method defined by a client interface and is a main method of WinLoadBalancerFeignClient. The parameters are Http Request, and Options. Options include optional configurations such as timeout times.
4.3 implementation of getMetaInfo method (acquirer of meta information):
judging whether the service registration and discovery component is Consul; if yes, judging whether the Consul connection driving exists. If yes, acquiring meta-information of the Consul meta-information area; if the information does not exist, constructing a Consul connection drive, and acquiring the meta information of the Consul meta information area.
If the service registration and discovery component is not Consul, judging whether the service registration and discovery component is Nacos; if yes, judging whether the Nacos connection drive exists. If yes, acquiring meta-information of the Nacos meta-information area; and if the Nacos does not exist, constructing a Nacos connection drive, and acquiring the meta-information of the Nacos meta-information area.
If the service registration and discovery component is not Nacos, judging whether the service registration and discovery component is Eureka or not; if yes, judging whether the Eureka connection driving exists or not. If yes, acquiring meta-information of the Eureka meta-information area; if the information does not exist, the Eureka connection drive is constructed, and the meta information of the Eureka meta information area is acquired.
5. The createWinFeignLoadBalancer method calls the getMetaInfo method of WinLoadBalancerFeignClient to obtain the required meta-information.
After the Feign component is realized through the above process, the Feign component realized as above (since the foregoing is realized by a function of realizing micro-service selection based on meta information in the Feign component, not the whole Feign component, the winding-akso-closed-Feign-starter component referred to as the Feign component in this embodiment) is added to the dependency of the project:
<dependencies>
<dependency>
<groupId>com.winning</groupId>
<artifactId>winning-akso-cloud-feign-starter</artifactId>
</dependency>
<dependencies>
code meaning: the target project uses a winning-akso-closed-feather-starter component.
It should be understood that, in addition to adding the running-akso-bound-feign-starter component to the dependency of the project in the manner described above, the adding of the running-akso-bound-feign-starter component to the dependency of the project may also be implemented by directly adding a jar file to the classpath of the target project (put into the lib directory), and the like, which is not limited in the embodiment of the present application.
Add a rounding. design. enabled item in the project's configuration file and set its value to true (characterize enabled). If the winding-akso-closed-feather-starter assembly is to be closed, the value of the winding.
And entering a Feign assembly processing flow. Each time the micro-services are mutually called, the Feign component acquires the meta-information stored in the meta-information area of the service registration and discovery component, and then searches the micro-service instance according to the meta-information.
Currently, in the spring cloud project, micro services are mutually called, and micro service instances can be selected only by the registration name of the micro service at the time of registration. By the scheme of the embodiment, besides the registration name, the micro-service instance selection can be made through the meta-information. Therefore, the method lays a foundation for better completing complicated and special micro-service treatment.
Example three:
based on the same inventive concept, the embodiment of the present application further provides an implementing apparatus 100 and a micro-service invoking apparatus 200 for a Feign component. Referring to fig. 4 and fig. 5, fig. 4 shows an implementation apparatus of a Feign component that employs the implementation method of the Feign component shown in fig. 1, and fig. 5 shows a micro-service invocation apparatus that employs the micro-service invocation method shown in fig. 3 according to an embodiment. It should be understood that the specific functions of the apparatus 100 and the apparatus 200 can be referred to the above description, and the detailed description is omitted here as appropriate to avoid redundancy. The devices 100 and 200 include at least one software functional module that can be stored in memory in the form of software or firmware or solidified in the operating system of the devices 100 and 200. Specifically, the method comprises the following steps:
referring to fig. 4, the Feign module implementing apparatus 100 includes: a creation module 101 and an implementation module 102. Wherein:
the creating module 101 is configured to create a main class of the Feign component; a method for establishing load balance is realized under the main class;
the implementation module 102 is configured to implement a first JavaBean under the main class; the first JavaBean is used for creating a Feign client;
implementing a meta-information acquisition method in the first JavaBean, wherein the meta-information acquisition method allows the method for creating load balance to be called; the method for acquiring the meta-information is used for acquiring the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
In this embodiment of the present application, the implementation module 102 is specifically configured to create a first sub-class under the main class, where the first sub-class inherits the Feign client; in the first sub-class, realizing an interface definition method of the Feign client; and in the first sub-class, realizing the method for acquiring the meta-information.
In this embodiment of the present application, the implementing module 102 is further configured to implement a second java bean under the main class; the second JavaBean is a JavaBean used for creating a client factory mode for load balancing; the method of creating load balancing is implemented in the second JavaBean.
In this embodiment of the application, the implementation module 102 is specifically configured to create a second sub-class under the main class; providing a first constructor in the second subclass; the parameters of the first constructor comprise a client factory class provided by a framework and a routing configuration class supporting hot loading; implementing a method of creating load balancing within the first constructor; the inclusion of the method of creating load balancing includes the meta-information.
In this embodiment of the present application, the implementing module 102 is further configured to implement a third java bean under the main class; the third JavaBean is a JavaBean used for creating a client factory mode supporting the load balance of the retry function; the third JavaBean has the method of creating load balancing implemented therein.
In this embodiment of the application, the implementation module 102 is specifically configured to create a third sub-class under the main class; providing a second constructor in the third subclass; the parameters of the second constructor comprise a client factory class provided by a framework, a routing configuration class supporting hot loading and a load balancing retry factory class providing a retry strategy; implementing a method of creating load balancing within the second constructor; the inclusion of the method of creating load balancing includes the meta-information.
In the embodiment of the application, the method for creating the load balance has the implementation of finding the service balance; and the entry parameter for realizing the search of the service balance is the meta-information, and the entry parameter is returned to be an object containing the micro-service instance which meets the requirement and is retrieved according to the meta-information.
In this embodiment of the present application, the creating module 101 is further configured to add a cut-in configuration in a boot program of the Feign component, so as to guide a process to enter the main class when a project is started.
Referring to fig. 5, the micro-service invocation apparatus 200 includes: an adding module 201 and a determining module 202. Wherein:
the adding module 201 is configured to add the Feign component implemented by the implementation method according to the first embodiment to the dependency of the project;
the determining module 202 is configured to start the Feign component to determine a required microservice instance when the microservice is called.
In this embodiment of the present application, the adding module 201 is further configured to, after the Feign component is added to the dependency of the project, add an enabling item of the Feign component in the configuration file of the project, and set the enabling item to be enabled.
Based on the same inventive concept, an Feign component implemented by the implementation method according to the first embodiment is further provided in the embodiment of the present application, and the Feign component can implement a function corresponding to the method shown in fig. 2 according to the first embodiment. Therefore, detailed description is appropriately omitted herein to avoid redundancy. The modules in the Feign assembly can be stored in a memory in the form of software or firmware or be solidified in the electronic device in which the Feign assembly is located. Specifically, the method comprises the following steps:
the Feign assembly comprises:
the processing module is used for calling the meta-information acquisition method to acquire the meta-information corresponding to the micro-service calling request from the service registration and discovery component when receiving the micro-service calling request;
the processing module is further used for retrieving the micro service instance corresponding to the meta-information according to the meta-information;
and the return module is used for returning the object of the micro service instance.
In this embodiment of the present application, the method for acquiring meta-information acquires meta-information corresponding to the micro-service invocation request from the service registration and discovery component, and includes:
judging whether a connection driver corresponding to the current service registration and discovery component exists;
if yes, obtaining the meta-information corresponding to the micro-service calling request from the service registration and discovery component;
and if the service registration request does not exist, constructing a connection driver of the service registration and discovery component, and acquiring meta-information corresponding to the micro-service calling request from the service registration and discovery component.
It should be understood that, for the sake of brevity, the contents described in some embodiments are not repeated in this embodiment.
Example four:
the present embodiment provides an electronic device, which is shown in fig. 6 and includes a processor 601, a memory 602, and a communication bus 603. Wherein:
the communication bus 603 is used for connection communication between the processor 601 and the memory 602.
The processor 601 is configured to execute one or more first programs stored in the memory 602 to implement the methods in the first embodiment and/or the second embodiment.
It will be appreciated that the configuration shown in fig. 6 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 6 or have a different configuration than shown in fig. 6. For example, the electronic device may be a server or a terminal.
The present embodiment also provides a readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash Memory, a usb (Secure Digital Card), an MMC (Multimedia Card), etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the method in the first embodiment and/or the second embodiment. And will not be described in detail herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
In this context, a plurality means two or more.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (17)

1. A method for realizing a Feign component is characterized by comprising the following steps:
creating a main class of the Feign component; a method for establishing load balance is realized under the main class; the method for creating the load balance is used for retrieving the micro service instance corresponding to the meta-information according to the meta-information;
implementing a first JavaBean under the primary class; the first JavaBean is used for creating a Feign client;
implementing a meta-information acquisition method in the first JavaBean, wherein the meta-information acquisition method allows the method for creating load balance to be called; the method for acquiring the meta-information is used for acquiring the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
2. The Feign component implementation method of claim 1, wherein implementing a first JavaBean under the main class comprises:
creating a first sub-class under the main class, wherein the first sub-class inherits the Feign client;
in the first sub-class, realizing an interface definition method of the Feign client;
and in the first sub-class, realizing the method for acquiring the meta-information.
3. The method of implementing a Feign component of claim 1, wherein the method further comprises:
implementing a second JavaBean under the primary class; the second JavaBean is a JavaBean used for creating a client factory mode for load balancing;
the method of creating load balancing is implemented in the second JavaBean.
4. The Feign component implementation method of claim 3, wherein implementing a second JavaBean under the main class comprises:
creating a second sub-class under the main class;
providing a first constructor in the second subclass; the parameters of the first constructor comprise a client factory class provided by a framework and a routing configuration class supporting hot loading;
implementing a method of creating load balancing within the first constructor; the inclusion of the method of creating load balancing includes the meta-information.
5. The method of implementing a Feign component of claim 1, wherein the method further comprises:
a third JavaBean is also implemented under the primary class; the third JavaBean is a JavaBean used for creating a client factory mode supporting the load balance of the retry function;
the third JavaBean has the method of creating load balancing implemented therein.
6. The Feign component implementation method of claim 5, wherein implementing a third JavaBean under the main class comprises:
creating a third sub-class under the main class;
providing a second constructor in the third subclass; the parameters of the second constructor comprise a client factory class provided by a framework, a routing configuration class supporting hot loading and a load balancing retry factory class providing a retry strategy;
implementing a method of creating load balancing within the second constructor; the inclusion of the method of creating load balancing includes the meta-information.
7. The Feign component implementation method of claim 4 or 6, wherein the method of creating load balancing has an implementation of finding a service balance;
and the entry parameter for realizing the search of the service balance is the meta-information, and the entry parameter is returned to be an object containing the micro-service instance which meets the requirement and is retrieved according to the meta-information.
8. The Feign assembly realization method according to any of the claims 1-6, wherein the method further comprises:
adding cut-in configuration in the starting program of the Feign component to guide the process to enter the main class when the project is started.
9. A method for invoking a micro-service, comprising:
adding a Feign component realized according to the realization method of any one of claims 1 to 8 into the dependency of the project;
and when the micro service is called, starting the Feign component to determine the required micro service instance.
10. The method of implementing a Feign component of claim 9, wherein after adding the Feign component to a dependency of a project, the method further comprises:
adding an enabling item of the Feign component in a configuration file of the project, and setting the enabling item to enable.
11. A micro-service calling method applied to a Feign component implemented by the implementation method according to any one of claims 1 to 8, comprising:
when a micro-service calling request is received, the method for establishing load balance of the Feign component calls the method for acquiring the meta-information to acquire the meta-information corresponding to the micro-service calling request from the service registration and discovery component;
the method for creating the load balance retrieves the micro service instance corresponding to the meta-information according to the meta-information;
returning the object of the microservice instance.
12. The micro-service invocation method according to claim 11, wherein said obtaining method invoking said meta-information obtains meta-information corresponding to said micro-service invocation request from said service registration and discovery component, comprising:
calling an acquisition method of the meta information;
the method for acquiring the meta information judges whether a connection driver corresponding to the current service registration and discovery component exists;
if yes, obtaining the meta-information corresponding to the micro-service calling request from the service registration and discovery component;
and if the service registration request does not exist, constructing a connection driver of the service registration and discovery component, and acquiring meta-information corresponding to the micro-service calling request from the service registration and discovery component.
13. An implementation device of a Feign component, comprising: a creating module and an implementing module;
the creating module is used for creating a main class of the Feign component; a method for establishing load balance is realized under the main class;
the implementation module is used for implementing the first JavaBean under the main class; the first JavaBean is used for creating a Feign client;
implementing a meta-information acquisition method in the first JavaBean, wherein the meta-information acquisition method allows the method for creating load balance to be called; the method for acquiring the meta-information is used for acquiring the meta-information and constructing the connection driver of the service registration and discovery component when the connection driver corresponding to the current service registration and discovery component does not exist.
14. A microservice invocation device, comprising: an adding module and a determining module;
the adding module is used for adding the Feign component realized by the realization method of any one of claims 1 to 8 into the dependence of the project;
and the determining module is used for starting the Feign assembly to determine the required micro-service instance when the micro-service is called.
15. A Feign component realized according to the realization method of any one of claims 1 to 8, comprising:
the processing module is used for calling the meta-information acquisition method to acquire the meta-information corresponding to the micro-service calling request from the service registration and discovery component when receiving the micro-service calling request;
the processing module is further used for retrieving the micro service instance corresponding to the meta-information according to the meta-information;
and the return module is used for returning the object of the micro service instance.
16. An electronic device, comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute one or more programs stored in the memory to implement the method of any of claims 1 to 12.
17. A readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the method of any one of claims 1 to 12.
CN202011159522.8A 2020-10-26 2020-10-26 Method for realizing Feign component, method and device for calling micro-service Active CN112256351B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011159522.8A CN112256351B (en) 2020-10-26 2020-10-26 Method for realizing Feign component, method and device for calling micro-service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011159522.8A CN112256351B (en) 2020-10-26 2020-10-26 Method for realizing Feign component, method and device for calling micro-service

Publications (2)

Publication Number Publication Date
CN112256351A true CN112256351A (en) 2021-01-22
CN112256351B CN112256351B (en) 2023-11-17

Family

ID=74261613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011159522.8A Active CN112256351B (en) 2020-10-26 2020-10-26 Method for realizing Feign component, method and device for calling micro-service

Country Status (1)

Country Link
CN (1) CN112256351B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590236A (en) * 2021-08-03 2021-11-02 聚好看科技股份有限公司 Server and micro-service declarative interface timeout configuration method
CN114285857A (en) * 2021-12-31 2022-04-05 中企云链(北京)金融信息服务有限公司 Load balancing method, device and system

Citations (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019458A1 (en) * 2007-07-13 2009-01-15 International Business Machines Corporation Apparatus, system, and method for seamless multiple format metadata abstraction
EP2169931A1 (en) * 2008-09-24 2010-03-31 Nokia Siemens Networks OY Method and device for data processing and communication system comprising such device
CN101697119A (en) * 2009-10-12 2010-04-21 南京联创科技集团股份有限公司 JavaBean class leading-in form based realization method of replacing traditional URL access address
CN102221998A (en) * 2011-06-07 2011-10-19 北京大学 Method for extending EJB container in component running support platform
US20120102319A1 (en) * 2009-06-23 2012-04-26 Rainer Falk System and Method for Reliably Authenticating an Appliance
CN103763209A (en) * 2014-01-03 2014-04-30 上海聚力传媒技术有限公司 Scheduling method and device of CDN servers
US20150006740A1 (en) * 2013-06-26 2015-01-01 Avaya Inc. Shared back-to-back user agent
CN105577822A (en) * 2016-01-27 2016-05-11 北京国电通网络技术有限公司 Content distribution network (CDN) node based cache centralized management system
CN106254423A (en) * 2016-07-20 2016-12-21 普元信息技术股份有限公司 The method realizing Restful service release quickly based on micro services framework
US20170063833A1 (en) * 2015-08-27 2017-03-02 Microsoft Licensing Technology, LLC Application Service Architecture
CN107124465A (en) * 2017-05-12 2017-09-01 国网江苏省电力公司电力科学研究院 Towards the distributed photovoltaic remote data acquisition system framework method accessed on a large scale
US20180084075A1 (en) * 2016-09-16 2018-03-22 Oracle International Corporation Request cache to improve web applications performance
CN107835181A (en) * 2017-11-16 2018-03-23 泰康保险集团股份有限公司 Right management method, device, medium and the electronic equipment of server cluster
CN108011967A (en) * 2017-12-15 2018-05-08 四川长虹电器股份有限公司 Picture upload method based on AWS micro services
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN108306917A (en) * 2017-01-13 2018-07-20 中国移动通信集团江西有限公司 The register method and device of data processing method and device, micro services module
CN108833137A (en) * 2018-05-18 2018-11-16 南京南瑞信息通信科技有限公司 A kind of flexibility micro services Monitoring framework framework
CN108834177A (en) * 2018-06-08 2018-11-16 京信通信系统(中国)有限公司 Load-balancing method, device, computer equipment and storage medium
CN108920133A (en) * 2018-06-14 2018-11-30 北京三快在线科技有限公司 Across Programming with Pascal Language method, apparatus, electronic equipment and storage medium
CN109089163A (en) * 2018-07-27 2018-12-25 武汉斗鱼网络科技有限公司 Barrage message distributing method, device, equipment and storage medium
CN109587246A (en) * 2018-12-06 2019-04-05 国云科技股份有限公司 A kind of implementation method of the micro services frame of integrated multiple kinds independent assortment
CN109587071A (en) * 2018-11-30 2019-04-05 北京工业大学 Micro services load-balancing method based on SDN
CN109636334A (en) * 2018-12-07 2019-04-16 深圳市汇鑫科技股份有限公司 A kind of property intelligence community service system and method
CN109660585A (en) * 2018-09-28 2019-04-19 深圳壹账通智能科技有限公司 Call method, device, equipment and the storage medium of AOP enhancing objects services
CN109683905A (en) * 2018-12-24 2019-04-26 国云科技股份有限公司 A kind of system method for automatically releasing
CN109766080A (en) * 2019-01-22 2019-05-17 努比亚技术有限公司 Micro services register method, device, electronic equipment and readable storage medium storing program for executing
CN109814909A (en) * 2019-01-18 2019-05-28 南京绿新能源研究院有限公司 Method based on Spring cloud micro services framework cloud SCADA system
CN109995713A (en) * 2017-12-30 2019-07-09 华为技术有限公司 Service processing method and relevant device in a kind of micro services frame
CN110048879A (en) * 2019-03-12 2019-07-23 平安医疗健康管理股份有限公司 Micro services register method, device, electronic equipment and computer readable storage medium
CN110099099A (en) * 2019-03-28 2019-08-06 中国电子科技集团公司电子科学研究院 For the spatial information micro services encapsulation at terrestrial information port and service integration method
CN110149396A (en) * 2019-05-20 2019-08-20 华南理工大学 A kind of platform of internet of things construction method based on micro services framework
CN110262972A (en) * 2019-06-17 2019-09-20 中国科学院软件研究所 A kind of failure testing tool and method towards micro services application
CN110602178A (en) * 2019-08-26 2019-12-20 杭州电子科技大学 Method for calculating and processing temperature sensor data based on edge compression
CN110661780A (en) * 2019-08-15 2020-01-07 西安雷迪信息技术有限公司 Wireless city data sharing method and system based on SAAS application
CN110781476A (en) * 2019-10-15 2020-02-11 南京南瑞信息通信科技有限公司 Flexible micro-service security access control method and system
CN110971449A (en) * 2019-10-25 2020-04-07 武汉烽火众智数字技术有限责任公司 Service management and control system based on micro-service architecture
CN110989983A (en) * 2019-11-28 2020-04-10 深圳航天智慧城市系统技术研究院有限公司 Zero-coding application software rapid construction system
CN111158792A (en) * 2020-01-02 2020-05-15 普元信息技术股份有限公司 System and method for realizing dynamic configurable service parameter verification processing under distributed architecture
CN111193803A (en) * 2019-12-31 2020-05-22 四川省公安科研中心 Spring group-based micro-service construction method and spring group micro-service framework
CN111324577A (en) * 2018-12-17 2020-06-23 大唐移动通信设备有限公司 Method and device for reading and writing Yml file
CN111338813A (en) * 2020-02-10 2020-06-26 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for dynamically generating middleware
CN111352577A (en) * 2018-12-24 2020-06-30 杭州海康威视系统技术有限公司 Object storage method and device
CN111414352A (en) * 2020-03-27 2020-07-14 北京明略软件系统有限公司 Database information management method and device

Patent Citations (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090019458A1 (en) * 2007-07-13 2009-01-15 International Business Machines Corporation Apparatus, system, and method for seamless multiple format metadata abstraction
EP2169931A1 (en) * 2008-09-24 2010-03-31 Nokia Siemens Networks OY Method and device for data processing and communication system comprising such device
US20120102319A1 (en) * 2009-06-23 2012-04-26 Rainer Falk System and Method for Reliably Authenticating an Appliance
CN101697119A (en) * 2009-10-12 2010-04-21 南京联创科技集团股份有限公司 JavaBean class leading-in form based realization method of replacing traditional URL access address
CN102221998A (en) * 2011-06-07 2011-10-19 北京大学 Method for extending EJB container in component running support platform
US20150006740A1 (en) * 2013-06-26 2015-01-01 Avaya Inc. Shared back-to-back user agent
CN103763209A (en) * 2014-01-03 2014-04-30 上海聚力传媒技术有限公司 Scheduling method and device of CDN servers
US20170063833A1 (en) * 2015-08-27 2017-03-02 Microsoft Licensing Technology, LLC Application Service Architecture
CN105577822A (en) * 2016-01-27 2016-05-11 北京国电通网络技术有限公司 Content distribution network (CDN) node based cache centralized management system
CN106254423A (en) * 2016-07-20 2016-12-21 普元信息技术股份有限公司 The method realizing Restful service release quickly based on micro services framework
US20180084075A1 (en) * 2016-09-16 2018-03-22 Oracle International Corporation Request cache to improve web applications performance
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN108306917A (en) * 2017-01-13 2018-07-20 中国移动通信集团江西有限公司 The register method and device of data processing method and device, micro services module
CN107124465A (en) * 2017-05-12 2017-09-01 国网江苏省电力公司电力科学研究院 Towards the distributed photovoltaic remote data acquisition system framework method accessed on a large scale
CN107835181A (en) * 2017-11-16 2018-03-23 泰康保险集团股份有限公司 Right management method, device, medium and the electronic equipment of server cluster
CN108011967A (en) * 2017-12-15 2018-05-08 四川长虹电器股份有限公司 Picture upload method based on AWS micro services
CN109995713A (en) * 2017-12-30 2019-07-09 华为技术有限公司 Service processing method and relevant device in a kind of micro services frame
CN108833137A (en) * 2018-05-18 2018-11-16 南京南瑞信息通信科技有限公司 A kind of flexibility micro services Monitoring framework framework
CN108834177A (en) * 2018-06-08 2018-11-16 京信通信系统(中国)有限公司 Load-balancing method, device, computer equipment and storage medium
CN108920133A (en) * 2018-06-14 2018-11-30 北京三快在线科技有限公司 Across Programming with Pascal Language method, apparatus, electronic equipment and storage medium
CN109089163A (en) * 2018-07-27 2018-12-25 武汉斗鱼网络科技有限公司 Barrage message distributing method, device, equipment and storage medium
CN109660585A (en) * 2018-09-28 2019-04-19 深圳壹账通智能科技有限公司 Call method, device, equipment and the storage medium of AOP enhancing objects services
CN109587071A (en) * 2018-11-30 2019-04-05 北京工业大学 Micro services load-balancing method based on SDN
CN109587246A (en) * 2018-12-06 2019-04-05 国云科技股份有限公司 A kind of implementation method of the micro services frame of integrated multiple kinds independent assortment
CN109636334A (en) * 2018-12-07 2019-04-16 深圳市汇鑫科技股份有限公司 A kind of property intelligence community service system and method
CN111324577A (en) * 2018-12-17 2020-06-23 大唐移动通信设备有限公司 Method and device for reading and writing Yml file
CN109683905A (en) * 2018-12-24 2019-04-26 国云科技股份有限公司 A kind of system method for automatically releasing
CN111352577A (en) * 2018-12-24 2020-06-30 杭州海康威视系统技术有限公司 Object storage method and device
CN109814909A (en) * 2019-01-18 2019-05-28 南京绿新能源研究院有限公司 Method based on Spring cloud micro services framework cloud SCADA system
CN109766080A (en) * 2019-01-22 2019-05-17 努比亚技术有限公司 Micro services register method, device, electronic equipment and readable storage medium storing program for executing
CN110048879A (en) * 2019-03-12 2019-07-23 平安医疗健康管理股份有限公司 Micro services register method, device, electronic equipment and computer readable storage medium
CN110099099A (en) * 2019-03-28 2019-08-06 中国电子科技集团公司电子科学研究院 For the spatial information micro services encapsulation at terrestrial information port and service integration method
CN110149396A (en) * 2019-05-20 2019-08-20 华南理工大学 A kind of platform of internet of things construction method based on micro services framework
CN110262972A (en) * 2019-06-17 2019-09-20 中国科学院软件研究所 A kind of failure testing tool and method towards micro services application
CN110661780A (en) * 2019-08-15 2020-01-07 西安雷迪信息技术有限公司 Wireless city data sharing method and system based on SAAS application
CN110602178A (en) * 2019-08-26 2019-12-20 杭州电子科技大学 Method for calculating and processing temperature sensor data based on edge compression
CN110781476A (en) * 2019-10-15 2020-02-11 南京南瑞信息通信科技有限公司 Flexible micro-service security access control method and system
CN110971449A (en) * 2019-10-25 2020-04-07 武汉烽火众智数字技术有限责任公司 Service management and control system based on micro-service architecture
CN110989983A (en) * 2019-11-28 2020-04-10 深圳航天智慧城市系统技术研究院有限公司 Zero-coding application software rapid construction system
CN111193803A (en) * 2019-12-31 2020-05-22 四川省公安科研中心 Spring group-based micro-service construction method and spring group micro-service framework
CN111158792A (en) * 2020-01-02 2020-05-15 普元信息技术股份有限公司 System and method for realizing dynamic configurable service parameter verification processing under distributed architecture
CN111338813A (en) * 2020-02-10 2020-06-26 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for dynamically generating middleware
CN111414352A (en) * 2020-03-27 2020-07-14 北京明略软件系统有限公司 Database information management method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590236A (en) * 2021-08-03 2021-11-02 聚好看科技股份有限公司 Server and micro-service declarative interface timeout configuration method
CN113590236B (en) * 2021-08-03 2023-10-31 聚好看科技股份有限公司 Server and microservice declarative interface timeout configuration method
CN114285857A (en) * 2021-12-31 2022-04-05 中企云链(北京)金融信息服务有限公司 Load balancing method, device and system
CN114285857B (en) * 2021-12-31 2024-01-26 中企云链(北京)金融信息服务有限公司 Load balancing method, device and system

Also Published As

Publication number Publication date
CN112256351B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN109547570B (en) Service registration method, device, registration center management equipment and storage medium
US10503490B2 (en) Mobile application processing
US7739486B2 (en) Electronic device supporting multiple update agents
US20210133002A1 (en) Using scripts to bootstrap applications with metadata from a template
US10372463B1 (en) Provisioning a computerized device with an operating system
CN101571809A (en) Implementation method of plug-in registration and device thereof
CN110968331B (en) Method and device for running application program
CN110580305B (en) Method, apparatus, system and medium for generating identifier
US11303583B2 (en) Resource trees by management controller
CN110308999B (en) Method for dynamically sharing dependency package between applications, storage medium and mobile terminal
US20130227153A1 (en) Computer-implemented method, computer system and computer readable medium
CN112256351B (en) Method for realizing Feign component, method and device for calling micro-service
CN112311786A (en) Service request processing method and device, storage medium and computing equipment
CN107220074A (en) To the access of supporting layer software function, upgrade method and device
CN106354832B (en) Data publishing method, device and system
CN111290773A (en) System upgrading method, device and readable storage medium
US10289744B2 (en) Method and apparatus for managing content in a processing device
US20190196846A1 (en) Information processing system, container management apparatus, and container management method
CN111338829B (en) Calling method and device for remote procedure call service
CN117369926A (en) Micro-service-based menu management method, device, equipment and storage medium
CN110730197A (en) Service discovery method and system
CN114356456A (en) Service processing method, device, storage medium and electronic equipment
CN113050962A (en) Mobile service upgrading method, device and terminal
CN111984343B (en) Plug-in resource searching method, device, equipment and readable storage medium
CN110955440B (en) Screen locking application separation upgrading method, device, equipment and computer readable medium

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
GR01 Patent grant
GR01 Patent grant