Movatterモバイル変換


[0]ホーム

URL:


CN110708356A - Method and system for managing third-party application by registry - Google Patents

Method and system for managing third-party application by registry
Download PDF

Info

Publication number
CN110708356A
CN110708356ACN201910841639.5ACN201910841639ACN110708356ACN 110708356 ACN110708356 ACN 110708356ACN 201910841639 ACN201910841639 ACN 201910841639ACN 110708356 ACN110708356 ACN 110708356A
Authority
CN
China
Prior art keywords
service
state
party
cache
offline
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
CN201910841639.5A
Other languages
Chinese (zh)
Other versions
CN110708356B (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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co LtdfiledCriticalG Cloud Technology Co Ltd
Priority to CN201910841639.5ApriorityCriticalpatent/CN110708356B/en
Publication of CN110708356ApublicationCriticalpatent/CN110708356A/en
Application grantedgrantedCritical
Publication of CN110708356BpublicationCriticalpatent/CN110708356B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention relates to a method and a system for managing third-party application by a registry. The method of the invention 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 registry; detecting the service state of the third-party service at regular time, and requesting service continuation or service offline from the registration center; and performing 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 communicating with the registration center and detecting the service state of the third-party service at regular 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 registration center, and automatically processes the service continuation, the off-line, the forced on-line and the forced off-line of the third-party service; a registry that can be used in microservices manages third party applications.

Description

Method and system for managing third-party application by registry
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 application by a registration center.
Background
The registry is one of the core base services in the microservice architecture. In the architecture of micro-services, the number of services is large; and for high availability, many services are clustered; if the information of each service is maintained by using the traditional configuration mode, the difficulty of operation, maintenance, upgrading and management is 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 services at a registry, service providers need to register for services. Common service registration modes include automatic registration and manual registration; auto-registration is when a service starts up, the service sends a message to the registry that the service is registered. Manual registration is through a command line or web manual registration service. For the third-party service, if the information of the third-party service is to be uniformly maintained by using a registry, manual registration is usually required; but there is not a good service drop and detection method.
Disclosure of Invention
The technical problem to be 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 process service continuation, 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 registry; detecting the service state of the third-party service at regular time, and requesting service continuation or service offline from the registration center; and performing 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 normally respond, a service renewal request is sent to the registration center, and the state of the third-party service is marked as Active in the cache; if the third-party service does not normally respond, marking the state of the third-party service as nonresponsive in the cache; if the third-party service does not normally respond for 3 times continuously, sending a service Offline request to a registration center, and marking the state of the third-party service as Offline in a cache;
the time interval of the service state clock timing of the timing detection third-party service is one third of the heartbeat timeout time configured by the registration center.
The event monitoring is a listener 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 regularly acquire a service list of the registration center; triggering a corresponding processing flow of the third-party service according to the acquired service state type, wherein the service state type comprises offline, forced offline and forced online; and 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 state is NonResponsible, the state of the service is marked as 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 state is not OutOfService, the state of the service is marked as OutOfService in the cache, and the service state timing detection 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, mark the state of the service in the cache as offservice if the state is OutOfService, and recover the service state timing detection of the service;
the third-party service logout processing is to cancel the service state timing detection of the service and delete the record of the service in the cache.
The system comprises a third-party service agent, wherein the third-party service agent is responsible for communicating with a registration center and detecting the service state of the third-party service at regular time, so that service registration, offline forced offline, online forced and logout of the third-party service are realized;
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 services, including service addresses, service ports and service names, and sending a service registration request 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 a registration center;
the state management module registers a service event listener with the registration center and compares the service states of the third-party service in the registration center and the cache; performing offline, forced online and logout processing on the third-party service;
the cache module stores the service information and the state of the third-party service.
The invention can provide the service information of the third-party service in the registration center under the condition of not changing the third-party service and the registration center, automatically process the service continuation, the off-line, the forced on-line and the forced off-line of the third-party service, does not change the registration center and the third-party service, and is suitable for the old system or the third-party service to access the registration center.
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
As shown in fig. 1, the method for managing the third party service by the registry of the present invention has the following processes:
s1, acquiring service information of the third-party service, including a service address, a service port, a service name and the like;
s2, sending a service registration request to a registration center;
s3, detecting the service state of the third-party service at regular time, and continuing service contract or taking off the service line to the registration center;
and S4, performing processing flows of offline, forced online, logout and the like on the third-party service through event monitoring and state pulling.
In step S3, the periodically detecting the service status of the third-party service further includes:
if the third-party service can normally respond, sending a service renewal request to the registration center, and marking the state of the third-party service as Active in the cache;
if the third-party service does not normally respond, marking the state of the third-party service as nonresponsive in the cache;
and if the third-party service does not normally respond for 3 times continuously, sending a service Offline request to the registration center, and marking the state of the third-party service as Offline in the cache.
The service state of the third-party service is detected at the timing, and the time interval of the timing is equal to the heartbeat timeout time configured by the registration center 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 triggering the processing flows of offline, forced online, logout and the like of the third-party service if the event is an event of offline, forced online, logout and the like.
In step S4, the state pull further includes:
1) acquiring a service list of a registration center 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 the third-party service such as offline, forced online, logout and the like;
3) and comparing the service list of the registration center with the cached service list, and if the third-party service exists in the cache and does not exist in the registration center, triggering a logout processing flow of the third-party service.
The third-party service downloading process comprises the following steps: and judging the state of the service in the cache, and if the state is NonResponsible, marking the state of the service as Offline in the cache.
The forced offline flow of the third-party service is as follows: the state of the service in the cache is determined. If the service is not OutOfService, the state of the service is marked as OutOfService in the cache, and the service state timing detection of the service is stopped.
The forced online process of the third-party service comprises the following steps: the state of the service in the cache is determined. If the service is OutOfService, the state of the service is marked Offline in the cache, and the service state timing detection of the service is recovered.
The logout flow of the third-party service is as follows: and canceling the service state timing detection of the service and deleting the record of the service in the cache.
As shown in fig. 2, the system for managing the third-party service by the registry of the present invention includes a third-party service agent, which is responsible for communicating with the registry and detecting the service status of the third-party service at regular time, so as to realize the functions of service registration, service renewal, service offline, etc. of the third-party service. The third-party service agent specifically includes:
the third-party service registration module is responsible for receiving service information of the third-party service, including a service address, a service port, a service name and the like, and sending a service registration request to the 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 performing service renewal or service offline to the registration center;
the state management module is used for performing processing flows of offline, forced online, logout and the like on the third-party service by registering the service event listener in the registration center and comparing the service states of the third-party service in the registration center and the cache;
and the cache module is used for storing the service information and the state of the third-party service.
In the invention, the service provider and the service consumer directly communicate with the registry, and a method for integrating the third-party service into the registry is provided for the service consumer to directly consume, and the state maintenance and management are carried out on the third-party service.

