CN114253572A - Process updating method and device - Google Patents
Process updating method and device Download PDFInfo
- Publication number
- CN114253572A CN114253572A CN202111347358.8A CN202111347358A CN114253572A CN 114253572 A CN114253572 A CN 114253572A CN 202111347358 A CN202111347358 A CN 202111347358A CN 114253572 A CN114253572 A CN 114253572A
- Authority
- CN
- China
- Prior art keywords
- target
- user request
- user
- handle
- target process
- 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 525
- 230000008569 process Effects 0.000 title claims abstract description 452
- 238000012545 processing Methods 0.000 claims description 37
- 230000004044 response Effects 0.000 claims description 5
- 230000007246 mechanism Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000008447 perception Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004984 smart glass Substances 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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the specification provides a process updating method and a device, wherein the process updating method is applied to a client, and the client comprises: the system comprises an initial process, a first target process and a second target process updated based on the first target process; the first target process receives at least one user request forwarded by the initial process, and starts the second target process under the condition that the updating condition is determined to be met; and the second target process receives the at least one user request sent by the initial process under the condition that the initialization is completed, and processes the at least one user request.
Description
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a process updating method.
Background
With the development of network technology, background servers play an increasingly greater role in the whole network environment, and with the development of network technology, user requirements are continuously developed and requirements for background servers are higher and higher, so that the background servers need to be continuously upgraded to meet the requirements of clients. In a distributed system, a client usually runs embedded in a user process, when the client needs to be upgraded, the user process needs to recompile and generate a new executable program, and then upgrade service nodes on the line one by one, and in the upgrading process, as the client process needs to be restarted, a large upgrading cost is generated, and meanwhile, the use of the user is also influenced.
Disclosure of Invention
In view of this, the present specification provides a process updating method. One or more embodiments of the present specification also relate to a process update apparatus, a computing device, a computer-readable storage medium, and a computer program, so as to solve the technical deficiencies of the prior art.
According to a first aspect of embodiments of the present specification, there is provided a process updating method applied to a client, where the client includes: the system comprises an initial process, a first target process and a second target process updated based on the first target process;
the first target process receives at least one user request forwarded by the initial process, and starts the second target process under the condition that the updating condition is determined to be met;
and the second target process receives the at least one user request sent by the initial process under the condition that the initialization is completed, and processes the at least one user request.
According to a second aspect of the embodiments of the present specification, there is provided a process updating apparatus applied to a client, where the client includes: the system comprises an initial process, a first target process and a second target process updated based on the first target process;
the first target process is configured to receive at least one user request forwarded by the initial process, and the second target process is started under the condition that an updating condition is determined to be met;
the second target process is configured to receive the at least one user request sent by the initial process and process the at least one user request when initialization is completed.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions, wherein the processor implements the steps of the process update method when executing the computer-executable instructions.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any one of the process update methods.
According to a fifth aspect of embodiments herein, there is provided a computer program, wherein the computer program, when executed in a computer, causes the computer to perform the steps of the above-described process updating method.
A process updating method provided in an embodiment of the present specification is applied to a client, where the client includes: the system comprises an initial process, a first target process and a second target process updated based on the first target process; the first target process receives at least one user request forwarded by the initial process, and starts the second target process under the condition that the updating condition is determined to be met; and the second target process receives the at least one user request sent by the initial process under the condition that the initialization is completed, and processes the at least one user request.
Specifically, after the first target process receives the user request and determines that the updating condition is met, the second target process is started, after the second target process completes initialization, at least one user request sent by the initial process is received again, processing of the user request is completed, process hot upgrading is achieved, and therefore upgrading and restarting of the user process are not needed, namely user operation or perception is not needed, hot upgrading is achieved automatically through the client process, process upgrading cost is reduced, service delay in the user process is slightly affected, and user use is not affected.
Drawings
Fig. 1 is a system architecture diagram of a client to which a process updating method provided in an embodiment of the present specification is applied;
FIG. 2 is a flow diagram of a process update method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a process of a process update method according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a process updating apparatus according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
Hot upgrading: in the running process of the system, the system can be upgraded without user operation or perception under the condition of not interrupting the service.
The client of the distributed system usually runs embedded in the user process, when the client needs to be upgraded, the user process needs to recompile and generate a new executable program, and then service nodes on the line are upgraded one by one. In the upgrading process, because the process needs to be restarted, the request/flow on the process to be upgraded needs to be migrated in advance, and after the upgrading is completed, the request/flow is migrated back. This process can affect not only the operation of the user process, but also the cost of the client upgrade. However, in some projects, the upgrade of the user process is very costly, and it becomes very difficult to fix the problem of the client program. Based on this, the process updating method provided in the embodiments of the present specification implements hot upgrade processing on a client process, and only a new client process needs to be started instead of an old client process that needs to be updated without user process upgrade and restart, and further a dual-process manner is adopted, which not only avoids waiting for the time for client initialization, but also reduces the overhead of client upgrade.
It should be noted that, when a client needs to be upgraded in a user process, the client program is split into two processes, one is a light client, and the logic is relatively simple and is only responsible for forwarding a request (forwarding to a heavy client); the other is a heavy client, which contains the main client logic. The light client is contained in the user process, and the heavy client can be independently upgraded as an independent process.
Therefore, the process updating method provided in the embodiments of the present specification mainly includes upgrading the heavy client, and the light client may not be upgraded as much as possible because of simple logic, and only upgrades the heavy client, so as to reduce the upgrade overhead for the client.
In this specification, a process update method is provided, and the specification also relates to a process update apparatus, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.
Fig. 1 is a diagram illustrating a system architecture in which a process updating method provided in accordance with an embodiment of the present specification is applied to a client.
It should be noted that the initial process in the client is only responsible for forwarding the user request, and the first target process and the second target process include main client logic and can be upgraded as an independent process.
Fig. 1 includes an initial process (light client), a first target process (old version heavy client), a second target process (new version client), and a backend service cluster.
In specific implementation, after receiving a user request sent by a user, an initial process forwards the user request to a first target process, and when determining that the first target process meets an update condition, a second target process is started, and after waiting for the second target process to complete all initialization, the initial process forwards the user request to the second target process, the second target process receives the user handle carried in the initial process according to the user request and determines an internal handle having an association relationship with the user handle, and the second target process accesses a back-end service cluster based on the internal handle. Meanwhile, the second target process can forcibly stop the first target process from receiving the user request, so that the upgrading processing of the first target process is realized.
In the process updating method provided in the embodiment of the present specification, a client process is divided into an initial process, a first target process, and a second target process, and when it is determined that the first target process meets an update condition, the second target process is started, the initial process forwards a user request to the second target process, and the second target process can perform subsequent user request processing, so that automatic hot upgrade of the first target process is realized, and hot upgrade processing of the first target process is completed without user operation or perception.
Fig. 2 is a flowchart illustrating a process updating method according to an embodiment of the present specification, which specifically includes the following steps.
Step 202: and the first target process receives at least one user request forwarded by the initial process, and starts the second target process under the condition of determining that an updating condition is met.
The initial process can be understood as a light client process with simple logic and only responsible for request forwarding.
The first target process may be understood as a re-client process handling the main client logic and the second target process may be understood as a new re-client process started, so that the first target process may be considered as an old version of the re-client process and the second target process may be considered as a new version of the re-client process.
The update condition may be understood as a condition that the first target process needs to be updated in the running process, that is, a trigger condition of the hot upgrade, for example, the first target process may have bug in running, may also need to be updated to improve some indexes, and may also need to add a new function.
In specific implementation, after the initial process receives at least one user request, forwarding the at least one user request to the first target process, and then after the first target process receives the at least one user request, under the condition that it is confirmed that the update condition is met, triggering and starting the second target process, it should be noted that, when the first target process needs to be repaired or upgraded after the update condition is triggered, if a cold upgrade manner is adopted for the first target process, a restart operation or other operations may be generally required, which may affect the use process of the user.
Therefore, in practical application, in order to avoid that the restart operation of the client process influences the normal use of a user when the client process is upgraded, when the fact that the re-client process meets the updating condition is detected, a new-version re-client can be started to replace an old-version re-client which needs to be updated, so that the old-version client automatically completes hot upgrade under the condition that the user does not sense, the influence on service delay is small, for example, if a first target process needs to be upgraded for increasing a new function, the first target process can be determined to meet the preset updating condition, and then a second target process is triggered to be started.
Further, before the initial process forwards the received at least one user request to the first target process, the method further includes:
the initial process receives at least one user request and caches the at least one user request based on a user invocation order.
The user request may be understood as a user processing request in a distributed system, such as a user storage request in a distributed storage system.
In practical application, the initial process may receive at least one user request, and the system may cache the received at least one user request according to a calling sequence of different user requests, where the cached user request may be a user request that has not returned a result to the user.
In the process updating method provided in the embodiment of the present specification, in order to ensure the order of processing the user requests, the initial process caches at least one user request according to the user invocation order, so that a subsequent initial process forwards at least one user to the second target process according to the user invocation order.
Furthermore, the initial process forwards the user request to the first target process, and the user request can be forwarded in two ways; specifically, the forwarding, by the initial process, the received at least one user request to the first target process includes:
the initial process forwards the received at least one user request to the first target process based on a local connection protocol; or
The initial process forwards the received at least one user request to the first target process based on a shared memory mechanism.
In practical application, an initial process performs process communication through a local connection protocol, and forwards at least one received user request to a first target process, for example, the process communication is performed through a local socket; or the initial process performs process communication through the shared memory, and forwards the received at least one user request to the first target process, for example, the process communication is performed through the shared memory.
It should be noted that, the communication mechanism between the processes is described in the present specification only by taking the above two modes as examples, but is not limited to the above modes, and the present embodiment does not set any limit to this.
In the process updating method provided in the embodiments of the present description, the initial processes may communicate with each other in different communication manners, so as to forward the user request from the initial process to the first target process, and further, forward the user request in real time.
Step 204: and the second target process receives the at least one user request sent by the initial process under the condition that the initialization is completed, and processes the at least one user request.
In a specific implementation, after the second target process is started, all initialization work may be completed first, and after it is determined that the initialization work is completed, at least one user request sent by the initial process may be received and processed.
It should be noted that, in practical applications, it may also take a certain time for the second target process to initialize, and in this process, the first target process may still receive the user request because the system has not forced to stop the running process of the first target process.
In order to accurately determine the time for completing initialization of the second target process, after the second target process completes all initialization, a command to be received needs to be sent to the initial process to inform that the initial process can forward a user request to the second target process, so that subsequent user request processing is realized; specifically, after the second target process is initialized, the method further includes:
the second target process sends a command to be received to the initial process;
the initial process responds to the instruction to be received, and sends the at least one user request to the second target process based on the user calling sequence.
In specific implementation, after the second target process sends the instruction to be received to the initial process, the initial process may determine that the second target process may replace the first target process to receive the user request, and then the initial process sends at least one user request to the second target process based on the cached user invocation sequence.
In practical application, after the second target process completes all initializations, the instruction to be received can be sent to the initial process, that is, the second target process informs the initial process, and all current user requests which do not return results are all forwarded to the second target process according to a user calling sequence; the initial process responds to the instruction to be received and forwards at least one user request to the second target process, before the forwarding is completed, the forwarding of a subsequent new user request is suspended so as to ensure the sending sequence of the user requests, and after the forwarding is completed, the subsequent new user request is forwarded to the second target process.
In the process updating method provided in the embodiment of the present specification, after it is determined that the second target process completes initialization, the user request is forwarded to the second target process, so as to implement replacement of the first target process, and ensure that the user implements a process of processing the user request in an imperceptible state.
After the newly started second target process receives the user request sent by the initial process, the second target process can be understood as a substitute for the first target process to complete the processing of the user request, and then the first target process can be forcibly quitted; specifically, after the second target process receives the at least one user request sent by the initial process when the initialization is completed, the method further includes:
the first target process stops receiving the at least one user request sent by the initial process.
In practical application, after the initial process forwards the at least one user request to the second target process, in order to enable the second target process to replace the first target process, the hot upgrade of the first target process is completed, and then the first target process may stop receiving the at least one user request sent by the initial process, which may be understood as forcibly killing an old re-client to be updated.
In the process updating method provided in the embodiment of the present specification, the first target process stops receiving the user request sent by the initial process, and then the replacement process of the second target process on the first target process is completed, so that the heavy client to be updated does not affect the whole user process while not participating in the user request processing.
Further, the processing, by the second target process, the at least one user request includes:
and the second target process receives the user handle carried in the initial process based on the at least one user request, determines an internal handle having an association relationship with the user handle, and processes the at least one user request based on the internal handle.
In the distributed file system, a user can obtain a handle after opening a file, and then read and write the file through the handle, and in the implementation inside the file system, corresponding internal resources are generally found through the handle, so that the operation of processing a user request is performed, and in the distributed file system provided by the embodiment, two types of handles exist, one type of handle is returned by a light client and is called as a user handle; the other is a handle returned by the back-end service cluster to the heavy client, and the heavy client brings the handle back to the light client, and the handle is called an internal handle. There is a one-to-one correspondence between the two handles.
In practical application, the second target process may also receive an internal handle while receiving at least one user request sent by the initial process, where the internal handle is a handle determined according to a user handle carried in each user request and having an association relationship with the user handle, and the second target process may access the backend service cluster locally based on the determined internal handle, so as to implement processing on the user request.
Furthermore, each user request carries a user handle, the initial process converts the user handle into an internal handle and then forwards the internal handle to the second target process, and if the second target process finds that the internal handle does not exist locally, a new internal handle can be obtained based on a reopening operation to complete processing of the user request; specifically, after the second target process receives the user handle carried in the initial process based on the at least one user request and determines an internal handle having an association relationship with the user handle, the method further includes:
and the second target process obtains a target internal handle based on the internal handle which is associated with the user handle and processes the at least one user request based on the target internal handle when the handle which is the same as the internal handle cannot be determined locally.
In practical application, after the second target process receives the internal handle which is determined by the initial process to have the association relation with the user handle, under the condition that the handle which is the same as the internal handle cannot be determined locally, a re-opening operation (which needs to carry the old internal handle) can be further performed, in the re-opening operation, the back-end server can return a new internal handle of the second target process, and meanwhile, the back-end server deletes the resource corresponding to the old internal handle, and the authority is destroyed, so that the old internal handle cannot access the back-end server; after the second target process obtains a new internal handle, namely the target internal handle, the second target process can further access the back-end server to process the user request based on the target internal handle, and meanwhile, the target internal handle is returned to the initial process, so that the subsequent initial process can conveniently update the corresponding relation between the local user handle and the internal handle.
In the process updating method provided in the embodiment of the present specification, after the second target process does not find a matched internal handle locally, a new internal handle may be obtained again based on a reopening operation, and the back-end server is accessed to process the user request based on the new internal handle, so that the user request is processed through the second target process.
Further, the obtaining a target internal handle based on the reopening operation and processing the at least one user request based on the target internal handle comprises:
and the second target process sends a reopening instruction carrying an internal handle which has an association relation with the user handle to a back-end server, receives the target internal handle returned by the back-end server in response to the reopening instruction, and processes the at least one user request based on the target internal handle.
During specific implementation, after the second target process cannot locally determine the internal handle consistent with the internal handle in the association relationship with the user handle, a reopening instruction is sent to the back-end server, after the back-end server receives the reopening instruction, the target internal handle is determined based on the reopening instruction, the target internal handle is returned to the second target process, and after the second target process receives the target internal handle, the back-end server can be accessed based on the target internal handle, so that the user request is processed.
In the process updating method provided by the embodiment of the present specification, a reopening instruction is sent to the backend server, so as to obtain a new target internal handle, which is convenient for processing the user request based on the target internal handle in the following.
After returning the new target internal handle to the second target process, the back-end server also needs to delete the resource corresponding to the old internal handle and destroy the authority of the resource, so that the back-end server cannot be accessed according to the old internal handle; specifically, after processing the at least one user request based on the target internal handle, the method further includes:
and the second target process receives a handle updating completion message returned by the back-end server.
In practical application, the back-end server deletes the resource corresponding to the old internal handle and destroys the authority of the resource, so that the process that the back-end server cannot be accessed based on the old internal handle is realized, and after the back-end server updates the handle, a message that the update of the handle is completed can be returned to the second target process; in addition, the back-end server can return the new internal handle to the second target process and store the new internal handle locally, so that the subsequent second target process can determine the internal handle having the association relation with the user handle locally.
In the process updating method provided in the embodiment of the present specification, after the back-end server updates the internal handle process, the back-end server returns to the second target process with a handle update completion message, so that the subsequent second target process can return the target internal handle to the initial process, thereby updating the one-to-one correspondence between the user handle and the target internal handle.
In order to facilitate the subsequent second target process to locally determine the internal handle corresponding to the user handle, the association relationship between the user handle and the new internal handle of the target needs to be cached in the initial process, so as to ensure that the second target process can accurately determine the corresponding internal handle, and further access the back-end server to obtain the processing resource; specifically, after processing the at least one user request based on the target internal handle, the method further includes:
and the initial process acquires the target internal handle from the second target process and caches the association relationship between the user handle carried in the at least one user request and the target internal handle.
In practical application, after the second target process processes the user request based on the target internal handle, the initial process may obtain the target internal handle from the second target process, determine an association relationship between the target internal handle and the user handle carried in the user request, and cache the determined association relationship, so as to update the association relationship list, and facilitate finding an internal handle having a corresponding relationship with the user handle based on the updated association relationship.
In the process updating method provided in the embodiments of the present description, the initial process caches the association relationship between the target internal handle and the user handle to update the one-to-one correspondence relationship between handles, so as to ensure that the internal handle determined based on the correspondence relationship can access the back-end server in time to obtain the corresponding used resource.
In summary, the process updating method provided in the embodiments of the present specification divides the client processes into two types, and only the client with a main complex logic is updated without updating the client processes with simple logic; under the condition that the first target process meets the updating condition, starting a new heavy client process to replace the first target process to access a back-end server to realize the updating of the heavy client; in addition, in the process of waiting for the initialization of the second target process, the first target process can still receive the user request, and the operation of the user process is not influenced; further, when the internal handle corresponding to the user handle cannot be determined, the user request which is not completed on the first target process can be processed only by performing one more step of re-opening operation to obtain a new internal handle, so that the processing cost is low.
The following will further describe the process updating method by taking the application of the process updating method provided in this specification in a distributed file system as an example with reference to fig. 3. Fig. 3 is a flowchart illustrating a processing procedure of a process updating method according to an embodiment of the present specification, and specifically includes the following steps.
It should be noted that fig. 3 is a processing procedure of a process updating method provided in this embodiment, and step 302 is a user request processing procedure for dividing a client process into a light client and an old version heavy client; step 304 is a processing procedure of repairing or updating when it is determined that the old version re-client side meets the updating condition; step 306 is the process of processing the user request for the started new version re-client instead of the old version re-client.
Step 302: after receiving the user request, the light client forwards the user request to the old version heavy client, and the old version heavy client accesses the back-end service cluster to complete the processing of the user request.
Step 304: and when the old version re-client determines that the updating condition is met, the new version re-client can be started, and the new version re-client is waited to finish all initialization processes.
It should be noted that, when waiting for the new version of the heavy client to complete initialization, the initial process still forwards the received user request to the old version of the heavy client, thereby ensuring that the user process has no influence.
Step 306: after the new version re-client finishes initialization, the initial process forwards the received user request to the new version re-client, meanwhile, the old version re-client is forced to stop receiving the user request, the new version re-client receives the user request, receives an internal handle corresponding to the user handle carried in the user request, and accesses a back-end service cluster based on the internal handle to acquire a resource for processing the user request and realize a processing process of the user request.
It should be noted that the process updating method provided in this embodiment ensures that only the heavy client is updated, so that the light client does not have process updating as much as possible, and a dual-process manner is adopted during the heavy client updating, so as to avoid waiting for the time for client initialization, obtain a new internal handle on an old client for an incomplete user request, and perform subsequent re-opening operation to complete processing on the user request, so that the cost and expense for updating are low.
According to the process updating method provided by the embodiment of the specification, when the old version re-client meets the updating condition, the new version re-client process is started to avoid influencing the use of the user process, so that the process updating cost is reduced.
Corresponding to the above method embodiment, the present specification further provides an object processing apparatus embodiment, and fig. 4 shows a schematic structural diagram of a process updating apparatus provided in an embodiment of the present specification. As shown in fig. 4, the apparatus is applied to a client, and the client includes: an initial process 402, a first target process 404, a second target process 406 updated based on the first target process;
the first target process 404 configured to receive at least one user request forwarded by the initial process, and in case that it is determined that an update condition is satisfied, start the second target process;
the second target process 406 is configured to receive the at least one user request sent by the initial process and process the at least one user request when the initialization is completed.
Optionally, the second target process 406 is further configured to receive a user handle carried in the initial process based on the at least one user request, determine an internal handle having an association relationship with the user handle, and process the at least one user request based on the internal handle.
Optionally, the second target process 406 is further configured to, based on the internal handle having an association relationship with the user handle, obtain a target internal handle based on a reopen operation in a case that a handle identical to the internal handle cannot be determined locally, and process the at least one user request based on the target internal handle.
Optionally, the second target process 406 is further configured to send a reopen instruction carrying an internal handle having an association relationship with a user handle to a backend server, receive a target internal handle returned by the backend server in response to the reopen instruction, and process the at least one user request based on the target internal handle.
Optionally, the second target process 406 is further configured to receive a handle update completion message returned by the backend server.
Optionally, the initial process 402 is configured to obtain the target internal handle from the second target process, and cache an association relationship between the user handle carried in the at least one user request and the target internal handle.
Optionally, the initial process 402 is further configured to forward the received at least one user request to the first target process based on a local connection protocol; or
Optionally, the initial process 402 is further configured to forward the received at least one user request to the first target process based on a local connection protocol; or
Forwarding the received at least one user request to the first target process based on a shared memory mechanism.
Optionally, the initial process 402 is further configured to receive at least one user request, and cache the at least one user request based on a user invocation order.
Optionally, the second target process 406 is further configured to send a to-be-received instruction to the initial process;
optionally, the initial process 402 is further configured to send the at least one user request to the second target process based on the user invocation order in response to the instruction to be received.
Optionally, the first target process 404 is further configured to stop receiving the at least one user request sent by the initial process.
According to the process updating device provided by the specification, after a first target process receives a user request and determines that an updating condition is met, a second target process is started, the user request is forwarded to the second target process to be processed, after the second target process completes initialization, the processing of the user request is completed in the second target process based on a determined internal handle, the process hot-upgrading processing is achieved, further the upgrading and restarting of the user process are not needed, namely user operation or perception is not needed, the upgrading is automatically completed through a client process, the process upgrading cost is reduced, the service delay in the user process is less affected, and the use of a user is not affected.
The above is an exemplary scheme of a process updating apparatus according to this embodiment. It should be noted that the technical solution of the process updating apparatus and the technical solution of the process updating method belong to the same concept, and details that are not described in detail in the technical solution of the process updating apparatus can be referred to the description of the technical solution of the process updating method.
FIG. 5 illustrates a block diagram of a computing device 500 provided in accordance with one embodiment of the present description. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. Processor 520 is coupled to memory 510 via bus 530, and database 550 is used to store data.
In one embodiment of the present description, the above-described components of computing device 500, as well as other components not shown in FIG. 5, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 5 is for purposes of example only and is not limiting as to the scope of the present description. Those skilled in the art may add or replace other components as desired.
Wherein the processor 520 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the process updating method described above.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the object processing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the process updating method.
An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor implement the steps of the process updating method described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above process updating method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above process updating method.
An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the process updating method.
The above is an illustrative scheme of a computer program of the present embodiment. It should be noted that the technical solution of the computer program and the technical solution of the process updating method belong to the same concept, and details that are not described in detail in the technical solution of the computer program can be referred to the description of the technical solution of the process updating method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.
Claims (13)
1. A process updating method is applied to a client, and the client comprises: the system comprises an initial process, a first target process and a second target process updated based on the first target process;
the first target process receives at least one user request forwarded by the initial process, and starts the second target process under the condition that the updating condition is determined to be met;
and the second target process receives the at least one user request sent by the initial process under the condition that the initialization is completed, and processes the at least one user request.
2. The process updating method of claim 1, wherein the second target process processes the at least one user request, and comprises:
and the second target process receives the user handle carried in the initial process based on the at least one user request, determines an internal handle having an association relationship with the user handle, and processes the at least one user request based on the internal handle.
3. The process updating method according to claim 2, wherein after the second target process receives the user handle carried in the initial process based on the at least one user request and determines an internal handle having an association relationship with the user handle, the method further comprises:
and the second target process obtains a target internal handle based on the internal handle which is associated with the user handle and processes the at least one user request based on the target internal handle when the handle which is the same as the internal handle cannot be determined locally.
4. The process updating method of claim 3, wherein the obtaining a target internal handle based on the reopen operation and processing the at least one user request based on the target internal handle comprises:
and the second target process sends a reopening instruction carrying an internal handle which has an association relation with the user handle to a back-end server, receives the target internal handle returned by the back-end server in response to the reopening instruction, and processes the at least one user request based on the target internal handle.
5. The process updating method according to claim 3 or 4, further comprising, after processing the at least one user request based on the target internal handle:
and the second target process receives a handle updating completion message returned by the back-end server.
6. The process update method of claim 5, further comprising, after processing the at least one user request based on the target internal handle:
and the initial process acquires the target internal handle from the second target process and caches the association relationship between the user handle carried in the at least one user request and the target internal handle.
7. The process updating method according to claim 1, wherein the initial process forwards the received at least one user request to the first target process, comprising:
the initial process forwards the received at least one user request to the first target process based on a local connection protocol; or
The initial process forwards the received at least one user request to the first target process based on a shared memory mechanism.
8. The process updating method according to claim 7, wherein before the initial process forwards the received at least one user request to the first target process, the method further comprises:
the initial process receives at least one user request and caches the at least one user request based on a user invocation order.
9. The process updating method of claim 8, the second target process further comprising, after the initialization is completed:
the second target process sends a command to be received to the initial process;
the initial process responds to the instruction to be received, and sends the at least one user request to the second target process based on the user calling sequence.
10. The process updating method according to claim 7, wherein the second target process, after receiving the at least one user request sent by the initial process when the initialization is completed, further comprises:
the first target process stops receiving the at least one user request sent by the initial process.
11. A process updating device is applied to a client, and the client comprises: the system comprises an initial process, a first target process and a second target process updated based on the first target process;
the first target process is configured to receive at least one user request forwarded by the initial process, and the second target process is started under the condition that an updating condition is determined to be met;
the second target process is configured to receive the at least one user request sent by the initial process and process the at least one user request when initialization is completed.
12. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions, which when executed by the processor implement the steps of the process updating method of any one of claims 1 to 10.
13. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the process updating method of any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111347358.8A CN114253572A (en) | 2021-11-15 | 2021-11-15 | Process updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111347358.8A CN114253572A (en) | 2021-11-15 | 2021-11-15 | Process updating method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114253572A true CN114253572A (en) | 2022-03-29 |
Family
ID=80792510
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111347358.8A Pending CN114253572A (en) | 2021-11-15 | 2021-11-15 | Process updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114253572A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115361435A (en) * | 2022-07-13 | 2022-11-18 | 阿里巴巴(中国)有限公司 | Data processing method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110296393A1 (en) * | 2010-05-25 | 2011-12-01 | Seth Kelby Vidal | Systems and methods for generating an encoded package profile based on executing host processes |
CN105577826A (en) * | 2016-01-29 | 2016-05-11 | 北京罡阳泰克科技有限公司 | Distributed cluster processing system of network applications based on Chinese and processing method thereof |
US20160378454A1 (en) * | 2015-06-29 | 2016-12-29 | Verizon Patent And Licensing Inc. | Software updates using client self-reporting and a hierarchical data structure |
CN106528225A (en) * | 2016-11-03 | 2017-03-22 | 北京像素软件科技股份有限公司 | Hot update method and apparatus for game server |
CN110275782A (en) * | 2018-03-13 | 2019-09-24 | 阿里巴巴集团控股有限公司 | Data processing method and device |
CN111679850A (en) * | 2019-03-11 | 2020-09-18 | 阿里巴巴集团控股有限公司 | Application program hot update processing method, device and system |
-
2021
- 2021-11-15 CN CN202111347358.8A patent/CN114253572A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110296393A1 (en) * | 2010-05-25 | 2011-12-01 | Seth Kelby Vidal | Systems and methods for generating an encoded package profile based on executing host processes |
US20160378454A1 (en) * | 2015-06-29 | 2016-12-29 | Verizon Patent And Licensing Inc. | Software updates using client self-reporting and a hierarchical data structure |
CN105577826A (en) * | 2016-01-29 | 2016-05-11 | 北京罡阳泰克科技有限公司 | Distributed cluster processing system of network applications based on Chinese and processing method thereof |
CN106528225A (en) * | 2016-11-03 | 2017-03-22 | 北京像素软件科技股份有限公司 | Hot update method and apparatus for game server |
CN110275782A (en) * | 2018-03-13 | 2019-09-24 | 阿里巴巴集团控股有限公司 | Data processing method and device |
CN111679850A (en) * | 2019-03-11 | 2020-09-18 | 阿里巴巴集团控股有限公司 | Application program hot update processing method, device and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115361435A (en) * | 2022-07-13 | 2022-11-18 | 阿里巴巴(中国)有限公司 | Data processing method |
CN115361435B (en) * | 2022-07-13 | 2024-07-30 | 阿里巴巴(中国)有限公司 | Data processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108595207B (en) | Gray scale publishing method, rule engine, system, terminal and storage medium | |
CN109525624B (en) | Container login method and device and storage medium | |
CN107943594B (en) | Data acquisition method and device | |
US11016941B2 (en) | Delayed asynchronous file replication in a distributed file system | |
CN102571940B (en) | Application program remote installation system, method, intelligent terminal, application server | |
JP6238309B2 (en) | Method for generating a snapshot of a shared volume with consistency between applications | |
US20200195743A1 (en) | Systems and methods for accelerating object stores with distributed caching | |
US11036494B2 (en) | Embedded application upgrade | |
US10200507B2 (en) | Creation of a binding based on a description associated with a server | |
US20210397429A1 (en) | Live updates of stateful components | |
US10802753B2 (en) | Distributed compute array in a storage system | |
US9747291B1 (en) | Non-disruptive upgrade configuration translator | |
US20190102309A1 (en) | Nv cache | |
CN112486074B (en) | Data processing system, method and device | |
WO2021223471A1 (en) | Configuration file centralized management system, method and apparatus | |
WO2015035774A1 (en) | Customization method and system for mobile terminal based on user space file system | |
US8291406B2 (en) | Data imaging system and methods | |
CN114253572A (en) | Process updating method and device | |
CN113885780A (en) | Data synchronization method, device, electronic equipment, system and storage medium | |
CN112491940B (en) | Request forwarding method and device of proxy server, storage medium and electronic equipment | |
US10353733B1 (en) | Systems and methods for performing virtual machine updates without rebuild of distributed databases thereon | |
WO2022068660A1 (en) | Method and device for keeping data consistent across different storage systems | |
CN114035893A (en) | Virtual machine management method and system | |
WO2016173122A1 (en) | Network search method and device | |
CN113934437A (en) | Method and system for installing application in cloud mobile phone and client cloud mobile phone |
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 |