CN117675901A - Heterogeneous microservice-based automatic discovery method - Google Patents

Heterogeneous microservice-based automatic discovery method Download PDF

Info

Publication number
CN117675901A
CN117675901A CN202311618430.5A CN202311618430A CN117675901A CN 117675901 A CN117675901 A CN 117675901A CN 202311618430 A CN202311618430 A CN 202311618430A CN 117675901 A CN117675901 A CN 117675901A
Authority
CN
China
Prior art keywords
service
registry
micro
discovery
namespaces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311618430.5A
Other languages
Chinese (zh)
Inventor
刘传相
李存冰
陈焕新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Software Technology Co Ltd
Original Assignee
Inspur Software Technology 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 Inspur Software Technology Co Ltd filed Critical Inspur Software Technology Co Ltd
Priority to CN202311618430.5A priority Critical patent/CN117675901A/en
Publication of CN117675901A publication Critical patent/CN117675901A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method for automatically discovering heterogeneous micro-services, which belongs to the technical field of registries in micro-service frameworks, and defines a set of distributed registry interfaces, and a system compatible with various micro-service frameworks and various registries is constructed to support the service registries such as SpringCloud, dubbo, isito and the like and Consul, eureka, nacos, kubernetes service discovery and the like. The service in different types of micro-service frameworks is automatically acquired through the packaging standard interface, the difference of different micro-service frameworks is eliminated, the contact barriers among various registries are broken, the advantages of all the registries are integrated, and convenience and uniformity are provided for automatically finding the micro-service so as to adapt to diversified product application scenes.

Description

