CN111736874A - Application updating method and device - Google Patents
Application updating method and device Download PDFInfo
- Publication number
- CN111736874A CN111736874A CN202010594707.5A CN202010594707A CN111736874A CN 111736874 A CN111736874 A CN 111736874A CN 202010594707 A CN202010594707 A CN 202010594707A CN 111736874 A CN111736874 A CN 111736874A
- Authority
- CN
- China
- Prior art keywords
- client
- configuration
- distribution server
- server
- configuration file
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 257
- 230000008569 process Effects 0.000 claims abstract description 174
- 238000009826 distribution Methods 0.000 claims abstract description 121
- 230000002159 abnormal effect Effects 0.000 claims description 87
- 230000006870 function Effects 0.000 claims description 34
- 238000012545 processing Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012544 monitoring process Methods 0.000 claims description 9
- 238000012795 verification Methods 0.000 claims description 7
- 238000003860 storage Methods 0.000 claims description 6
- 238000012423 maintenance Methods 0.000 abstract description 20
- 238000010586 diagram Methods 0.000 description 12
- 238000013461 design Methods 0.000 description 10
- 230000005856 abnormality Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004904 shortening Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 229910003460 diamond Inorganic materials 0.000 description 2
- 239000010432 diamond Substances 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides an application updating method and device, wherein the method comprises the following steps: the method comprises the steps that a client monitors configuration information of a distribution server, wherein the configuration information is sent to the distribution server by a configuration server; the client is in a running state, and running processes are registered in the distribution server when being started; the client acquires a configuration file of the client from the configuration server according to the monitored configuration information of the client; the client carries out hot updating according to the configuration file and reports the updating result of each process to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server. By adopting the method, the workload of technical personnel for positioning the abnormity can be reduced, the abnormity positioning period is shortened, and the cost of application operation and maintenance is reduced.
Description
Technical Field
The present application relates to the field of computer technologies in financial technology (Fintech), and in particular, to an application update method and apparatus.
Background
In recent years, with the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changing to financial technology (Fintech), but higher requirements are also put on the technologies due to the requirements of the financial industry on safety and real-time performance. Accordingly, with the popularization of computer technology, the operation and maintenance requirements of client applications are increasingly prominent.
Currently, widely used open source configuration centers include Spring Cloud Config, Diamond, Disconf, and apollo. Wherein, the Spring Cloud Config configuration center architecture comprises a Git warehouse, and the configuration file is stored in the Git warehouse. Therefore, after the configuration file is modified, the client needs to restart to obtain the new version of the configuration file from the Git repository, and the update of the configuration file of the client does not support the hot update. The Diamond configuration center solves the disadvantage that the client can obtain the configuration file after being restarted, but still does not support hot updating. The Disconf configuration center and the apollo configuration center can support the client to obtain the configuration file without restarting and can also support the hot update of the configuration file. But the Disconf configuration center and the apollo configuration center distribute the configuration file to the client through the zookeeper distribution server. And the zookeeper distribution server has size limitations on the configuration files received and distributed. Therefore, there may be a case where the zookeeper distribution server fails to distribute the configuration file, and the client cannot update the configuration. In addition, when the client fails to update the configuration, the Disconf configuration center and the apollo configuration center cannot acquire abnormal information of failed configuration update. Therefore, the workload of the operation and maintenance technicians is large, the abnormal positioning period is long, and the operation and maintenance cost is high.
Therefore, there is a need for an application updating method and apparatus for reducing the workload of operation and maintenance technicians, shortening the period of abnormal location, and reducing the cost of application operation and maintenance.
Disclosure of Invention
The embodiment of the invention provides an application updating method and device, which are used for reducing the workload of operation and maintenance technicians, shortening the abnormal positioning period and reducing the cost of application operation and maintenance.
In a first aspect, an embodiment of the present invention provides an application update method, where the method includes: the method comprises the steps that a client monitors configuration information of a distribution server, wherein the configuration information is sent to the distribution server by a configuration server; the client is in a running state, and running processes are registered in the distribution server when being started; the client acquires a configuration file of the client from the configuration server according to the monitored configuration information of the client; the client carries out hot updating according to the configuration file and reports the updating result of each process to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server.
By adopting the method, the configuration server side sends the configuration information to the distribution server, so that the client side can monitor the configuration information of the client side in the distribution server, and further acquire the configuration file from the configuration server according to the configuration information. Therefore, the problem that the client cannot acquire the configuration file from the distribution server and cannot update the configuration file due to the fact that the configuration file is too large in the prior art is solved. The client is in an operating state, and each running process is registered in the distribution server when being started, so that the distribution server can record the operating state of each process reported by the client, and when each process of the client is updated according to the acquired configuration file, the updating result of each process can be sent to the distribution server, so that the configuration server can acquire the updating result. Therefore, if the process updating fails or the process is abnormal, the configuration server can acquire the process updating failure and the abnormal condition, so that a technician can conveniently locate the abnormality according to the abnormal state of the process, and further conveniently find the reason for generating the abnormality. Compared with the method for positioning the exception in the instance dimension of the application in the prior art, the method and the device for positioning the exception in the instance process of the application with smaller unit than the instance dimension of the application can position the exception. The workload of technical personnel for positioning abnormity is reduced, the abnormity positioning period is shortened, and the cost of application operation and maintenance is reduced.
In a possible design, after obtaining the configuration file of the client from the configuration server, before the client performs hot update according to the configuration file, the method further includes: the client calls a configuration update callback function to verify the integrity of the field of the configuration file; and the client calls a verification callback function to verify the consistency of the message format of the configuration file and the message format of the client application.
By adopting the method, after the client acquires the configuration file, the configuration file field and the message format are verified by calling the configuration updating callback function and the verification callback function. The integrity of the configuration file and whether the message format is the same as the message format required to be configured by the client application can be determined through checking. Therefore, the accuracy of the application configuration updating of the client can be improved, the success rate of the application configuration updating is improved, and the cost of application operation and maintenance is reduced.
In one possible design, the client performs a hot update according to the configuration file, including: the client calls an application callback function to analyze the configuration file to obtain a configuration object of the client; and the client stores the configuration object in the memory, so that each process carries out hot update.
By adopting the method, the application callback function is set at the client, the configuration file can be analyzed by calling the application callback function, the configuration object required by the corresponding application in the client is obtained, and the configuration object is stored in the memory, so that the corresponding configuration object can be conveniently obtained in the application updating process, and the application can be updated thermally. Therefore, the accuracy of the application configuration updating is ensured under the condition of accelerating the application configuration updating speed.
In a possible design, before obtaining the configuration file of the client from the configuration server, the method further includes: the client determines that the client is in a configuration server updating mode; after the client performs hot update according to the configuration file, the method further includes: and after the client determines that the updating is successful, the configuration file is stored locally.
By adopting the method, the configuration file is stored locally after the client determines that the updating is successful. Therefore, when the configuration server side is abnormal and the client side cannot acquire the configuration file, the client side can acquire the configuration file in the local place for emergency use. The disaster recovery mechanism is added to ensure the stability of application operation.
In one possible design, further comprising: and the client reports the abnormal state of the abnormal process in the processes to the distribution server in the running process.
By adopting the method, when the process in the client is abnormal, the client reports the abnormal state of the abnormal process to the distribution server so that the configuration server acquires the abnormal state of the abnormal process, furthermore, a technician can determine the abnormal component according to the abnormal process and judge the abnormal reason of the abnormal component according to the abnormal state. Therefore, the workload of technical personnel for abnormal positioning is greatly reduced, the abnormal positioning period is shortened, and the cost of application operation and maintenance is reduced.
In a second aspect, an embodiment of the present invention provides an application update method, where the method includes:
the configuration server generates configuration information of the client and sends the configuration information to the distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started; the configuration server side sends a configuration file corresponding to the configuration information to the client side according to a configuration acquisition request sent by the client side; and the configuration server acquires the updating result of the configuration file which is updated by each process of the client in a hot mode from the distribution server.
By adopting the method, the configuration server sends the configuration information to the client through the distribution server, so that the client acquires the configuration file from the configuration server after monitoring the configuration information. Therefore, the problem that the client cannot acquire the configuration file from the distribution server and cannot update due to the fact that the configuration file is too large in the prior art is solved. The client is in an operating state, and each running process is registered in the distribution server when being started, so that the distribution server can record the operating state of each process reported by the client, and when each process of the client is updated according to the acquired configuration file, the updating result of each process can be sent to the distribution server, so that the configuration server can acquire the updating result. Therefore, if the process updating fails or the process is abnormal, the configuration server can acquire the process updating failure and the abnormal condition, so that a technician can conveniently locate the abnormality according to the abnormal state of the process, and further conveniently find the reason for generating the abnormality. Compared with the method for positioning the exception in the instance dimension of the application in the prior art, the method and the device for positioning the exception in the instance process of the application with smaller unit than the instance dimension of the application can position the exception. The workload of technical personnel for positioning abnormity is reduced, the abnormity positioning period is shortened, and the cost of application operation and maintenance is reduced.
In one possible design, further comprising: the configuration server side acquires abnormal information of the process sent by the client side from the distribution server; and the abnormal information of the process is reported to the distribution server when the client monitors the abnormal process in the running process.
By adopting the method, when the process in the client is abnormal, the client reports the abnormal information of the abnormal process to the distribution server so that the configuration server monitors the abnormal information of the abnormal process, furthermore, a technician can acquire the abnormal information of the abnormal process at the configuration server, determine the abnormal component according to the abnormal process and judge the abnormal reason of the abnormal component according to the abnormal information. Therefore, the workload of technical personnel for abnormal positioning is greatly reduced, the abnormal positioning period is shortened, and the cost of application operation and maintenance is reduced.
In a third aspect, an embodiment of the present invention provides an application updating apparatus, where the apparatus includes:
the monitoring module is used for monitoring configuration information of the distribution server, wherein the configuration information is sent to the distribution server by the configuration server; the client is in a running state, and running processes are registered in the distribution server when being started;
the processing module is used for acquiring the configuration file of the client from the configuration server according to the monitored configuration information of the processing module;
the processing module is further configured to perform hot update according to the configuration file, and report update results of the processes to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server.
In a fourth aspect, an embodiment of the present invention provides an application update apparatus, where the apparatus includes:
the processing module is used for generating configuration information of the client and sending the configuration information to the distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started;
the receiving and sending module is used for sending a configuration file corresponding to the configuration information to the client according to a configuration acquisition request sent by the client;
the transceiver module is further configured to obtain an update result of the configuration file that is updated by each process of the client in a hot manner from the distribution server.
In a fifth aspect, an embodiment of the present invention further provides a computing device, including: a memory for storing a computer program; a processor for calling the computer program stored in the memory and executing the method as described in the various possible designs of the first aspect, the second aspect according to the obtained program.
In a sixth aspect, the present invention further provides a computer-readable non-volatile storage medium, which includes a computer-readable program, and when the computer-readable program is read and executed by a computer, the computer is caused to execute the method described in the first and second aspects.
These and other implementations of the invention will be more readily understood from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of an architecture of an application update according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an application updating method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an application update method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an application update method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an application update apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an application update apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, after the client 103 runs, the architecture diagram of the application updating method according to the embodiment of the present invention registers each process of the started application in the distribution server 102. The configuration server 101 generates configuration information, and then transmits the configuration information to the distribution server 102. The client 103 monitors the distribution server 102, determines that the distribution server 102 has the configuration information of the client 103 itself and obtains the configuration information, and the client 103 obtains the configuration file from the configuration server 101 according to the configuration information, verifies the configuration file, analyzes the configuration file after determining that the integrity of the configuration file and the message format of the configuration file are consistent with the message format of the application, and updates the configuration of each process of the application. The client 103 reports the update results of the processes of the application to the distribution server 102, and the configuration server 101 obtains the update results of the processes from the acquisition and distribution server 102, so that technicians can directly monitor the update state of the processes of the application in the configuration server 101.
Based on this, an embodiment of the present application provides a flow of an application updating method, as shown in fig. 2, including:
here, an application may be added in the configuration server first. A corresponding version of the configuration file is created. And then, generating configuration information, wherein the configuration information comprises information such as the name and the version of the configuration file to be released.
The client can contain various applications, such as WeChat, QQ, XX bank and other applications; the client may also refer to an application server for supporting the running of applications such as WeChat, QQ, XX bank, and the like. In this way, when the client is in a running state, processes of an application started in the client can be registered in the distribution server. In an implementation manner, after each process of an application in a client is started, a process survival node named by a process number (pid) is registered in a distribution server, and a configuration server correspondingly maintains one or more application instances-process pools for one or more access applications running in each client; for example, if XX bank is running in the client 1, 4 processes of XX bank of the client 1 are started; client 1-XX bank-process 1001, client 1-XX bank-process 1002, client 1-XX bank-process 1003, and client 1-XX bank-process 1004 processes are registered in the distribution server as surviving nodes. The configuration server maintains a process pool of the client 1-XX bank, i.e., process 1001, process 1002, process 1003, and process 1004. If the XX bank is operated in the client 2, 4 processes of the XX bank of the client 2 are started; the client 2-XX bank-process 1005, the client 2-XX bank-process 1006, the client 2-XX bank-process 1007, and the client 2-XX bank-process 1008 processes surviving nodes are registered in the distribution server. The configuration server maintains a process pool of the 2-XX bank of the client, i.e., process 1005, process 1006, process 1007, and process 1008. And when a new process node is created or deleted in the client 1-XX bank, the new process node is added into the application instance-process pool or deleted from the application instance-process pool. Meanwhile, the configuration server generates an alarm notification including the process change information of the application instance and sends the alarm notification to a technician in charge of the application, so that the technician can follow the process change information of the application instance in the alarm notification to position and solve the abnormal reason. The workload and the period of abnormal positioning of technicians are greatly reduced, and the cost of application operation and maintenance is reduced. In addition, a page can be designed at the configuration server, and the application instance-process pool data can be visualized, so that technicians can view the process conditions of the application instances at any time on the page. Here, the client can register each process in the distribution server at the time of startup by loading a software development kit, setting a corresponding program, or the like.
here, the client may monitor the configuration information in the distribution server by loading a software development kit or setting a corresponding program, etc., to determine whether the client includes the configuration information of the client. And after determining that the configuration information of the client side is contained, acquiring the configuration file of the client side from the configuration server side.
Here, after the client obtains the configuration file of the client from the configuration server, each process of the application is thermally updated according to the configuration file. And generating an updating result corresponding to each process, and reporting the updating result corresponding to each process to a process node registered in the distribution server. And the configuration server acquires the updating result in each process node in the distribution server according to each maintained process in the process pool corresponding to the application instance of the client.
By adopting the method, the configuration server side sends the configuration information to the distribution server, so that the client side can monitor the configuration information of the client side in the distribution server, and further acquire the configuration file from the configuration server according to the configuration information. Therefore, the problem that the client cannot acquire the configuration file from the distribution server and cannot update the configuration file due to the fact that the configuration file is too large in the prior art is solved. The client is in an operating state, and each running process is registered in the distribution server when being started, so that the distribution server can record the operating state of each process reported by the client, and when each process of the client is updated according to the acquired configuration file, the updating result of each process can be sent to the distribution server, so that the configuration server can acquire the updating result. Therefore, if the process updating fails or the process is abnormal, the configuration server can acquire the process updating failure and the abnormal condition, so that a technician can conveniently locate the abnormality according to the abnormal state of the process, and further conveniently find the reason for generating the abnormality. Compared with the method for positioning the exception in the instance dimension of the application in the prior art, the method and the device for positioning the exception in the instance process of the application with smaller unit than the instance dimension of the application can position the exception. The workload of technical personnel for positioning abnormity is reduced, the abnormity positioning period is shortened, and the cost of application operation and maintenance is reduced.
The embodiment of the present application provides a method for verifying a configuration file, where after obtaining the configuration file of the client from the configuration server, before the client performs hot update according to the configuration file, the method further includes: the client calls a configuration update callback function to verify the integrity of the field of the configuration file;
and the client calls a verification callback function to verify the consistency of the message format of the configuration file and the message format of the client application.
Here, a configuration update callback function and a verification callback function may be set in the client, so that after the client acquires the configuration file, the integrity of the configuration information may be confirmed by the configuration update callback function, and whether the configuration information message format is the same as the application message format is confirmed by the verification callback function. The updating accuracy of the configuration file of the application in the client is ensured.
The embodiment of the application provides a method for analyzing a configuration file, wherein a client performs hot update according to the configuration file, and the method comprises the following steps: the client calls an application callback function to analyze the configuration file to obtain a configuration object of the client; and the client stores the configuration object in the memory, so that each process carries out hot update.
Here, since the configuration file in the configuration server is a multi-version configuration file of the application of the type, after the client acquires the configuration file and verifies integrity and message format consistency, the configuration file can be analyzed by calling an application callback function to acquire a configuration object required by the application, and the configuration object required by the application is analyzed and stored in a memory, so that the application can update the processes in a hot manner.
The embodiment of the present application provides an application updating method, before acquiring a configuration file of a client from a configuration server, the method further includes: the client determines that the client is in a configuration server updating mode; after the client performs hot update according to the configuration file, the method further includes: and after the client determines that the updating is successful, the configuration file is stored locally.
Here, after the configuration file is hot updated, the configuration file is stored locally. When the configuration server is abnormal, the client acquires the configuration file locally. Here the client may store 10 historical versions of the configuration file for optional use. Or may be determined comprehensively according to factors such as the update frequency of the application, the size of the configuration file, and the like. It should be noted here that the client may implement the configuration file acquisition in multiple access modes, such as a remote mode and a local mode, by loading a software development kit or setting a corresponding program; the present application provides 5-medium modes, as shown in table 2:
TABLE 2
As shown in table 2, the client can meet different requirements by setting multiple access modes.
And the client sets a remote mode, acquires the configuration file from the configuration server, maintains the configuration file in the memory, and writes the configuration file into a local disk for backup management after hot update.
For applications which do not need to be updated and configured for a long time, the update mode in the remote mode may be based on a remote _ no _ update mode, and the update operation of the configuration server is not concerned in the mode, and the configuration file is only acquired when the client is restarted.
For the applications that the management of the configuration file is complex and needs to be maintained and calculated by the client, the client can be set to be a remote _ with _ callback mode, when the application is started, the update callback function and the check callback function can be configured in a user-defined mode, and the integrity of the field of the configuration file and the consistency of the message format and the application message format are checked. The updating at each time is that the client calls the application callback function to analyze the configuration file so as to obtain and return the configuration object without the type to the memory for maintenance, and subsequently, the application only needs to obtain the configuration object without the type and convert the configuration object into the configuration object with the actual configuration type.
In the local mode, the client is equivalent to an interface for setting configuration management for the application, and the logic of reading and writing configuration and memory maintenance is not required to be realized by the application. When the configuration server fails and the application needs to be configured, updated or configured in a rollback mode, a technician can manually modify the configuration or replace the configuration file of the historical version to a disk specified directory and set a local mode, so that the application can be normally recovered.
The local _ with _ callback realizes the application callback function on the basis of the local mode, the access mode can be set with the management of the user-defined configuration file, and the configuration file is correspondingly processed by setting a class, setting a corresponding function algorithm in the class and the like so as to obtain a configuration object corresponding to the application.
The embodiment of the application provides a client operation method, wherein the client reports the abnormal state of the process which is abnormally operated in each process to the distribution server in the operation process.
When each process of the client is abnormal, reporting the abnormal state of the abnormal process to a process node of the process in the distribution server, so that the configuration server acquires the abnormal information, and further enables technical personnel to acquire the abnormal information, thereby facilitating abnormal positioning, reducing the workload of the technical personnel, shortening the working period of troubleshooting and positioning the abnormal information, and reducing the running and maintenance cost. Here, a configuration reconciliation function may also be set, that is, the name and version of the configuration file issued each time are recorded in the operation record of the configuration server, and a configuration reconciliation button or a periodic configuration reconciliation is set in the configuration server, so that the configuration reconciliation button is triggered, or when the configuration reconciliation cycle is currently performed, the configuration server builds a data structure according to the corresponding relationship between the application instance and the version of the configuration file recorded by the operation record issued each time. And the data structure is transmitted to a client through a distribution server, an application example and a configuration file version in the data structure are compared with an application example and a configuration file version in a memory by a software development kit or a corresponding program in the client, a comparison result is transmitted to a configuration server through the distribution server, and the configuration server displays the comparison result or transmits the comparison result to a technician through a mail, so that the daily application operation monitoring is realized, and the stability of application operation is ensured.
Based on this, an embodiment of the present application provides a flow of an application updating method, as shown in fig. 3, including:
301, a configuration server generates configuration information of a client and sends the configuration information to a distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started;
By adopting the method, the configuration server sends the configuration information to the client through the distribution server, so that the client acquires the configuration file from the configuration server after monitoring the configuration information. Therefore, the problem that the client cannot acquire the configuration file from the distribution server and cannot update due to the fact that the configuration file is too large in the prior art is solved. The client is in an operating state, and each running process is registered in the distribution server when being started, so that the distribution server can record the operating state of each process reported by the client, and when each process of the client is updated according to the acquired configuration file, the updating result of each process can be sent to the distribution server, so that the configuration server can acquire the updating result. Therefore, if the process updating fails or the process is abnormal, the configuration server can acquire the process updating failure and the abnormal condition, so that a technician can conveniently locate the abnormality according to the abnormal state of the process, and further conveniently find the reason for generating the abnormality. Compared with the method for positioning the exception in the instance dimension of the application in the prior art, the method and the device for positioning the exception in the instance process of the application with smaller unit than the instance dimension of the application can position the exception. The workload of technical personnel for positioning abnormity is reduced, the abnormity positioning period is shortened, and the cost of application operation and maintenance is reduced.
The embodiment of the application provides a method for operating a configuration server, wherein the configuration server acquires abnormal information of a process sent by a client from a distribution server; and the abnormal information of the process is reported to the distribution server when the client monitors the abnormal process in the running process.
Here, the configuration server monitors abnormal information of the abnormally operated process from the distribution server according to the maintained application instance-process pool, and generates alarm information. Therefore, a technician acquires the abnormal information of the abnormal process according to the alarm information of the configuration server, determines the abnormal component according to the abnormal process, and judges the abnormal reason of the abnormal component according to the abnormal state in the abnormal information. Therefore, the workload of technical personnel for abnormal positioning is greatly reduced, the abnormal positioning period is shortened, and the cost of application operation and maintenance is reduced.
Based on the above flow, an embodiment of the present application provides a flow of an application updating method, as shown in fig. 4, including:
And step 406, the client checks the integrity of the configuration file according to the configuration update callback function, and determines that the configuration file does not lose the field information.
And step 408, the client analyzes the configuration file according to the application callback function to obtain a configuration object, and stores the configuration object in a memory.
And step 409, performing hot update on the corresponding application in the client according to the configuration object in the memory.
And step 412, the configuration server obtains the update result of each process according to the maintained application instance-process pool.
And 414, monitoring the running state of each process by the client, and reporting the abnormal information of the process to the distribution server if the process is abnormal.
It should be noted that, the above-mentioned flow sequence is not exclusively implemented, and for example, step 407 may also be executed after step 408. Step 414 and step 415 may be performed before or after any of steps 404 to 413.
Based on the same concept, an application updating apparatus is provided in the embodiments of the present application, and fig. 5 is a schematic view of a service process provided in the embodiments of the present application, as shown in fig. 5, including:
a monitoring module 501, configured to monitor configuration information of a distribution server, where the configuration information is sent to the distribution server by a configuration server; the client is in a running state, and running processes are registered in the distribution server when being started;
a processing module 502, configured to obtain a configuration file of the client from the configuration server according to the monitored configuration information of the client;
the processing module 502 is further configured to perform hot update according to the configuration file, and report an update result of each process to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server.
In one possible design, the processing module 502 is further configured to: the client calls a configuration update callback function to verify the integrity of the field of the configuration file;
and the client calls a verification callback function to verify the consistency of the message format of the configuration file and the message format of the client application.
In one possible design, the processing module 502 is specifically configured to: the client calls an application callback function to analyze the configuration file to obtain a configuration object of the client;
and the client stores the configuration object in the memory, so that each process carries out hot update.
In one possible design, the processing module 502 is specifically configured to: the client determines that the client is in a configuration server updating mode; after the client performs hot update according to the configuration file, the method further includes: and after the client determines that the updating is successful, the configuration file is stored locally.
In one possible design, the processing module 502 is further configured to: and the client reports the abnormal state of the abnormal process in the processes to the distribution server in the running process.
Based on the same concept, an application updating apparatus is provided in the embodiments of the present application, and fig. 6 is a schematic view of a service process provided in the embodiments of the present application, as shown in fig. 6, including:
the processing module 601 is configured to generate configuration information of a client, and send the configuration information to a distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started;
a transceiver module 602, configured to send a configuration file corresponding to the configuration information to the client according to a configuration acquisition request sent by the client;
the transceiver module 602 is further configured to obtain an update result of the configuration file that is updated by each process of the client in a hot manner from the distribution server.
The transceiver module 602 is further configured to: the configuration server side acquires abnormal information of the process sent by the client side from the distribution server; and the abnormal information of the process is reported to the distribution server when the client monitors the abnormal process in the running process.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (11)
1. An application update method, comprising:
the method comprises the steps that a client monitors configuration information of a distribution server, wherein the configuration information is sent to the distribution server by a configuration server; the client is in a running state, and running processes are registered in the distribution server when being started;
the client acquires a configuration file of the client from the configuration server according to the monitored configuration information of the client;
the client carries out hot updating according to the configuration file and reports the updating result of each process to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server.
2. The method of claim 1, wherein after obtaining the configuration file of the client from the configuration server and before the client performs hot update according to the configuration file, the method further comprises:
the client calls a configuration update callback function to verify the integrity of the field of the configuration file;
and the client calls a verification callback function to verify the consistency of the message format of the configuration file and the message format of the client application.
3. The method of claim 1, wherein the client performs a hot update according to the configuration file, comprising:
the client calls an application callback function to analyze the configuration file to obtain a configuration object of the client;
and the client stores the configuration object in the memory, so that each process carries out hot update.
4. The method of claim 1, wherein before obtaining the configuration file of the client from the configuration server, further comprising:
the client determines that the client is in a configuration server updating mode;
after the client performs hot update according to the configuration file, the method further includes:
and after the client determines that the updating is successful, the configuration file is stored locally.
5. The method of any of claims 1-4, further comprising:
and the client reports the abnormal state of the abnormal process in the processes to the distribution server in the running process.
6. An application update method, comprising:
the configuration server generates configuration information of the client and sends the configuration information to the distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started;
the configuration server side sends a configuration file corresponding to the configuration information to the client side according to a configuration acquisition request sent by the client side;
and the configuration server acquires the updating result of the configuration file which is updated by each process of the client in a hot mode from the distribution server.
7. The method of claim 6, further comprising:
the configuration server side acquires abnormal information of the process sent by the client side from the distribution server; and the abnormal information of the process is reported to the distribution server when the client monitors the abnormal process in the running process.
8. An application update apparatus, the apparatus comprising:
the monitoring module is used for monitoring configuration information of the distribution server, wherein the configuration information is sent to the distribution server by the configuration server; the client is in a running state, and running processes are registered in the distribution server when being started;
the processing module is used for acquiring the configuration file of the client from the configuration server according to the monitored configuration information of the processing module;
the processing module is further configured to perform hot update according to the configuration file, and report update results of the processes to the distribution server; the configuration server is used for acquiring the state information of each process of the client from the distribution server.
9. An application update apparatus, the apparatus comprising:
the processing module is used for generating configuration information of the client and sending the configuration information to the distribution server; the configuration information in the distribution server is monitored by each client; the clients are in a running state, and running processes are registered in the distribution server when being started;
the receiving and sending module is used for sending a configuration file corresponding to the configuration information to the client according to a configuration acquisition request sent by the client;
the transceiver module is further configured to obtain an update result of the configuration file that is updated by each process of the client in a hot manner from the distribution server.
10. A computer-readable storage medium, characterized in that the storage medium stores a program which, when run on a computer, causes the computer to carry out the method of any one of claims 1 to 5 and 6, 7.
11. A computer device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory and executing the method of any of claims 1 to 5 and 6, 7 according to the obtained program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010594707.5A CN111736874A (en) | 2020-06-28 | 2020-06-28 | Application updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010594707.5A CN111736874A (en) | 2020-06-28 | 2020-06-28 | Application updating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111736874A true CN111736874A (en) | 2020-10-02 |
Family
ID=72651207
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010594707.5A Pending CN111736874A (en) | 2020-06-28 | 2020-06-28 | Application updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111736874A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112948020A (en) * | 2021-03-18 | 2021-06-11 | 海南视联通信技术有限公司 | Configuration file processing method and device |
CN113760383A (en) * | 2020-11-12 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Configuration information updating method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295031A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization and device |
CN107465714A (en) * | 2017-01-23 | 2017-12-12 | 北京思特奇信息技术股份有限公司 | A kind of configuration data dynamic update system and method based on application cluster |
CN107908708A (en) * | 2017-11-09 | 2018-04-13 | 北京锐安科技有限公司 | A kind of method, system, equipment and the storage medium of group document synchronization |
CN108566290A (en) * | 2018-02-07 | 2018-09-21 | 平安科技(深圳)有限公司 | service configuration management method, system, storage medium and server |
CN109376111A (en) * | 2018-09-26 | 2019-02-22 | 郑州云海信息技术有限公司 | A kind of server cluster and its rear end management method |
CN109889375A (en) * | 2019-01-23 | 2019-06-14 | 中国银行股份有限公司 | Service message method of calibration, device and computer storage medium |
CN110618996A (en) * | 2019-08-07 | 2019-12-27 | 北京东方国信科技股份有限公司 | Function library hot updating method applied to distributed database |
CN110932912A (en) * | 2019-12-12 | 2020-03-27 | 北京中电普华信息技术有限公司 | Method for realizing unified management of configuration files under micro-service architecture |
-
2020
- 2020-06-28 CN CN202010594707.5A patent/CN111736874A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295031A (en) * | 2016-03-30 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of method of data synchronization and device |
CN107465714A (en) * | 2017-01-23 | 2017-12-12 | 北京思特奇信息技术股份有限公司 | A kind of configuration data dynamic update system and method based on application cluster |
CN107908708A (en) * | 2017-11-09 | 2018-04-13 | 北京锐安科技有限公司 | A kind of method, system, equipment and the storage medium of group document synchronization |
CN108566290A (en) * | 2018-02-07 | 2018-09-21 | 平安科技(深圳)有限公司 | service configuration management method, system, storage medium and server |
CN109376111A (en) * | 2018-09-26 | 2019-02-22 | 郑州云海信息技术有限公司 | A kind of server cluster and its rear end management method |
CN109889375A (en) * | 2019-01-23 | 2019-06-14 | 中国银行股份有限公司 | Service message method of calibration, device and computer storage medium |
CN110618996A (en) * | 2019-08-07 | 2019-12-27 | 北京东方国信科技股份有限公司 | Function library hot updating method applied to distributed database |
CN110932912A (en) * | 2019-12-12 | 2020-03-27 | 北京中电普华信息技术有限公司 | Method for realizing unified management of configuration files under micro-service architecture |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113760383A (en) * | 2020-11-12 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Configuration information updating method and device |
CN112948020A (en) * | 2021-03-18 | 2021-06-11 | 海南视联通信技术有限公司 | Configuration file processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10152382B2 (en) | Method and system for monitoring virtual machine cluster | |
US11436100B2 (en) | Backup client agent | |
CN107660289B (en) | Automatic network control | |
US10805407B2 (en) | Supporting high availability for orchestrated services | |
CN107016480B (en) | Task scheduling method, device and system | |
US10911447B2 (en) | Application error fingerprinting | |
US9098439B2 (en) | Providing a fault tolerant system in a loosely-coupled cluster environment using application checkpoints and logs | |
US20080184079A1 (en) | Tracking down elusive intermittent failures | |
JP5444178B2 (en) | Backup / restore processing device, backup / restore processing method and program | |
US20080209409A1 (en) | Method and system for quality assurance subscription service | |
CN111736874A (en) | Application updating method and device | |
US9880897B2 (en) | Failure mode identification and reporting | |
US7673178B2 (en) | Break and optional hold on failure | |
CN113986450A (en) | Virtual machine backup method and device | |
CN117573306A (en) | Batch task scheduling system, method, device, computer equipment and storage medium | |
US11243712B2 (en) | Local analytics for high-availability storage systems | |
CN113760491A (en) | Task scheduling system, method, equipment and storage medium | |
CN114996057A (en) | Data backup method and device, electronic equipment and computer readable storage medium | |
CN112783730B (en) | Interface monitoring method, device, medium and electronic equipment | |
CN114791900A (en) | Operator-based Redis operation and maintenance method, device, system and storage medium | |
CN114490196A (en) | Database switching method, system, device and medium | |
CN114443356A (en) | Container cluster processing method and system | |
CN110941479B (en) | Task data execution method, server, and computer storage medium | |
CN114816969A (en) | Test case generation method, device, equipment and storage medium | |
US12056003B1 (en) | Methods and systems of incident management employing preemptive incident prevention and self healing processing |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201002 |