Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

ZooKeeper-based distributed service state consistency maintenance method and device

A distributed service and consistent technology, applied in the computer field, can solve problems such as insufficient performance, fault tolerance, and scalability

Active Publication Date: 2020-08-18
CSSC SYST ENG RES INST
View PDF5 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, with the deepening of service-oriented practice, more and more applications are integrated in, and the shortcomings of the stand-alone centralized service registry in terms of performance, fault tolerance, and scalability are gradually exposed.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • ZooKeeper-based distributed service state consistency maintenance method and device
  • ZooKeeper-based distributed service state consistency maintenance method and device
  • ZooKeeper-based distributed service state consistency maintenance method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] Such as figure 1 As shown, the present invention is realized by the following technical solutions: a distributed service state consistency maintenance method based on ZooKeeper, which is mainly divided into two parts:

[0056] The task of the first part is to build and maintain the persistent nodes in the global data space of the ZooKeeper cluster, which is used to save the basic information of the developed services in the service integration framework system, including the following steps:

[0057] (1) The service registry creates the root node services of the global data space on the ZooKeeper cluster;

[0058] (2) When performing the service registration operation, the service registration center creates corresponding persistent nodes under the root node according to the service namespace, version number and other information: namespace nodes seu and sat; service name node Radar under the namespace node seu , the service name node Sonar under the namespace node sat...

Embodiment 2

[0064] Such as figure 2 The process shown is composed of service registry, service consumer and service instance. The service registry creates persistent nodes and maintains basic information of services. Service providers and service consumers create temporary nodes to maintain the survival status of service providers and service consumers. The whole process starts with service registration.

[0065] exist figure 2 In the running process of the shown embodiment, a service named Radar already exists in the original system, and there are two service versions 1.0 and 2.0, and the 1.0 version service named Sonar is registered in the sat namespace of the ZooKeeper global data space under the node. Or, since there is no service with the same name as the service Sonar under the seu namespace node, it can also be registered under the seu namespace node.

Embodiment 3

[0067] Such as image 3 In the running process shown, two service providers of version 2.0 of the Radar service are first run, and the service consumer sid is bound to the service provider Radar 1. After the Radar 1 service is shut down, the temporary node in the ZooKeeper global data space is deleted, and the service consumer is rebound to the service provider Radar 2.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a ZooKeeper-based distributed service state consistency maintenance method and device. The implementation process of the ZooKeeper-based distributed service state consistency maintenance method comprises the steps that a service registration center creates a root node of a global data space on a ZooKeeper cluster; when the service registration operation is executed, the service registration center creates a namespace node, a service name node, a version number node and an instance node under the root node of the ZooKeeper cluster according to the namespace and version number information of the service; and a service provider and a service consumer create a service provider node and a service consumer node under an instance node of a ZooKeeper cluster global data space in an initialization phase of service operation. The ZooKeeper-based distributed service state consistency maintenance method and device utilize the persistent node characteristics of ZooKeeper, canefficiently, globally and consistently maintain the static basic information of the service, can acquire the survival condition of a service provider and the access condition of a service consumer toa service instance in real time, and can provide a basis for realizing dynamic binding of the service, load balancing of a service request, real-time monitoring of a system and the like.

Description

technical field [0001] The invention belongs to the technical field of computers and relates to a service load balancing technology, in particular to a ZooKeeper-based distributed service state consistency maintenance method and device. Background technique [0002] In the early stage of the application of the service integration framework, the service registration center adopts a single-machine centralized architecture. Due to the small scale of the service, the framework can basically meet the application requirements. However, with the deepening of service-oriented practice and the integration of more and more applications, the shortcomings of the stand-alone centralized service registry in terms of performance, fault tolerance, and scalability are gradually exposed. [0003] In order to solve the problems existing in the stand-alone centralized service registry, it is necessary to change the original service registry to a distributed cluster architecture. Since distribu...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/178G06F16/182
CPCG06F16/178G06F16/182
Inventor 张哲卫宁江向东
Owner CSSC SYST ENG RES INST
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products