Heterogeneous microservice-based automatic discovery method
Technical Field
The invention relates to the technical field of registries in micro-service frameworks, in particular to a method for automatically discovering heterogeneous micro-services.
Background
Micro-service architecture is a service-oriented architecture style that improves the flexibility and scalability of the system by splitting an application into a small, loosely coupled set of services. While the registry is one of the key components in the micro-service architecture, it serves a key role in service discovery and routing, which serves to manage and maintain metadata information for individual micro-service instances, including service names, addresses, versions, etc. It allows service providers to register their services with a registry, while also allowing service consumers to query and discover available service instances, providing support for communications between the service providers and service consumers.
Furthermore, because different micro-service frameworks may use different registry components, this makes it difficult to uniformly overview and manage different types of service instances. Conventional registries are generally only suitable for a single micro-service framework, and have a plurality of problems for centralized management and control of service instances of a plurality of micro-service frameworks. Therefore, the development of a compatible, universal and efficient service automatic discovery system is of great practical significance to meet the requirements of various micro-service frameworks.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method for automatically discovering heterogeneous micro services, which automatically acquires service instances from a plurality of different registries and can continuously monitor the existence status and the health status of the service instances. The method provides a unified and convenient service instance discovery and monitoring technology, and automatically discovers service instances in a centralized way through the technology, so that developers do not need to pay attention to a registration center for micro-service use, the developers can conveniently discover services and monitor running conditions, the complexity of service discovery is reduced, and the efficiency of micro-service management is improved.
The technical scheme of the invention is as follows:
a method based on heterogeneous micro-service automatic discovery includes
Test connection, namespace, service auto-discovery, instance auto-discovery, adapting industry mainstream registry components for a unified abstract registry interface.
Further, the method comprises the steps of,
a set of standard distributed registry interfaces is defined in an abstract way, and four types of interfaces including test links, namespaces, service automatic discovery and instance automatic discovery are mainly provided, so that the method is suitable for mainstream registry components in the industry.
Through a set of general and efficient registry interfaces, automatic service discovery is realized, and heterogeneous micro-service frameworks are compatible so as to adapt to the requirements of a plurality of micro-service frameworks.
By realizing the DRI standard interface, the access to various micro service frameworks is realized, the service automatic discovery function is provided for the outside in a unified way, and the bottom layer difference is shielded.
Further, the method comprises the steps of,
Included
step one: establishing a standard distributed registry interface;
abstracting a unified function method of a registry according to a registry component of the main stream in the industry; the method comprises the following four aspects:
1) Test connection: connecting a registry to obtain the health state of a registry component;
2) Namespaces: micro services typically exist in different namespaces in a registry, acquiring namespaces of the registry to acquire services under specified namespaces;
3) Service auto-discovery: acquiring services under all or specified namespaces from a registry;
4) Example auto discovery: and acquiring service examples and weights, and modifying the state and weights of the examples.
According to the unified function method, the corresponding interfaces DRI and DRI are packaged, the DRI can be adapted to a registration center component mainstream in the industry, and a heterogeneous micro service framework can be integrated through the packaged interfaces to provide consistent APIs for users to use.
Step two: the AD-HMS implements a packaged distributed registry interface.
The automatic acquisition of micro-services by AD-HMS has the following flow:
1) Initializing configuration, namely adding a self-defined embedded point code into the configuration of an application program, and butting DRI;
2) The service is requested, the creation of the micro-service application is initiated with the configuration information of the registry, and the service information under all or appointed namespaces can be obtained by uniformly driving the factory to process and then sending the request, and the service instance information is obtained;
3) Data storage, storing service information, and locally persistence and timing updating of the service information, wherein the service information comprises an IP (Internet protocol), a port, a state, a weight and an interface of a service instance;
4) And providing personalized information display pages based on data and capabilities of different registry components, wherein the differentiation function is open.
The invention has the beneficial effects that
The invention is compatible with the registration centers of main stream distributed system architectures such as Consul, eureka, nacos, kubernetes service discovery and the like, can realize the automatic discovery of heterogeneous micro service type services such as SpringCloud, dubbo, isito and the like, and automatically realizes the service instance discovery in the heterogeneous micro service framework through a certain technology so as to provide unified, convenient and reliable service instance management capability and support the automatic service discovery of various micro service type applications.
Drawings
FIG. 1 is a block diagram of the structural workflow of the present invention;
fig. 2 is a schematic diagram of the overall technical architecture of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
The invention discloses a service automatic discovery method for realizing heterogeneous micro-service frameworks, which defines a set of distributed registry interfaces (DistributedRegistry Interface, DRI for short), constructs a system compatible with various micro-service frameworks and various registries, and supports SpringCloud, dubbo, isito and other micro-service frameworks, consul, eureka, nacos, kubernetes service discovery and other service registries. The service in different types of micro-service frameworks is automatically acquired through the packaging standard interface, the difference of different micro-service frameworks is eliminated, the contact barriers among various registries are broken, the advantages of all the registries are integrated, and convenience and uniformity are provided for automatically finding the micro-service so as to adapt to diversified product application scenes.
According to the method, a unified function method of a registry is abstracted according to a main stream registry component. Including test connection, namespace, service auto-discovery, instance auto-discovery. And then adapting the mainstream registry component of the industry for the unified abstract registry interface.
Step one: establishing a standard Distributed Registry Interface (DRI)
First, according to the main stream registry component in the industry, abstracting a unified function method of the registry, the method comprises the following four aspects:
1) Test connection: and connecting the registry to obtain the health status of the registry component.
2) Namespaces: micro services typically exist in a registry in different namespaces, with the namespaces of the registry being acquired in order to acquire services under a specified namespace.
3) Service auto-discovery: all or services under a specified namespace are obtained from the registry.
4) Example auto discovery: and acquiring service examples and weights, and modifying the state and weights of the examples.
Next, according to the above abstracted unified functional method, the corresponding interfaces DRI, DRI are packaged to adapt to the registry components of the mainstream industry, including but not limited to Consul, eureka, nacos, kubernetes service discovery, etc., and through the packaged interfaces, a heterogeneous micro service framework can be integrated to provide a consistent API for users to use.
Step two: AD-HMS implementation packaged Distributed Registry Interface (DRI)
The automatic acquisition of micro-services by AD-HMS has the following flow:
1) Initializing the configuration. Adding a self-defined embedded point code in the configuration of an application program, and butting DRI;
2) Requesting a service. The configuration information of the registry is carried to initiate the creation of the micro-service application, and the service information under all or appointed namespaces can be obtained by uniformly driving the factory to process and then sending a request.
3) And (5) data storage. Storing service information, locally persisting and periodically updating service information, including but not limited to IP, port, state, weight, interface of service instance.
4) Information presentation and operation. Based on the data and the capabilities of different registry components, a personalized information display page is provided, and the differentiation function is opened.
With this technique, the docked registry component includes: consul, eureka, nacos, etc., and Kubernetes service discovery, implements the service auto-discovery function of heterogeneous micro-service frameworks.
The foregoing description is only illustrative of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (8)

