CN107370832B - Refreshing method for extensible non-restarting dynamic configuration parameters of application server - Google Patents

Refreshing method for extensible non-restarting dynamic configuration parameters of application server Download PDF

Info

Publication number
CN107370832B
CN107370832B CN201710788702.4A CN201710788702A CN107370832B CN 107370832 B CN107370832 B CN 107370832B CN 201710788702 A CN201710788702 A CN 201710788702A CN 107370832 B CN107370832 B CN 107370832B
Authority
CN
China
Prior art keywords
parameter
configuration
parameters
physical system
setting
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
Application number
CN201710788702.4A
Other languages
Chinese (zh)
Other versions
CN107370832A (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.)
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information Technology Co Ltd
Original Assignee
State Grid Jiangsu Electric Power Co Ltd
Jiangsu Electric Power Information 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 State Grid Jiangsu Electric Power Co Ltd, Jiangsu Electric Power Information Technology Co Ltd filed Critical State Grid Jiangsu Electric Power Co Ltd
Priority to CN201710788702.4A priority Critical patent/CN107370832B/en
Publication of CN107370832A publication Critical patent/CN107370832A/en
Application granted granted Critical
Publication of CN107370832B publication Critical patent/CN107370832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/306User profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Dram (AREA)

Abstract

The invention discloses a refreshing method for an extensible non-restarting dynamic configuration parameter of an application server, which comprises the following steps: establishing a dynamic configuration parameter refreshing integration framework; the service application end is deployed on line and provides a refresh URL; configuring a physical system and setting a physical deployment address at a unified parameter configuration management end; adding physical system parameters used by service application in the physical system parameter setting of the unified parameter configuration management end, setting parameter values, and setting a refresh URL after the completion. The invention provides service to the outside by using the cache value of the parameter in the memory based on the configuration file and the unified parameter configuration management, and simultaneously carries out parameter reading and dynamic refreshing on single or a plurality of server nodes under the condition of supporting the cluster so as to carry out dynamic expansion and refresh the configuration parameter value of the application server.

Description

