CN110708356B - Method and system for managing third party application by registry - Google Patents
Method and system for managing third party application by registry Download PDFInfo
- Publication number
- CN110708356B CN110708356B CN201910841639.5A CN201910841639A CN110708356B CN 110708356 B CN110708356 B CN 110708356B CN 201910841639 A CN201910841639 A CN 201910841639A CN 110708356 B CN110708356 B CN 110708356B
- Authority
- CN
- China
- Prior art keywords
- service
- state
- party
- offline
- cache
- 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
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000008569 process Effects 0.000 claims abstract description 8
- 238000012544 monitoring process Methods 0.000 claims abstract description 6
- 238000004891 communication Methods 0.000 claims abstract description 3
- 238000012545 processing Methods 0.000 claims description 22
- 238000001514 detection method Methods 0.000 claims description 21
- 230000004044 response Effects 0.000 claims description 10
- 238000012423 maintenance Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
Classifications
-
- 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
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Hardware Redundancy (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a method and a system for managing third party applications by a registry. The method of the invention is to obtain the service information of the third party service comprising service address, service port, service name; then, sending a request for service registration to a registration center; the service state of the third party service is detected regularly, and service offer or service offline is requested to a registry; and carrying out the processes of offline, forced online and logout on the third party service through event monitoring and state pulling. The system comprises a third party service agent which is responsible for communication with a registration center and detecting the service state of the third party service at fixed time, so as to realize service registration, offline, forced online and logout of the third party service. The invention provides the service information of the third party service in the registry, and automatically processes the service continuation, offline, forced online and forced offline of the third party service; may be used in a registry in a micro service to manage third party applications.
Description
Technical Field
The invention relates to the technical field of micro-service management, in particular to a method and a system for managing third party applications by a registry.
Background
The registry is one of the core basic services in the micro-service architecture. In the architecture of micro services, the number of services is numerous; and many services are clustered for high availability; if the information of each service is maintained by the traditional configuration mode, the difficulties of operation, maintenance, upgrading and management are greatly improved.
The registration center can uniformly manage service information, maintain the service state of each micro service, and provide mechanisms such as service registration, service discovery and the like. To provide a service at a registry, a service provider needs to perform service registration. Common ways of service registration include automatic registration and manual registration; automatic registration is when a service is started, where the service sends a service registration message to the registry. Manual registration is by command line or web manual registration service. For third party services, if the registry is to uniformly maintain information of the third party services, manual registration is usually required; but not a good service offline and detection method.
Disclosure of Invention
The technical problem solved by the invention is to provide a method and a system for managing third party application by a registry, which realize that the registry of a micro service architecture provides service information of third party service and automatically processes service contract, offline, forced online and forced offline of the third party service.
The technical scheme for solving the technical problems is as follows:
the method comprises the steps of obtaining service information of a third party service comprising a service address, a service port and a service name; then, sending a request for service registration to a registration center; the service state of the third party service is detected regularly, and service offer or service offline is requested to a registry; and carrying out the processes of offline, forced online and logout on the third party service through event monitoring and state pulling.
When the service state of the third party service is detected regularly, if the third party service can respond normally, a service renewal request is sent to a registration center, and the state of the third party service is marked as Active in a cache; if the third party service does not respond normally, marking the state of the third party service as non response in the cache; if the third party service has no normal response for 3 times continuously, sending a service Offline request to a registry, and marking the state of the third party service as Offline in a cache;
the time interval of the timing of the service state clock of the timing detection third party service is one third of the heartbeat timeout time configured by the registry.
The event monitoring is a monitor for registering a service event to a registration center, and the type of the received third-party service event is judged; triggering a corresponding processing flow of the third party service according to the judged type; the types include offline, forced online, logoff.
The state pulling is to acquire a service list of a registration center at fixed time; triggering corresponding processing flows of the third party service according to the acquired service state types, wherein the service state types comprise offline, forced offline and forced online; if the third party service exists in the cache but does not exist in the registration center, triggering a logout processing flow of the third party service.
The Offline processing of the third party service is to judge the state of the service in the cache, and if the service is a non response type, the state of the service is marked as an Offline in the cache;
the forced offline processing of the third party service is to judge the state of the service in the cache, if the service is not OutOfService, the state of the service is marked as OutOfService in the cache, and the timing detection of the service state of the service is stopped;
the forced online processing of the third party service is to judge the state of the service in the cache, if the service is OutOfService, marking the state of the service in the cache as an Offline, and recovering the timing detection of the service state of the service;
the process of canceling the third party service is to cancel the timing detection of the service state of the service and delete the record of the service in the cache.
The system comprises a third party service agent which is responsible for communicating with a registration center and detecting the service state of the third party service at fixed time, so as to realize service registration, offline, forced online and logout of the third party service;
the third party service agent specifically comprises a third party service registration module, a third party service state detection module, a state management module and a cache module;
the third party service registration module is responsible for receiving service information of third party service, including service address, service port and service name, and sending a request for service registration to a registration center;
the third party service state detection module detects the service availability of the third party service at regular time, and performs service renewal or service offline to the registry;
the state management module registers a service event monitor to the registry and compares the service states of the third party service in the registry and the cache; performing offline, forced online and logout processing on the third party service;
and the caching module stores service information and state of the third party service.
The invention can provide the service information of the third party service in the registry without changing the third party service and the registry, automatically process the service continuation, the offline, the forced online and the forced offline of the third party service, does not need to change the registry and the third party service, and is suitable for the old system or the third party service to access the registry.
Drawings
The invention is further described below with reference to the accompanying drawings:
FIG. 1 is a flow chart of the method of the present invention;
fig. 2 is a block diagram of the present invention.
Detailed Description
Referring to fig. 1, a method for managing third party services by a registry of the present invention includes the following steps:
s1, acquiring service information of a third party service, wherein the service information comprises a service address, a service port, a service name and the like;
s2, sending a request for service registration to a registration center;
s3, detecting the service state of the third party service regularly, and carrying out service renewal or service offline to the registry;
s4, processing flows such as offline, forced online, logout and the like are carried out on the third party service through event monitoring and state pulling.
In step S3, the step of detecting the service status of the third party service at regular time further includes:
if the third party service can normally respond, sending a service renewal request to the registry, and marking the state of the third party service as Active in the cache;
if the third party service does not respond normally, marking the state of the third party service as non response in the cache;
if the third party service has no normal response for 3 times continuously, sending a service Offline request to the registry, and marking the state of the third party service as Offline in the cache.
The foregoing timing detects the service status of the third party service, and the timing interval is equal to the heartbeat timeout time configured by the registry divided by 3.
In step S4, the event listening further includes:
1) Registering a listener of a service event with a registry;
2) Receiving a service event, and if the service event is not a third party service, ignoring the service event;
3) And judging the event type, and if the event type is an event such as offline, forced online, logout and the like, triggering the processing flows such as offline, forced online, logout and the like of the third party service.
In step S4, the state pulling further includes:
1) Acquiring a service list of a registry at regular time;
2) For the third party service, if the service state is offline, forced online and the like, triggering the processing flows of offline, forced online, logout and the like of the third party service;
3) And comparing the service list of the registry with the cached service list, and triggering the process flow of canceling the third party service if the third party service exists in the cache and does not exist in the registry.
The third party service of the invention has the following offline flow: judging the state of the service in the cache, and if the service is a non response type, marking the state of the service as an Offline in the cache.
The forced offline flow of the third party service is as follows: and judging the state of the service in the cache. If the service is not OutOfService, the state of the service is marked as OutOfService in the cache, and the timing detection of the service state of the service is stopped.
The forced online flow of the third party service is as follows: and judging the state of the service in the cache. If the service is OutOfService, the state of the service is marked as Offline in the cache, and the timing detection of the service state of the service is restored.
The third party service logout flow is: the service state timing detection of the service is canceled, and the record of the service in the cache is deleted.
As shown in FIG. 2, the system for managing the third party service by the registry of the present invention comprises a third party service agent which is responsible for communication with the registry and timing detection of the service state of the third party service, thereby realizing the functions of service registration, service renewal, service offline, etc. of the third party service. The third party service agent specifically comprises:
the third party service registration module is responsible for receiving service information of the third party service, including service addresses, service ports, service names and the like, and sending a service registration request to a registration center;
the third party service state detection module is used for detecting the service availability of the third party service at regular time and carrying out service renewal or service offline to the registry;
the state management module is used for carrying out processing flows of offline, forced online, logout and the like on the third party service by registering the service event monitor with the registry and comparing the service states of the third party service in the registry and the cache;
and the caching module is used for storing service information and state of the third party service.
In the invention, the service provider and the service consumer both directly communicate with the registry, and the method for integrating the third party service into the registry is provided for the service consumer to directly consume and perform state maintenance and management on the third party service.
Claims (2)
1. A method for managing third party application by a registry, which is characterized in that the method comprises the steps of obtaining service information of third party service comprising service address, service port and service name; then, sending a request for service registration to a registration center; the service state of the third party service is detected regularly, and service offer or service offline is requested to a registry; the third party service is processed by offline, forced online and logout through event monitoring and state pulling;
when the service state of the third party service is detected regularly, if the third party service can respond normally, a service renewal request is sent to a registration center, and the state of the third party service is marked as Active in a cache; if the third party service does not respond normally, marking the state of the third party service as non response in the cache; if the third party service has no normal response for 3 times continuously, sending a service Offline request to a registry, and marking the state of the third party service as Offline in a cache;
the time interval of the timing of the service state clock of the timing detection third party service is one third of the heartbeat timeout time configured by the registry;
the event monitoring is a monitor for registering a service event to a registration center, and the type of the received third-party service event is judged; triggering a corresponding processing flow of the third party service according to the judged type; the types comprise offline, forced online and logout;
the state pulling is to acquire a service list of a registration center at fixed time; triggering corresponding processing flows of the third party service according to the acquired service state types, wherein the service state types comprise offline, forced offline and forced online; if the third party service exists in the cache but does not exist in the registration center, triggering a logout processing flow of the third party service;
the Offline processing of the third party service is to judge the state of the service in the cache, and if the service is a non response type, the state of the service is marked as an Offline in the cache;
the forced offline processing of the third party service is to judge the state of the service in the cache, if the service is not OutOfService, the state of the service is marked as OutOfService in the cache, and the timing detection of the service state of the service is stopped;
the forced online processing of the third party service is to judge the state of the service in the cache, if the service is OutOfService, marking the state of the service in the cache as an Offline, and recovering the timing detection of the service state of the service;
the process of canceling the third party service is to cancel the timing detection of the service state of the service and delete the record of the service in the cache.
2. The system is characterized by comprising a third party service agent, wherein the third party service agent is responsible for communication with the registry and detecting the service state of the third party service at fixed time, so as to realize service registration, offline, forced online and logout of the third party service;
the third party service agent specifically comprises a third party service registration module, a third party service state detection module, a state management module and a cache module;
the third party service registration module is responsible for receiving service information of third party service, including service address, service port and service name, and sending a request for service registration to a registration center;
the third party service state detection module detects the service availability of the third party service at regular time, and performs service renewal or service offline to the registry;
the state management module registers a service event monitor to the registry and compares the service states of the third party service in the registry and the cache; performing offline, forced online and logout processing on the third party service;
the Offline processing of the third party service is to judge the state of the service in the cache, and if the service is a non response type, the state of the service is marked as an Offline in the cache;
the forced offline processing of the third party service is to judge the state of the service in the cache, if the service is not OutOfService, the state of the service is marked as OutOfService in the cache, and the timing detection of the service state of the service is stopped;
the forced online processing of the third party service is to judge the state of the service in the cache, if the service is OutOfService, marking the state of the service in the cache as an Offline, and recovering the timing detection of the service state of the service;
the cancellation processing of the third party service is to cancel the timing detection of the service state of the service and delete the record of the service in the cache;
and the caching module stores service information and state of the third party service.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910841639.5A CN110708356B (en) | 2019-09-06 | 2019-09-06 | Method and system for managing third party application by registry |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910841639.5A CN110708356B (en) | 2019-09-06 | 2019-09-06 | Method and system for managing third party application by registry |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110708356A CN110708356A (en) | 2020-01-17 |
CN110708356B true CN110708356B (en) | 2024-01-05 |
Family
ID=69194329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910841639.5A Active CN110708356B (en) | 2019-09-06 | 2019-09-06 | Method and system for managing third party application by registry |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110708356B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111600928B (en) * | 2020-04-07 | 2022-11-22 | 深圳震有科技股份有限公司 | Simulation service control method, intelligent terminal and storage medium |
CN112925645A (en) * | 2021-03-01 | 2021-06-08 | 北京电信易通信息技术股份有限公司 | Method and system for automatically constructing cloud access control |
CN117155994B (en) * | 2023-10-27 | 2024-02-02 | 广州市千钧网络科技有限公司 | Service registration management method, device, equipment and readable storage medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932465A (en) * | 2012-11-08 | 2013-02-13 | 北京工商大学 | Method for monitoring user interaction characteristics of efficient smart phone |
CN105933444A (en) * | 2016-06-27 | 2016-09-07 | 焦点科技股份有限公司 | Service discovering method based on cooperation of registration center and caching mechanism |
CN106899772A (en) * | 2017-02-21 | 2017-06-27 | 深圳市彬讯科技有限公司 | The distributed equally loaded control method and calling system of a kind of calling service |
CN107612955A (en) * | 2016-07-12 | 2018-01-19 | 深圳市远行科技股份有限公司 | Micro services provide method, apparatus and system |
CN107659605A (en) * | 2016-07-25 | 2018-02-02 | 武汉票据交易中心有限公司 | The flow implementation method and related system of a kind of bill business |
CN108712309A (en) * | 2018-06-11 | 2018-10-26 | 郑州云海信息技术有限公司 | A kind of micro services node means of defence under micro services framework and system |
CN108833462A (en) * | 2018-04-13 | 2018-11-16 | 中国科学院信息工程研究所 | A kind of system and method found from registration service towards micro services |
CN108965442A (en) * | 2018-07-23 | 2018-12-07 | 珠海宏桥高科技有限公司 | A kind of micro services infrastructure services dissemination system and model-based optimization method |
CN109246246A (en) * | 2018-10-31 | 2019-01-18 | 成都知道创宇信息技术有限公司 | A kind of full-automatic service discovery SiteServer LBS of centralization |
CN109474685A (en) * | 2018-11-16 | 2019-03-15 | 中国银行股份有限公司 | Service monitoring method and system under a kind of framework based on micro services |
CN109495559A (en) * | 2018-11-06 | 2019-03-19 | 用友网络科技股份有限公司 | Service registration and call method, the registration and calling system of micro services client |
CN109639818A (en) * | 2018-12-27 | 2019-04-16 | 北京城市网邻信息技术有限公司 | Service discovery method, device, server and storage medium under a kind of cloud environment |
CN109714319A (en) * | 2018-12-06 | 2019-05-03 | 深圳市中农网有限公司 | Management system, method, apparatus, computer equipment and the storage medium of micro services |
CN109873736A (en) * | 2019-01-18 | 2019-06-11 | 苏宁易购集团股份有限公司 | A kind of micro services monitoring method and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10348838B2 (en) * | 2016-07-22 | 2019-07-09 | Cisco Technology, Inc. | Scaling service discovery in a micro-service environment |
-
2019
- 2019-09-06 CN CN201910841639.5A patent/CN110708356B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932465A (en) * | 2012-11-08 | 2013-02-13 | 北京工商大学 | Method for monitoring user interaction characteristics of efficient smart phone |
CN105933444A (en) * | 2016-06-27 | 2016-09-07 | 焦点科技股份有限公司 | Service discovering method based on cooperation of registration center and caching mechanism |
CN107612955A (en) * | 2016-07-12 | 2018-01-19 | 深圳市远行科技股份有限公司 | Micro services provide method, apparatus and system |
CN107659605A (en) * | 2016-07-25 | 2018-02-02 | 武汉票据交易中心有限公司 | The flow implementation method and related system of a kind of bill business |
CN106899772A (en) * | 2017-02-21 | 2017-06-27 | 深圳市彬讯科技有限公司 | The distributed equally loaded control method and calling system of a kind of calling service |
CN108833462A (en) * | 2018-04-13 | 2018-11-16 | 中国科学院信息工程研究所 | A kind of system and method found from registration service towards micro services |
CN108712309A (en) * | 2018-06-11 | 2018-10-26 | 郑州云海信息技术有限公司 | A kind of micro services node means of defence under micro services framework and system |
CN108965442A (en) * | 2018-07-23 | 2018-12-07 | 珠海宏桥高科技有限公司 | A kind of micro services infrastructure services dissemination system and model-based optimization method |
CN109246246A (en) * | 2018-10-31 | 2019-01-18 | 成都知道创宇信息技术有限公司 | A kind of full-automatic service discovery SiteServer LBS of centralization |
CN109495559A (en) * | 2018-11-06 | 2019-03-19 | 用友网络科技股份有限公司 | Service registration and call method, the registration and calling system of micro services client |
CN109474685A (en) * | 2018-11-16 | 2019-03-15 | 中国银行股份有限公司 | Service monitoring method and system under a kind of framework based on micro services |
CN109714319A (en) * | 2018-12-06 | 2019-05-03 | 深圳市中农网有限公司 | Management system, method, apparatus, computer equipment and the storage medium of micro services |
CN109639818A (en) * | 2018-12-27 | 2019-04-16 | 北京城市网邻信息技术有限公司 | Service discovery method, device, server and storage medium under a kind of cloud environment |
CN109873736A (en) * | 2019-01-18 | 2019-06-11 | 苏宁易购集团股份有限公司 | A kind of micro services monitoring method and system |
Non-Patent Citations (5)
Title |
---|
"TeaStore - A Micro-Service Reference Application";Simon Eismann等;《2019 IEEE 4th International Workshops on Foundations and Applications of Self* Systems》;全文 * |
主动分布式Web服务注册机制研究与实现;杜宗霞;怀进鹏;;软件学报(第03期);全文 * |
基于微服务架构的基础设施设计;蒋勇;;软件(第05期);全文 * |
基于微服务架构的统一应用开发平台;李春阳;刘迪;崔蔚;李晓珍;李春岐;;计算机系统应用(第04期);全文 * |
微服务框架的设计与实现;张晶;黄小锋;李春阳;;计算机系统应用(第06期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110708356A (en) | 2020-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110708356B (en) | Method and system for managing third party application by registry | |
EP2563062B1 (en) | Long connection management apparatus and link resource management method for long connection communication | |
CN102075643B (en) | Terminal device and backup system | |
US20040006624A1 (en) | OPC server redirection manager | |
CN101616490B (en) | Method of deciding to release communication resources | |
US11722378B2 (en) | Internet of things management through self-describing objects | |
US20070165615A1 (en) | Apparatus and method for notifying communication network event in application server capable of supporting open API based on Web services | |
CN106993043B (en) | Data communication system and method based on agency | |
WO2011157003A1 (en) | Method, management network element and network node for managing wireless sensor network terminal | |
US10721135B1 (en) | Edge computing system for monitoring and maintaining data center operations | |
EP2774323B1 (en) | Method, communication system and non-transitory computer readable medium for optimizing network performance after a temporary loss of connection | |
US20070147260A1 (en) | Method for loading a list of alarms by means of an alarm application | |
US20070150540A1 (en) | Presence and peer launch pad | |
CN115834668B (en) | Cluster node control method, device, equipment, storage medium and program product | |
US11171868B2 (en) | Systems and methods for centrally-assisted distributed hash table | |
CN112104698A (en) | Method for accessing vehicle-mounted terminal to gateway, related equipment and medium | |
US20100153437A1 (en) | Data storing system and data processing method of informational household appliance | |
CN101163040B (en) | Method of automatically notifying connection state of supervised equipment to users | |
CN115086311A (en) | Management system of enterprise cross-system service based on cloud service bus | |
WO2006056123A1 (en) | Method for processing the delay context in the media gateway | |
JP2002366381A (en) | Dynamic exchange processing method for object | |
US20060026278A1 (en) | Administration system for network management systems | |
CN113157615B (en) | Service bus communication method, electronic equipment and computer storage medium | |
CN115865651B (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN116401198B (en) | SM2 algorithm-based interface bus system |
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 |