Claims (8)

CN201910841639.5A2019-09-062019-09-06Method and system for managing third party application by registryActiveCN110708356B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910841639.5ACN110708356B (en)2019-09-062019-09-06Method and system for managing third party application by registry

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910841639.5ACN110708356B (en)2019-09-062019-09-06Method and system for managing third party application by registry

Publications (2)

Publication NumberPublication Date
CN110708356Atrue CN110708356A (en)2020-01-17
CN110708356B CN110708356B (en)2024-01-05

Family

ID=69194329

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910841639.5AActiveCN110708356B (en)2019-09-062019-09-06Method and system for managing third party application by registry

Country Status (1)

CountryLink
CN (1)CN110708356B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111600928A (en)*2020-04-072020-08-28深圳震有科技股份有限公司Simulation service control method, intelligent terminal and storage medium
CN112925645A (en)*2021-03-012021-06-08北京电信易通信息技术股份有限公司Method and system for automatically constructing cloud access control
CN117155994A (en)*2023-10-272023-12-01广州市千钧网络科技有限公司Service registration management method, device, equipment and readable storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102932465A (en)*2012-11-082013-02-13北京工商大学Method for monitoring user interaction characteristics of efficient smart phone
CN105933444A (en)*2016-06-272016-09-07焦点科技股份有限公司Service discovering method based on cooperation of registration center and caching mechanism
CN106899772A (en)*2017-02-212017-06-27深圳市彬讯科技有限公司The distributed equally loaded control method and calling system of a kind of calling service
CN107612955A (en)*2016-07-122018-01-19深圳市远行科技股份有限公司Micro services provide method, apparatus and system
US20180027080A1 (en)*2016-07-222018-01-25Cisco Technology, Inc.Scaling service discovery in a micro-service environment
CN107659605A (en)*2016-07-252018-02-02武汉票据交易中心有限公司The flow implementation method and related system of a kind of bill business
CN108712309A (en)*2018-06-112018-10-26郑州云海信息技术有限公司A kind of micro services node means of defence under micro services framework and system
CN108833462A (en)*2018-04-132018-11-16中国科学院信息工程研究所 A system and method for microservice-oriented self-registration service discovery
CN108965442A (en)*2018-07-232018-12-07珠海宏桥高科技有限公司A kind of micro services infrastructure services dissemination system and model-based optimization method
CN109246246A (en)*2018-10-312019-01-18成都知道创宇信息技术有限公司A kind of full-automatic service discovery SiteServer LBS of centralization
CN109474685A (en)*2018-11-162019-03-15中国银行股份有限公司Service monitoring method and system under a kind of framework based on micro services
CN109495559A (en)*2018-11-062019-03-19用友网络科技股份有限公司Service registration and call method, the registration and calling system of micro services client
CN109639818A (en)*2018-12-272019-04-16北京城市网邻信息技术有限公司Service discovery method, device, server and storage medium under a kind of cloud environment
CN109714319A (en)*2018-12-062019-05-03深圳市中农网有限公司Management system, method, apparatus, computer equipment and the storage medium of micro services
CN109873736A (en)*2019-01-182019-06-11苏宁易购集团股份有限公司A kind of micro services monitoring method and system

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102932465A (en)*2012-11-082013-02-13北京工商大学Method for monitoring user interaction characteristics of efficient smart phone
CN105933444A (en)*2016-06-272016-09-07焦点科技股份有限公司Service discovering method based on cooperation of registration center and caching mechanism
CN107612955A (en)*2016-07-122018-01-19深圳市远行科技股份有限公司Micro services provide method, apparatus and system
US20180027080A1 (en)*2016-07-222018-01-25Cisco Technology, Inc.Scaling service discovery in a micro-service environment
CN107659605A (en)*2016-07-252018-02-02武汉票据交易中心有限公司The flow implementation method and related system of a kind of bill business
CN106899772A (en)*2017-02-212017-06-27深圳市彬讯科技有限公司The distributed equally loaded control method and calling system of a kind of calling service
CN108833462A (en)*2018-04-132018-11-16中国科学院信息工程研究所 A system and method for microservice-oriented self-registration service discovery
CN108712309A (en)*2018-06-112018-10-26郑州云海信息技术有限公司A kind of micro services node means of defence under micro services framework and system
CN108965442A (en)*2018-07-232018-12-07珠海宏桥高科技有限公司A kind of micro services infrastructure services dissemination system and model-based optimization method
CN109246246A (en)*2018-10-312019-01-18成都知道创宇信息技术有限公司A kind of full-automatic service discovery SiteServer LBS of centralization
CN109495559A (en)*2018-11-062019-03-19用友网络科技股份有限公司Service registration and call method, the registration and calling system of micro services client
CN109474685A (en)*2018-11-162019-03-15中国银行股份有限公司Service monitoring method and system under a kind of framework based on micro services
CN109714319A (en)*2018-12-062019-05-03深圳市中农网有限公司Management system, method, apparatus, computer equipment and the storage medium of micro services
CN109639818A (en)*2018-12-272019-04-16北京城市网邻信息技术有限公司Service discovery method, device, server and storage medium under a kind of cloud environment
CN109873736A (en)*2019-01-182019-06-11苏宁易购集团股份有限公司A kind of micro services monitoring method and system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
SIMON EISMANN等: ""TeaStore - A Micro-Service Reference Application"", 《2019 IEEE 4TH INTERNATIONAL WORKSHOPS ON FOUNDATIONS AND APPLICATIONS OF SELF* SYSTEMS》*
张晶;黄小锋;李春阳;: "微服务框架的设计与实现", 计算机系统应用, no. 06*
李春阳;刘迪;崔蔚;李晓珍;李春岐;: "基于微服务架构的统一应用开发平台", 计算机系统应用, no. 04*
杜宗霞;怀进鹏;: "主动分布式Web服务注册机制研究与实现", 软件学报, no. 03*
蒋勇;: "基于微服务架构的基础设施设计", 软件, no. 05*

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111600928A (en)*2020-04-072020-08-28深圳震有科技股份有限公司Simulation service control method, intelligent terminal and storage medium
CN112925645A (en)*2021-03-012021-06-08北京电信易通信息技术股份有限公司Method and system for automatically constructing cloud access control
CN117155994A (en)*2023-10-272023-12-01广州市千钧网络科技有限公司Service registration management method, device, equipment and readable storage medium
CN117155994B (en)*2023-10-272024-02-02广州市千钧网络科技有限公司Service registration management method, device, equipment and readable storage medium