Refreshing method for extensible non-restarting dynamic configuration parameters of application server
Technical Field
The invention belongs to the technical field of software, and relates to a refreshing method of an extensible non-restart dynamic parameter of an application server based on configuration files and unified parameter configuration management.
Background
Configuration parameter management is an important component for application server based programs, such as the J2EE application. The start and operation of the service application depend on the configuration parameters, and whether the configuration parameter values are correct or not determines whether the application can be started and operated normally or not. On the other hand, if the running application can dynamically add parameters or change the values of the existing parameters and make them effective without restarting the application server, the running application is encouraged in terms of the extensibility of the application and the user friendliness (without interrupting the service provision of the application).
For example, an application is assumed that its login service is provided externally and independently, and the single-sign-on authentication address is configured in the application as a configuration item. Then the configuration item needs to be modified and validated when the application needs to switch to a new login authentication service. If the parameters cannot be dynamically refreshed, the application server needs to be restarted after the configuration is modified, and the service provided by the application to the outside is interrupted in the period, so that the use experience of the user is reduced. With the mechanism of dynamically refreshing the parameters, the new single sign-on address can take effect at the moment of refreshing the parameters, thereby saving the operation and maintenance cost and improving the user experience.
When the expansion and the refresh of the parameters are to be realized, the difficulty is not high under the condition that the application server can be restarted, the parameters are only required to be modified and then the application is released again, and the parameters are read from the codes when the application is released. However, if dynamic refresh of dynamically added parameters and existing parameters needs to be implemented without restarting the application server, the parameter types need to be well planned and a mature and reliable refresh mechanism needs to be designed.
In view of the necessity of dynamically refreshing configuration parameters of an application server without restarting, it is desirable to provide a method for dynamically expanding and refreshing configuration parameters to adapt to the application server-based program usage, and the method also takes into account the scenario of configuration refresh of different machines in the cluster situation.
Disclosure of Invention
The invention aims to provide a refreshing method for an extensible non-restarting dynamic configuration parameter of an application server, which is based on configuration files and unified parameter configuration management, utilizes a cache value of the parameter in a memory to provide service for the outside, and performs parameter reading and dynamic refreshing on a single or a plurality of server nodes under the condition of supporting a cluster so as to dynamically expand and refresh the configuration parameter value of the application server.
The aim of the invention is achieved by the following technical solutions:
a refresh method of extensible non-restart dynamic configuration parameters of an application server is characterized in that the method comprises the following steps:
1) establishing a dynamic configuration parameter refreshing integration framework, wherein the framework content comprises: a service application end and a unified parameter configuration management end; the service application terminal represents a service application; the service application needs to perform type division and design on configuration parameters; configuration parameters are divided into two categories: based on the parameters of the configuration file and the parameters capable of carrying out unified configuration; unified parameter configuration management end: the method is a uniform parameter configuration management end; in order to make the unified configuration of the parameters clearer and more reasonable, the concepts of a physical system and a physical address are required to be introduced; physical system: the physical system corresponds to a deployment package of the business application, and the deployment of one business application can register one physical system at a management end with unified parameter configuration; different physical systems distinguish different service applications, and each physical system generates a pair of public key and private key for asymmetric encryption when generating; physical deployment address: the physical system deployment address is different deployment addresses of a designated physical system and consists of an address IP and a PORT, and because different nodes in the cluster or the same application provides slightly different services through configuration, different deployments of the same deployment package need to be distinguished;
2) the service application end is deployed on line and provides a refresh URL;
3) configuring a physical system and setting a physical deployment address at a unified parameter configuration management end;
4) adding physical system parameters used by service application in the physical system parameter setting of the unified parameter configuration management end, setting parameter values, and setting a refresh URL after the completion.
In step 4), the service steps when the service application refreshes the dynamic parameters by using the refresh URL provided by the invention are as follows:
(1) re-reading the parameters in the configuration file and setting the parameters in the memory;
(2) acquiring a service address of the uniform configuration parameter from the configuration file parameter and calling; and clearing the unified configuration related parameters in the original memory after successful calling, and resetting the obtained result into the memory.
The unified parameter configuration management end provides two functions: physical system registration and physical system parameter setting, and an interface for acquiring the system parameters.
The parameters based on the configuration file or the uniformly configured parameters are obtained when the service application is started and cached in the memory of the application server, in other words, the configuration parameter values used by the service application are all parameter values cached in the memory of the service application server instead of the parameter values obtained in real time. The business application itself needs to provide a provisioning service (referred to as a refresh URL) to refresh the configuration parameter values in its memory.
Physical system registration: registering a physical system corresponding to the service application deployment package and registering a corresponding physical deployment address; setting physical system parameters: setting physical system configuration parameters, namely unified configuration parameters of corresponding business applications; the physical system parameters comprise parameter names, parameter codes, parameter values, parameter configuration descriptions, whether the parameters are consistent, whether the parameters are encrypted and whether all server parameters are consistent; the parameter coding is the coding appointed with the service application; if the parameter is set to be encrypted, the value of the parameter is encrypted and stored by a pubKey generated when the physical system generates the parameter; if the parameters are consistent, setting values on the physical system for the parameter values, wherein the parameter values obtained by all the physical deployment addresses are consistent; otherwise, setting the parameter value on the physical deployment address under the physical system; in the physical system parameter setting, the functions of setting a refresh URL and refreshing server parameters are provided; the set refreshing URL is the URL of the configuration parameters in the memory of the refreshing body provided by the corresponding service application; the refresh server parameter is the result of calling the refresh URL of the physical deployment address to refresh the configuration parameter and return success or failure;
acquiring a parameter interface of the system: the interface is called by the business application to obtain all unified configuration parameter values of the system.
Compared with the prior art, the invention has the following advantages:
(1) the parameters are divided into parameters based on configuration files and uniformly configured parameters, so that the service is clearer and clearer.
(2) A unified set of parameter setting mechanism is convenient for promote in the enterprise, reduces the cost of repeated study.
(3) All the service application parameters can be managed in a unified way, and professional management authorization and unified maintenance are facilitated.
(4) For the business application, dynamic configuration expansion of the configuration parameters can be carried out, and the configuration parameters are refreshed without restarting an application server.
Drawings
Fig. 1 is a timing diagram of a service application refresh dynamic parameter process in the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific examples.
A refreshing method for an extensible non-restarting dynamic configuration parameter of an application server comprises the following steps:
1) establishing a dynamic configuration parameter refreshing integration framework, wherein the framework content comprises: a service application end and a unified parameter configuration management end; the service application terminal represents a service application; the service application needs to perform type division and design on configuration parameters; configuration parameters are divided into two categories: based on the parameters of the configuration file and the parameters capable of carrying out unified configuration; unified parameter configuration management end: the method is a uniform parameter configuration management end; in order to make the unified configuration of the parameters clearer and more reasonable, the concepts of a physical system and a physical address are required to be introduced; physical system: the physical system corresponds to a deployment package of the business application, and the deployment of one business application can register one physical system at a management end with unified parameter configuration; different physical systems distinguish different service applications, and each physical system generates a pair of public key and private key for asymmetric encryption when generating; physical deployment address: the physical system deployment address is different deployment addresses of a designated physical system and consists of an address IP and a PORT, and because different nodes in the cluster or the same application provides slightly different services through configuration, different deployments of the same deployment package need to be distinguished;
2) the service application end is deployed on line and provides a refresh URL;
3) configuring a physical system and setting a physical deployment address at a unified parameter configuration management end;
4) adding physical system parameters used by service application in the physical system parameter setting of the unified parameter configuration management end, setting parameter values, and setting a refresh URL after the completion.
Service application side: the most critical of the parameters based on the configuration file is a parameter (AprameWebroot) of a rest service address for calling the uniform configuration parameter, and the service application end can obtain the uniform configuration parameter (physical system configuration parameter) configured by the uniform parameter configuration management end by calling the appointed service of the address. The service application provides URL for refreshing the configuration parameter values cached in the memory, and meanwhile, the places where the configuration parameters are used in the service application are all the parameter values cached in the memory.
Unified parameter configuration management side: the unified parameter configuration management end needs to perform setting of the physical system (including setting of physical system registration and physical system deployment address) and management setting of the physical system configuration parameters.
Registration of the physical system: the name of the physical system and the code of the physical system are unique at the unified parameter configuration management end, and the physical system corresponds to the deployment package of the service application. Registering a physical system corresponding to the service application deployment package and registering a corresponding physical deployment address; setting physical system parameters: setting physical system configuration parameters, namely unified configuration parameters of corresponding business applications; the physical system parameters comprise parameter names, parameter codes, parameter values, parameter configuration descriptions, whether the parameters are consistent, whether the parameters are encrypted and whether all server parameters are consistent; the parameter coding is the coding appointed with the service application; if the parameter is set to be encrypted, the value of the parameter is encrypted and stored by a pubKey generated when the physical system generates the parameter; if the parameters are consistent, setting values on the physical system for the parameter values, wherein the parameter values obtained by all the physical deployment addresses are consistent; otherwise, setting the parameter value on the physical deployment address under the physical system; in the physical system parameter setting, the functions of setting a refresh URL and refreshing server parameters are provided; the set refreshing URL is the URL of the configuration parameters in the memory of the refreshing body provided by the corresponding service application; the refresh server parameter is the result of calling the refresh URL of the physical deployment address to refresh the configuration parameter and return success or failure.
Physical system deployment address: for each physical system, the physical system deployment address may be set, and the physical system deployment address may be a cluster address corresponding to service application deployment. Each physical system deployment address must be composed of a physical address IP and a PORT number PORT and used for unique distinction.
Management setting function of physical system parameter configuration and composition of physical system parameters. The physical system parameter configuration needs to set a refresh URL (provided by a service application) for the physical system.
The unified parameter configuration management end provides two functions: physical system registration and physical system parameter setting, and an interface for acquiring the system parameters.
Acquiring a parameter interface of the system: the interface is called by the business application to obtain all unified configuration parameter values of the system.
Fig. 1 is a timing diagram of a process of refreshing dynamic parameters by a business application. To execute the timing diagram, the following preconditions need to be satisfied:
1) the registered service applies the corresponding physical system.
2) The deployment address of the physical system has been set for the corresponding physical system.
3) The address of the refresh URL has been set (service application provision and implementation)
4) Physical system parameters have been added at the unified parameter configuration management side and value setting has been performed.
5) The unified parameter configuration management terminal provides a service for inquiring the parameter value of the physical system and configures the address into a configuration file of the business application.

