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

Configuration updating method, device and system, and electronic equipment

A technology for configuration update and configuration information, applied in the field of information management, can solve problems such as memory leaks and data reading errors, and achieve the effect of avoiding memory leaks

Active Publication Date: 2019-03-12
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF7 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of this, the purpose of the present invention is to provide a configuration update method, device, system and electronic equipment to avoid problems such as memory leaks or data reading errors caused by concurrent writing configurations

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
  • Configuration updating method, device and system, and electronic equipment
  • Configuration updating method, device and system, and electronic equipment
  • Configuration updating method, device and system, and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0076] figure 1 A schematic flowchart of a configuration update method provided by an embodiment of the present invention is shown. like figure 1 As shown in , the configuration update method is applied to the application server or the client running the application, and includes the following steps:

[0077] Step S101, obtaining configuration information from a Zookeeper server.

[0078] In a possible embodiment, the configuration information is generated by a manager corresponding to the configuration center through a WEB (World Wide Web, global wide area network) page through a configuration operation.

[0079] Step S102, using Java bytecode technology to convert configuration information into configuration classes.

[0080] Step S103, loading the configuration class to the class loader ClassLoader.

[0081] The configuration information is converted into a configuration class represented by Java byte code (.class file) through Java byte code technology. Then the Java ...

Embodiment 2

[0088] figure 2 A schematic flowchart of another configuration update method provided by an embodiment of the present invention is shown. like figure 2 As shown in , the configuration update method is applied to the application server or the client running the application, and includes the following steps:

[0089] Step S201, receiving a detection command sent by the Zookeeper server, and returning detection response information to the Zookeeper server.

[0090] In a possible embodiment, before sending the configuration information, the Zookeeper server sends a detection command to each application server connected to it to detect whether each application server is alive, that is, whether there are problems such as crash or connection interruption. If the application server survives, it will send corresponding probe response information to the Zookeeper server after receiving the probe command.

[0091] In a possible embodiment, the above-mentioned detection instructions ...

Embodiment 3

[0121] Corresponding to the configuration update method in Embodiment 1 or Embodiment 2, this embodiment provides a configuration update device, see image 3 , the configuration updater includes:

[0122] Obtaining module 11, is used for obtaining configuration information from Zookeeper server;

[0123] Conversion module 12, for utilizing the byte code technique of Java to convert above-mentioned configuration information into configuration class;

[0124] The preloading module 13 is used to load the configuration class into the class loader ClassLoader;

[0125] The instantiation module 14 is used to instantiate the configuration class loaded by the above-mentioned class loader ClassLoader to obtain a corresponding instance, wherein the instance is configured with timestamp information;

[0126] The update module 15 is configured to store the above instance in the current context environment to complete the configuration update.

[0127] In this way, the configuration inf...

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 configuration updating method, device and system, and electronic equipment. The method comprises the following steps that after configuration information is obtained from a Zookeeper server, the configuration information is converted into a configuration class through a byte code technology of java; the configuration class is loaded by using a class loader and is instantiated to obtain an instance corresponding to the configuration class; and the instance is stored in a context environment of the Java, so that the original configuration class stored in the context environment can be automatically updated. In this way, the configuration information is stored in an instance form; instance names are different, so that memory addresses stored in the context environmentare different; each instance is provided with timestamp information; and the latest instances are called according to the instance names and the timestamp information during subsequent configurationto perform configuration updating, so that the problem of memory leakage, data reading errors or the like caused by direct concurrent writing of configuration in the memory addresses can be avoided.

Description

technical field [0001] The present invention relates to the technical field of information management, in particular to a configuration updating method, device, system and electronic equipment. Background technique [0002] With the rapid development of the information industry, whether it is the traditional computer field or the emerging mobile Internet field, there are more and more distributed environment systems, and some distributed systems even have hundreds or thousands of server nodes. In the existing distributed system, updating a service program or updating a certain configuration file needs to log in to a specific server for operation. In an increasingly large distributed system environment, update the file configuration or program for each server Time-consuming. [0003] ZooKeeper is a reliable coordination system for large-scale distributed systems, providing functions including configuration maintenance, name service, distributed synchronization and group serv...

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): H04L12/24G06F9/445G06F8/65
CPCG06F8/65G06F9/44521H04L41/082
Inventor 许亚明
Owner BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
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