1. A method for automatically discovering based on heterogeneous micro-services is characterized in that,
including test connection, namespace, service auto discovery, instance auto discovery, adaptation of registry components for a unified abstract registry interface.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
a distributed registry interface is defined, four types of interfaces of test links, namespaces, service auto-discovery and instance auto-discovery are provided, and the method is suitable for mainstream registry components in the industry.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
through the interface of the registration center, automatic service discovery is realized, and the heterogeneous micro-service frameworks are compatible so as to adapt to the requirements of a plurality of micro-service frameworks.
4. The method of claim 3, wherein the step of,
by realizing the DRI standard interface, the access to various micro service frameworks is realized, the service automatic discovery function is provided for the outside in a unified way, and the bottom layer difference is shielded.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
Included
step one: establishing a standard distributed registry interface;
step two: the AD-HMS implements a packaged distributed registry interface.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
step one, abstracting a unified function method of a registry according to a registry component of a mainstream in the industry; the method comprises the following four aspects:
1) Test connection: connecting a registry to obtain the health state of a registry component;
2) Namespaces: micro services typically exist in different namespaces in a registry, acquiring namespaces of the registry to acquire services under specified namespaces;
3) Service auto-discovery: acquiring services under all or specified namespaces from a registry;
4) Example auto discovery: and acquiring service examples and weights, and modifying the state and weights of the examples.
7. The method of claim 6, wherein the step of providing the first layer comprises,
according to the unified function method, the corresponding interfaces DRI and DRI are packaged, the DRI can be adapted to a registration center component mainstream in the industry, and a heterogeneous micro service framework can be integrated through the packaged interfaces to provide consistent APIs for users to use.
8. The method according to claim 5 or 6, wherein,
the process of automatically acquiring the micro-service by adopting the AD-HMS comprises the following steps:
1) Initializing configuration, namely adding a self-defined embedded point code into the configuration of an application program, and butting DRI;
2) The service is requested, the creation of the micro-service application is initiated with the configuration information of the registry, and the service information under all or appointed namespaces can be obtained by uniformly driving the factory to process and then sending the request, and the service instance information is obtained;
3) Data storage, storing service information, and locally persistence and timing updating of the service information, wherein the service information comprises an IP (Internet protocol), a port, a state, a weight and an interface of a service instance;
4) And providing personalized information display pages based on data and capabilities of different registry components, wherein the differentiation function is open.
CN202311618430.5A 2023-11-30 2023-11-30 Heterogeneous microservice-based automatic discovery method Pending CN117675901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311618430.5A CN117675901A (en) 2023-11-30 2023-11-30 Heterogeneous microservice-based automatic discovery method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311618430.5A CN117675901A (en) 2023-11-30 2023-11-30 Heterogeneous microservice-based automatic discovery method

Publications (1)

Publication Number Publication Date
CN117675901A true CN117675901A (en) 2024-03-08

Family

ID=90070684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311618430.5A Pending CN117675901A (en) 2023-11-30 2023-11-30 Heterogeneous microservice-based automatic discovery method

Country Status (1)

Country Link
CN (1) CN117675901A (en)

Similar Documents

Publication Publication Date Title
EP1560117A1 (en) System and method for publishing and accessing application apis on a generic terminal
JP3711866B2 (en) Framework having plug and play function and reconfiguration method thereof
US8117280B2 (en) Task computing
CN102053860B (en) CORBA-based OSGi distributed extensible system and method
Bellavista et al. Dynamic binding in mobile applications
CA2495024C (en) System and method for adaptable provisioning of generic application content
US9323587B2 (en) Method and system for automatic detecting and resolving APIs
JP2001043176A (en) High-performance bookmark for small footprint device application
EP1198102B1 (en) Extendable provisioning mechanism for a service gateway
CN111147308A (en) Network management method and system based on micro-service architecture
CA2310933A1 (en) Caching of reduced forms of web pages on a small footprint device
CN113296747B (en) Method for efficiently docking various mounting devices through software in intelligent lamp pole system
CN116016667A (en) Unified management method and system for multiple types of registries of cloud native platform
US6931427B2 (en) Method and apparatus for discovering data services in a distributed computer system
CN117675901A (en) Heterogeneous microservice-based automatic discovery method
Swindlehurst et al. An analysis of MUSIC and root-MUSIC in the presence of sensor perturbations
CN102624766B (en) System integration method and apparatus thereof
EP1845446A2 (en) System and method for publishing and accessing application APIS on a generic terminal
KR100282616B1 (en) Structure and Processing Method of Multiprotocol Gateway for Web and Applications
CN100570553C (en) Be used to be provided at the terminal and the method for the dynamic interaction between the application programs
US20090327389A1 (en) Stateful Business Application Processing In An Otherwise Stateless Service-Oriented Architecture
WO2000054525A1 (en) Mobile application service
WO2008111031A2 (en) An improved grid computing architecture and method for invoking network services for subscription
Bellavista et al. Policy-driven binding to information resources in mobility-enabled scenarios
US20080313646A1 (en) Storage-device discovery protocol

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