Claims (4)

1. A refresh method of extensible non-restart dynamic configuration parameters of an application server is characterized in that the method comprises the following steps:
1) establishing a dynamic configuration parameter refreshing integration framework, wherein the framework content comprises: a service application end and a unified parameter configuration management end; the service application terminal represents a service application; the service application needs to perform type division and design on configuration parameters; configuration parameters are divided into two categories: based on the parameters of the configuration file and the parameters capable of carrying out unified configuration; unified parameter configuration management end: in order to make the unified configuration of the parameters clearer and more reasonable, the concepts of a physical system and a physical address are introduced; physical system: the physical system corresponds to a deployment package of the business application, and the deployment of one business application registers one physical system at a management end with unified parameter configuration; different physical systems distinguish different service applications, and each physical system generates a pair of public key and private key for asymmetric encryption when generating; physical deployment address: the physical system deployment address is different deployment addresses of a designated physical system and consists of an address IP and a PORT, and because different nodes in the cluster or the same application provides slightly different services through configuration, different deployments of the same deployment package need to be distinguished;
2) the service application end is deployed on line and provides a refresh URL;
3) configuring a physical system and setting a physical deployment address at a unified parameter configuration management end;
4) adding physical system parameters used by service application in the physical system parameter setting of the unified parameter configuration management end, setting parameter values, and setting a refresh URL after the completion.
2. The refresh method of extensible non-restart dynamic configuration parameters of application server according to claim 1, characterized in that: in step 4), the step of setting the refresh URL is as follows:
(1) re-reading the parameters in the configuration file and setting the parameters in the memory;
(2) acquiring a service address of the uniform configuration parameter from the configuration file parameter and calling; and clearing the unified configuration related parameters in the original memory after successful calling, and resetting the obtained result into the memory.
3. The refresh method of extensible non-restart dynamic configuration parameters of application server according to claim 1, characterized in that: the unified parameter configuration management end provides two functions: physical system registration and physical system parameter setting, and an interface for acquiring the system parameters.
4. The refresh method of extensible non-restart dynamic configuration parameters of application server according to claim 3, characterized in that: physical system registration: registering a physical system corresponding to the service application deployment package and registering a corresponding physical deployment address; setting physical system parameters: setting physical system configuration parameters, namely unified configuration parameters of corresponding business applications; the physical system parameters comprise parameter names, parameter codes, parameter values, parameter configuration descriptions, whether the parameters are consistent, whether the parameters are encrypted and whether all server parameters are consistent; the parameter coding is the coding appointed with the service application; if the parameter is set to be encrypted, the value of the parameter is encrypted and stored by a pubKey generated when the physical system generates the parameter; if the parameters are consistent, setting values on the physical system for the parameter values, wherein the parameter values obtained by all the physical deployment addresses are consistent; otherwise, setting the parameter value on the physical deployment address under the physical system; in the physical system parameter setting, the functions of setting a refresh URL and refreshing server parameters are provided; the set refreshing URL is the URL of the configuration parameters in the memory of the refreshing body provided by the corresponding service application; the refresh server parameter is the result of calling the refresh URL of the physical deployment address to refresh the configuration parameter and return success or failure;
acquiring a parameter interface of the system: the interface is called by the business application to obtain all unified configuration parameter values of the system.
CN201710788702.4A 2017-09-05 2017-09-05 Refreshing method for extensible non-restarting dynamic configuration parameters of application server Active CN107370832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710788702.4A CN107370832B (en) 2017-09-05 2017-09-05 Refreshing method for extensible non-restarting dynamic configuration parameters of application server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710788702.4A CN107370832B (en) 2017-09-05 2017-09-05 Refreshing method for extensible non-restarting dynamic configuration parameters of application server