Also Published As

Publication numberPublication date
CN110708356B (en)2024-01-05

Similar Documents

PublicationPublication DateTitle
CN110708356A (en)Method and system for managing third-party application by registry
US6324577B1 (en)Network management system for managing states of nodes
EP1518385B1 (en)Opc server redirection manager
CN111064634B (en)Method and device for monitoring mass Internet of things terminal online state
US20040008727A1 (en)Network resource management in a network device
CN105933444A (en)Service discovering method based on cooperation of registration center and caching mechanism
US9167031B2 (en)Distributed processing system and distributed processing method
EP1339190A3 (en)System and method for locating devices on a network
CN112583797B (en)Multi-protocol data processing method, device, equipment and computer readable storage medium
KR20000076842A (en)System and method for configuring network-attached terminals
CN111083176B (en) A monitoring camera cloud adaptive online method and device
CN112180757B (en) A smart home system and its strategy management method
CN104735706A (en)Internet of Things terminal fault diagnosis method and device
CN106911519A (en)A kind of data acquisition monitoring method and device
WO2015076493A1 (en)System and method for detecting predictive failure
CN113810474B (en)Request distribution method and terminal
US8516094B2 (en)Method and network management apparatus for implementing information service level inheritance in network management system
US8335795B2 (en)Data storing system and data processing method of informational household appliance
WO2017057991A1 (en)Vehicle management method of message server and vehicle management method of vehicle terminal
CN106549801A (en)A kind of alarm type recognition methodss and equipment
CN108011870B (en)A kind of remote software online upgrading information automatic identification management method
CN108513303A (en)The abnormality monitoring method and device of jack per line terminal
CN101361347B (en)Method and gateway for connecting ip communication entities via a residential gateway
CN106776263A (en)A kind of robot exception handling device and method
CN115865651B (en)Data acquisition method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp