CN109412853B - Distributed service registration storage method, system, device and storage medium - Google Patents
Distributed service registration storage method, system, device and storage medium Download PDFInfo
- Publication number
- CN109412853B CN109412853B CN201811285284.8A CN201811285284A CN109412853B CN 109412853 B CN109412853 B CN 109412853B CN 201811285284 A CN201811285284 A CN 201811285284A CN 109412853 B CN109412853 B CN 109412853B
- Authority
- CN
- China
- Prior art keywords
- service
- micro
- information
- configuration center
- distributed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5041—Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a distributed service registration storage method, a system, a device and a storage medium, wherein the method comprises the following steps: abstract processing is carried out on the deployment mode and the service release mode of the micro service unit, and service data are sent to a distributed configuration center for storage; when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing; after the registration processing is completed, the distributed configuration center sends a data change notification to the micro-service unit and sends the changed address information to a client of a server in the micro-service unit, and the client synchronizes the changed address information to a local cache. The invention can realize dynamic service registration, discovery and arrangement of the information system, and improve the flexibility, usability and expandability of the system.
Description
Technical Field
The present invention relates to the field of data processing, and in particular, to a distributed service registration storage method, system, apparatus, and storage medium.
Background
With the continuous improvement of the informatization degree, the information system plays an increasingly important role in various industries, and particularly in the field of financial services, the information system is very important as a carrier of the information system. However, due to the complexity, universality and flexibility of banking business, more and more banking business systems are needed, and the banking business systems are more and more complex and bulky. In order to achieve enterprise-level consistency, financial institutions such as banks abstract and model the whole business, and different systems play different roles and have no choice but to be used in business processing flow. Due to the needs of business and internal processes, the completion of a business often involves multiple systems, including channels, marketing, management, accounting, clearing, etc., which makes the relationship between the systems extremely complex and the application depends on multiple related systems. On the other hand, for a single service, although there are many systems involved in the service flow, the systems are only involved in a certain aspect of service provided by the systems, and the systems are designed from an enterprise level perspective, and for individual applications, the concept of the system is too huge, so that the difficulty of development and deployment of the system is greatly increased.
In order to solve the problem, in recent years, the architecture idea of the micro-service is proposed in the industry, dependence on a larger system is converted into dependence on a light-weight service, the concept of the system is blurred, and the interior of the micro-service is highly aggregated. In the microservice architecture, one core problem is how to register and discover services, the key to which is how to store service data and provide queries and addressing. However, the existing microservice registration storage mode cannot realize dynamic service registration, discovery and arrangement of the information system, so that the flexibility, the usability and the scalability of the system need to be improved.
Disclosure of Invention
In order to solve the technical problems, the invention provides a distributed service registration storage method, a system, a device and a storage medium, which solve the problem that the flexibility, the availability and the expandability of the system are required to be improved because the current micro service registration system cannot realize the dynamic service registration, discovery and arrangement of an information system.
According to a first aspect of the embodiments of the present invention, a distributed service registration storage method is provided, where the method includes:
abstract processing is carried out on the deployment mode and the service release mode of the micro service unit, and service data are sent to a distributed configuration center for storage;
when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing;
after the registration processing is completed, the distributed configuration center sends a data change notification to the micro service unit and sends the changed address information to a client of a server in the micro service unit, and the client synchronizes the changed address information to a local cache.
According to a second aspect of an embodiment of the present invention, a distributed service registration storage system, the system comprising:
the micro service unit is used for carrying out abstract processing on the deployment mode and the service release mode of the micro service unit and sending the service data to the distributed configuration center for storage; when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing;
and the distributed configuration center is used for sending a data change notification to the micro service unit after the registration processing is finished, and sending the changed address information to a client of a server in the micro service unit, so that the client synchronizes the changed address information to a local cache.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable storage medium embodying a computer program, wherein the computer program, when executed by one or more computers, causes the one or more computers to perform the operations of:
the operations comprise the steps comprised by the distributed service registration storage method as described in any one of the above.
According to a fourth aspect of the embodiments of the present invention, there is provided a distributed service registration storage apparatus, the apparatus including:
a memory storing computer readable instructions;
a processor executing the computer readable instructions to perform the steps included in the distributed service registration storage method as described above.
The implementation of the distributed service registration storage method, the system, the device and the storage medium provided by the embodiment of the invention has the following advantages: the dynamic service registration, discovery and arrangement of the information system can be realized, and the flexibility, the usability and the expandability of the system are improved.
Drawings
FIG. 1 is a flow chart of a distributed service registration storage method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a distributed service registration storage system 1 according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a distributed service registration storage method according to an embodiment of the present invention, and referring to fig. 1, the method includes:
step S1, abstract the deployment mode and service release mode of the micro service unit, and send the service data to the distributed configuration center for storage; the micro service unit is a logic concept, the real physical concept is a server, one physical server belongs to one micro service unit, and one micro service unit comprises a plurality of physical servers. The service data is stored in a tree structure, and the stored data passes through the distributed configuration center component, namely the stored content of the distributed configuration center component is the service data. And abstracting the deployment mode and service release of the micro service unit, dividing the deployment mode and the service release into deployment information and micro service information, describing the deployment information and the micro service information by using a tree hierarchy, and finally storing service data. The deployment information comprises information of a city, a park, a machine room, components, modules and the like where the micro service unit is located, and also comprises database and table information contained in the micro service unit, which are used for supporting the deployment form of the distributed distribution sub-table, and server address information in the micro service unit; the micro service information comprises information of components, modules and the like where the micro service is located, and also comprises information of a service identifier, a read-write identifier and the like of the micro service. The deployment information is organized according to a tree hierarchy, and the specific sequence is city, park, machine room, component, module, micro-service unit, database information and server address information.
Step S2, when the server of the micro service unit is started, the distributed configuration center is informed actively to complete the address registration processing; when a server under the micro-service unit is started, the distributed configuration center is actively informed, information such as an IP address, a port number and the like of the server is stored in the micro-service unit to which the server belongs, the success of service starting is indicated, and address registration is completed.
Step S3, after the registration process is completed, the distributed configuration center sends a data change notification to the microservice unit, and sends the changed address information to the client of the server in the microservice unit, and the client synchronizes the changed address information to the local cache. When each physical server is started, each physical server is connected to the distributed configuration center through a configuration center client, the storage content of the configuration center is cached locally through the client, and corresponding information is obtained in the local cache.
In an embodiment of the present invention, the sending the service data to the distributed configuration center storage includes: storing deployment information and micro-service information in the distributed configuration center in a tree hierarchy. The deployment mode of the micro-service unit is abstracted, and the micro-service unit has high expandability through a service data storage mode based on a tree hierarchical structure.
In an embodiment of the present invention, the actively notifying the distributed configuration center of completing address registration processing includes: the distributed configuration center completes address registration processing by storing the address information of the micro service unit, and can support dynamic deployment and registration of the micro service unit through a service registration mechanism based on active addition.
In an embodiment of the invention, the method further comprises: and when each server carries out an external micro-service request, acquiring the IP address information of the server from the local cache according to the micro-service information of the external server and calling the external service. Through a service addressing mechanism based on passive notification, when the provider of the service changes, the user thereof passively receives the change notification, and the micro service unit can be effectively addressed and used based on the change data.
The invention can realize dynamic service registration, discovery and arrangement of the information system, and improve the flexibility, usability and expandability of the system. Specifically, the difficulty of deployment and development of an application system is simplified, the application does not need to care about the whole related dependency system, and the service can be called only by searching related dependency services through a service registration center; the service provider is flexible in deployment and has strong telescopic performance, and the micro-service deployment unit can be dynamically increased or withdrawn without influencing the use of a calling party; the granularity of the service unit is smaller, the mode can support the provision of more system functions through the arrangement of the service, and the expandability is stronger.
Fig. 2 is a schematic structural diagram of a distributed service registration storage system 1 according to an embodiment of the present invention, and referring to fig. 2, the system 1 includes:
the micro-service unit 100 is used for performing abstract processing on a deployment mode and a service release mode of the micro-service unit, and sending service data to the distributed configuration center for storage; when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing; the micro service unit is a logic concept, the real physical concept is a server, one physical server belongs to one micro service unit, and one micro service unit comprises a plurality of physical servers. The service data is stored in a tree structure, and the stored data passes through the distributed configuration center component, namely the stored content of the distributed configuration center component is the service data. Abstracting the deployment mode of the micro-service unit and service release, dividing the deployment mode into deployment information and micro-service information, describing the deployment information and the micro-service information by using a tree hierarchy, and finally storing service data. The deployment information comprises information of a city, a park, a machine room, components, modules and the like where the micro service unit is located, and also comprises database and table information contained in the micro service unit, which are used for supporting the deployment form of the distributed distribution sub-table, and server address information in the micro service unit; the micro service information comprises information of components, modules and the like where the micro service is located, and also comprises information of a service identifier, a read-write identifier and the like of the micro service. The deployment information is organized according to a tree hierarchy, and the specific sequence is city, park, machine room, component, module, micro-service unit, database information and server address information.
And the distributed configuration center 200 is configured to send a data change notification to the microservice unit after the registration processing is completed, and send the changed address information to a client of a server in the microservice unit, so that the client synchronizes the changed address information to a local cache. When each physical server is started, each physical server is connected to the distributed configuration center through a configuration center client, the storage content of the configuration center is cached locally through the client, and corresponding information is obtained in the local cache.
In an embodiment of the present invention, the sending the service data to the distributed configuration center storage includes: storing deployment information and micro-service information in the distributed configuration center in a tree hierarchy. The deployment mode of the micro-service unit is abstracted, and the micro-service unit has high expandability through a service data storage mode based on a tree hierarchical structure.
In an embodiment of the present invention, the actively notifying the distributed configuration center of completing address registration processing includes: the distributed configuration center completes address registration processing by storing the address information of the micro service unit, and can support dynamic deployment registration of the micro service unit by a service registration mechanism based on active addition.
In an embodiment of the invention, the method further comprises: and when each server carries out an external micro-service request, acquiring the IP address information of the server from the local cache according to the micro-service information of the external server and calling the external service. Through a service addressing mechanism based on passive notification, when the provider of the service changes, the user thereof passively receives the change notification, and the micro service unit can be effectively addressed and used based on the change data.
The invention can realize dynamic service registration, discovery and arrangement of the information system, and improve the flexibility, usability and expandability of the system. Specifically, the difficulty of deployment and development of an application system is simplified, the application does not need to care about the whole related dependency system, and the service can be called only by searching related dependency services through a service registration center; the service provider is flexible in deployment and has strong telescopic performance, and the micro-service deployment unit can be dynamically increased or withdrawn without influencing the use of a calling party; the granularity of the service unit is smaller, the mode can support the provision of more system functions through the arrangement of the service, and the expandability is stronger.
It should be noted that the operation of the distributed service registration storage method includes the same steps as the above-mentioned operation of the distributed service registration storage system, and specific contents are not described herein again.
Additionally, the present invention also provides a computer-readable storage medium containing a computer program that, when executed by one or more computers, causes the one or more computers to perform the operations of: the operation includes the steps included in the above-described distributed service registration storage method, which are not described herein again. The computer-readable storage medium may include various storage media such as ROM/RAM, magnetic disk, optical disk, magnetic disk, flash memory, etc., and is used to store a storage medium that can execute the computer program.
In addition, the present invention also provides a distributed service registration storage apparatus, the apparatus comprising:
a memory storing computer readable instructions;
a processor executing the computer readable instructions to perform the steps included in the distributed service registration storage method as described above. It should be noted that the apparatus includes: for example, a smart terminal, a mobile device, a laptop computer, a desktop computer, a server, or a network device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by combining software and a hardware platform. With this understanding in mind, all or part of the technical solutions of the present invention that contribute to the background can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments or some parts of the embodiments of the present invention.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the scope of the present invention, therefore, the present invention is not limited to the above embodiments, and the modifications and variations of the present invention are equivalent to the modifications and variations of the present invention as disclosed in the following claims.
Claims (8)
1. A distributed service registration storage method, the method comprising:
abstracting a deployment mode and a service release mode of a micro-service unit to obtain service data containing deployment information and micro-service information, and sending the service data to a distributed configuration center for storage, wherein the deployment information comprises: the system comprises a city, a park, a machine room, components and modules where the micro service units are located, database and table information contained under the micro service units, and server address information under the micro service units; the micro service information comprises: the module and the module where the micro service is located, and the service identifier and the read-write identifier of the micro service;
when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing;
after the registration processing is completed, the distributed configuration center sends a data change notification to the micro-service unit and sends changed address information to a client of a server in the micro-service unit, and the client synchronizes the changed address information to a local cache;
and when each server carries out an external micro-service request, according to micro-service information of an external server, acquiring address information from the local cache and calling external services.
2. The method of claim 1, wherein sending the service data to a distributed configuration center store comprises:
storing deployment information and micro-service information in the distributed configuration center in a tree hierarchy.
3. The method of claim 1, wherein proactively notifying the distributed configuration center of completion of address registration processing comprises:
and the distributed configuration center finishes address registration processing by storing the address information of the micro service unit.
4. A distributed service registry storage system, the system comprising:
the micro-service unit is used for abstracting the deployment mode and the service release mode of the micro-service unit to obtain service data containing deployment information and micro-service information, and sending the service data to the distributed configuration center for storage, wherein the deployment information comprises: the system comprises a city, a park, a machine room, components and modules where the micro service units are located, database and table information contained under the micro service units, and server address information under the micro service units; the micro service information comprises: the module and the module where the micro service is located, and the service identifier and the read-write identifier of the micro service; when the server of the micro service unit is started, the distributed configuration center is actively informed to complete address registration processing;
the distributed configuration center is used for sending a data change notification to the micro service unit after the registration processing is finished, and sending changed address information to a client of a server in the micro service unit so that the client synchronizes the changed address information to a local cache;
and when each server carries out an external micro-service request, acquiring address information from the local cache according to micro-service information of an external server and carrying out external service calling.
5. The system of claim 4, wherein sending the service data to a distributed configuration center store comprises:
storing deployment information and micro-service information in the distributed configuration center in a tree hierarchy.
6. The system of claim 4, wherein the proactively notifying the distributed configuration center of completion of address registration processing comprises:
and the distributed configuration center finishes address registration processing by storing the address information of the micro service unit.
7. A computer-readable storage medium embodying a computer program, the computer program when executed by one or more computers causing the one or more computers to perform operations comprising:
the operations comprising the steps comprised by the distributed service registration storage method according to any of claims 1-3.
8. A distributed service registration storage apparatus, the apparatus comprising:
a memory storing computer readable instructions;
a processor executing the computer readable instructions to perform the steps included in the distributed service registration storage method of any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811285284.8A CN109412853B (en) | 2018-10-31 | 2018-10-31 | Distributed service registration storage method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811285284.8A CN109412853B (en) | 2018-10-31 | 2018-10-31 | Distributed service registration storage method, system, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109412853A CN109412853A (en) | 2019-03-01 |
CN109412853B true CN109412853B (en) | 2022-05-17 |
Family
ID=65470608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811285284.8A Active CN109412853B (en) | 2018-10-31 | 2018-10-31 | Distributed service registration storage method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109412853B (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112153093B (en) * | 2019-06-28 | 2024-04-16 | 北京京东尚科信息技术有限公司 | Cluster-based task scheduling method, device, equipment and readable storage medium |
CN110365809B (en) * | 2019-07-23 | 2021-12-14 | 中南民族大学 | Distributed server address configuration system and method |
CN111200560B (en) * | 2019-12-26 | 2023-04-07 | 中国平安人寿保险股份有限公司 | Microservice registration method, microservice registration device, microservice registration equipment and storage medium |
CN111130939B (en) * | 2019-12-26 | 2021-09-10 | 深圳前海环融联易信息科技服务有限公司 | Flow control method and device, computer equipment and storage medium |
CN112148710B (en) * | 2020-09-21 | 2023-11-14 | 珠海市卓轩科技有限公司 | Micro-service library separation method, system and medium |
CN112506630A (en) * | 2020-12-01 | 2021-03-16 | 国科晋云技术有限公司 | Multi-domain service platform architecture |
CN112463382B (en) * | 2020-12-01 | 2024-01-05 | 中国工商银行股份有限公司 | Heterogeneous data processing method and device under distributed scene |
CN113094074B (en) * | 2021-05-07 | 2024-03-19 | 聚好看科技股份有限公司 | Service cluster updating method and device |
CN113760597A (en) * | 2021-09-15 | 2021-12-07 | 卫宁健康科技集团股份有限公司 | Intermediate data processing method and device, electronic equipment and storage medium |
CN114726911B (en) * | 2022-04-02 | 2023-09-19 | 湖南大学 | Routing parameter transfer method for distributed industrial robot online service arrangement |
CN115242863B (en) * | 2022-04-20 | 2024-03-26 | 广东数夫软件有限公司 | Micro-service application method and micro-service architecture system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101595527B1 (en) * | 2011-03-22 | 2016-02-22 | 한국전자통신연구원 | System for configurating dynamic service network based on netstore and method thereof |
CN105515759B (en) * | 2015-11-27 | 2018-11-09 | 国网信息通信产业集团有限公司 | A kind of micro services register method and system |
CN108696551A (en) * | 2017-04-06 | 2018-10-23 | 中兴通讯股份有限公司 | The method and apparatus that addressing is asked between system process |
KR20180120991A (en) * | 2017-04-28 | 2018-11-07 | 한국전자통신연구원 | Apparatus and method for distributed installation of micro-service style application |
CN108600360A (en) * | 2018-04-18 | 2018-09-28 | 国电南京自动化股份有限公司 | A kind of REST service system and method based on zookeeper |
CN108667925B (en) * | 2018-05-04 | 2020-10-16 | 北京天元创新科技有限公司 | Method and system for seamless access of WEB application to distributed system |
-
2018
- 2018-10-31 CN CN201811285284.8A patent/CN109412853B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109412853A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109412853B (en) | Distributed service registration storage method, system, device and storage medium | |
US8924559B2 (en) | Provisioning services using a cloud services catalog | |
CN104572278B (en) | The method, device and equipment of light application calling local side ability | |
US20110166952A1 (en) | Facilitating dynamic construction of clouds | |
CN107103011B (en) | Method and device for realizing terminal data search | |
CN110032886A (en) | The method and apparatus of access authorization for resource management | |
CN109408751A (en) | A kind of data processing method, terminal, server and storage medium | |
CN109725989B (en) | Task execution method and device | |
US20080249994A1 (en) | System and process for server side stateless data interchange | |
CN111786984B (en) | Pod communication connection method and device, electronic equipment and storage medium | |
CN107172214A (en) | A kind of service node with load balancing finds method and device | |
CN111431818B (en) | Cross-domain request flow distribution method and device, storage medium and computer equipment | |
US20170250924A1 (en) | Stateless services in content management clients | |
CN107395711A (en) | Heterogeneous system session access method and relevant apparatus | |
CN109582476B (en) | Data processing method, device and system | |
CN110928895B (en) | Data query and data table establishment method, device and equipment | |
CN105653566B (en) | A kind of method and device for realizing database write access | |
CN110855764A (en) | Network traffic scheduling method and device and electronic equipment | |
WO2019237949A1 (en) | Search method and device | |
CN113254819B (en) | Page rendering method, system, equipment and storage medium | |
CN110837499A (en) | Data access processing method and device, electronic equipment and storage medium | |
CN106559454B (en) | Resource access method, device and system | |
CN113761053A (en) | Data query method and device, electronic equipment and storage medium | |
US7610373B2 (en) | Voting mechanism for session invalidation processing in an application server cluster | |
CN112040023A (en) | Object access method and device, electronic equipment and machine-readable storage 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 |