Publications (2)

Publication Number Publication Date
CN107370832A CN107370832A (en) 2017-11-21
CN107370832B true CN107370832B (en) 2020-04-07

Family

ID=60312413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710788702.4A Active CN107370832B (en) 2017-09-05 2017-09-05 Refreshing method for extensible non-restarting dynamic configuration parameters of application server

Country Status (1)

Country Link
CN (1) CN107370832B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108540529A (en) * 2018-03-07 2018-09-14 江苏电力信息技术有限公司 Do not restart dynamic parameter method for refreshing under a kind of framework based on micro services
CN108647230B (en) * 2018-03-29 2021-10-08 深圳市网心科技有限公司 Distributed storage method, electronic device, and storage medium
CN108984219B (en) * 2018-08-29 2021-03-26 迈普通信技术股份有限公司 Memory parameter configuration method and electronic equipment
CN109614139A (en) * 2018-12-13 2019-04-12 浪潮(北京)电子信息产业有限公司 A kind of system service configuration method, device, equipment and medium
CN110795398A (en) * 2019-08-29 2020-02-14 连连银通电子支付有限公司 Model file calling system and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255752B (en) * 2011-06-30 2014-08-06 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN102314368A (en) * 2011-09-26 2012-01-11 贵阳朗玛信息技术股份有限公司 Method and equipment for updating configuration data of server program
CN103516538A (en) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 Method and device for uniform configuration of carrier-class clustered applications
US9596305B2 (en) * 2013-04-06 2017-03-14 Citrix Systems, Inc. Systems and methods for distributed hash table contract renewal
CN104199666B (en) * 2014-09-09 2018-05-29 北京京东尚科信息技术有限公司 A kind of application program Dynamic Configuration and device

Also Published As

Publication number Publication date
CN107370832A (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN107370832B (en) Refreshing method for extensible non-restarting dynamic configuration parameters of application server
EP3484125B1 (en) Method and device for scheduling interface of hybrid cloud
TWI679550B (en) Account login method and device
KR101389101B1 (en) Method and apparatus for tracking device management data changes
EP3178011A1 (en) Method and system for facilitating terminal identifiers
TW201510761A (en) Method and apparatus of downloading and installing a client
CN110555041A (en) Data processing method, data processing device, computer equipment and storage medium
WO2017101382A1 (en) Method for connecting terminal to server, terminal and domain name server
CN101404575B (en) Method and system for updating indorsement algorithm
CN111431920A (en) Security control method and system based on dynamic token
CN104660595A (en) Rapid APP registration and execution method
US10474185B2 (en) Timestamp alignment across a plurality of computing devices
CN105246054A (en) Message push method suitable for android smart phone
US20170123829A1 (en) Method And System To Dynamically Instantiate Virtual Repository For Any Services
CN104618388A (en) Quick registration and login method and corresponding reset server and information server
US9413756B1 (en) Systems and methods using short-lived proxy token values obfuscating a stable long-lived token value
WO2022179353A1 (en) Domain name resolution method and apparatus, and computer device
WO2016177284A1 (en) Domain name resolution method and device
CN111695098A (en) Multi-distributed cluster access method and device
CN112035810A (en) Access control method, device, medium and equipment
US8996607B1 (en) Identity-based casting of network addresses
CN106936643B (en) Equipment linkage method and terminal equipment
US20210044975A1 (en) Authentication via ussd
CN113726718A (en) Subscription message processing method, device, system and storage medium
CN110032458B (en) PHP cross-language unified calling 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