CN106648870A - Service restarting method and device - Google Patents

Service restarting method and device Download PDF

Info

Publication number
CN106648870A
CN106648870A CN201611236720.3A CN201611236720A CN106648870A CN 106648870 A CN106648870 A CN 106648870A CN 201611236720 A CN201611236720 A CN 201611236720A CN 106648870 A CN106648870 A CN 106648870A
Authority
CN
China
Prior art keywords
service
socket
binding
subprocess
target interface
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
Application number
CN201611236720.3A
Other languages
Chinese (zh)
Inventor
郝延凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201611236720.3A priority Critical patent/CN106648870A/en
Publication of CN106648870A publication Critical patent/CN106648870A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The embodiment of the invention provides a service restarting method and device. The method comprises the steps of: by a service process, acquiring a socket bound with a target interface according to a restart instruction; creating a service subprocess which is the same with the service process, and transmitting the bound socket into the service subprocess; after judging that the service process does not has a request, closing the service process; and aiming at data of the target interface, calling the bound socket by adopting the service subprocess. Hot restart on a service is implemented; the service can be restarted in a case of not interrupting the service; the service restarting method and device are simple to operate, do not need to use a backup server, and are convenient and rapid to carry out service upgrading.

Description

A kind of method for restarting and device of service
Technical field
The present invention relates to field of computer technology, the method for restarting of more particularly to a kind of service and a kind of restarting for service Device.
Background technology
Thrift be between a set of different language communicate RPC (Remote Procedure Call Protocol, remotely Process invocation protocol) framework.Those skilled in the art are having found that Thrift is using multiple using Thrift when developing The mode that service is backed up mutually is disposed and more new demand servicing service.
For example, a service service is operated in a server A, if it is desired to upgrading to the service, it is necessary to make Replaced with the backup server B of other one deployment equally service.Will the service institute it is wired it is upper request all hand over to clothes On business device B, then cut off and serviced in server A, update the service on A and restart, then service is replaced back on A from B, from And realize the upgrading to servicing.
But, Thrift is disposed and more new demand servicing service by the way of above-mentioned backup, service operations is updated every time numerous Trivial, upgrading deployment is not convenient.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome the problems referred to above or at least in part solve on State the method for restarting of the service of problem and the rebooting device of corresponding service.
According to the one side of the embodiment of the present invention, there is provided a kind of method for restarting of service, including:Service processes foundation Instruction of restarting, obtains the socket with target interface binding;Create and service subprocess with the service processes identical, Socket to the incoming binding of the service subprocess;Judge that the service processes are not deposited upon request, close the clothes Business process;For the data of the target interface, the socket of the binding is called using the service subprocess.
Optionally, wherein, also include:Advance change bank code so that process supports incoming socket, wherein, it is described enter Journey includes service processes and service subprocess;The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
Optionally, wherein, also include:Service processes are created according to the library file of the support process hot restart.
Optionally, after obtaining the socket with target interface binding, also include:The socket of the binding is added to In environmental variable.
Optionally, to the socket of the incoming binding of the service subprocess, including:It is incoming to the service subprocess The environmental variable, with the socket of the incoming binding.
Optionally, for the data of the target interface, the socket of the binding is called using the service subprocess, Including:At the target interface, judge in the environmental variable of the service subprocess with the presence or absence of the socket of the binding; If there is the socket of the binding, the socket of the binding is called using the service subprocess.
Optionally, wherein, also include:The socket with target interface binding is created according to interface requests.
A kind of other side according to embodiments of the present invention, there is provided rebooting device of service, including:Acquisition module, For service processes according to instruction of restarting, the socket with target interface binding is obtained;Afferent module, for create with The service processes identical services subprocess, the socket to the incoming binding of the service subprocess;Closedown module, uses In judging that the service processes do not deposit upon request, the service processes are closed;Service module, for for the target interface Data, the socket of the binding is called using the service subprocess.
Optionally, wherein, also include:Module is changed in storehouse, for change bank code in advance, so that process supports incoming Socket, wherein, the process includes service processes and service subprocess;Encapsulation change bank code, obtain correspondence support into The library file of journey hot restart.
Optionally, wherein, also include:Creation module, takes for creating according to the library file of the support process hot restart Business process.
Optionally, wherein, also include:Variable add module, for the socket of the binding to be added to into environmental variable In.
Optionally, the afferent module, for the service incoming environmental variable of subprocess, described is tied up with incoming Fixed socket.
Optionally, the service module, at the target interface, judging the environmental variable of the service subprocess In with the presence or absence of the binding socket;If there is the socket of the binding, called using the service subprocess described The socket of binding.
Optionally, wherein, also include:Creation module, for creating and target interface binding according to interface requests socket。
Service processes obtain the socket with target interface binding according to instruction of restarting, then create with it is described service into Journey identical services subprocess, the socket to the incoming binding of the service subprocess, and by servicing subprocess clothes are taken over Business process provides service to target interface, is judging that the service processes do not deposit upon request, and the closing service processes are adopted The socket of the binding is called to provide the service for target interface with service subprocess, so as to realize the thermogravimetric to servicing Open, can the service of restarting in the case of continual service, simple to operate, without using backup server, service upgrade is convenient.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of description, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred implementation, various other advantages and benefit is common for this area Technical staff will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, and is not considered as to the present invention Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
The step of Fig. 1 shows a kind of method for restarting embodiment of service according to an embodiment of the invention flow chart;
The step of Fig. 2 shows a kind of method for restarting embodiment of service in accordance with another embodiment of the present invention flow process Figure;
Fig. 3 shows a kind of structured flowchart of the rebooting device embodiment of service according to an embodiment of the invention;With And
Fig. 4 shows a kind of structured flowchart of the rebooting device embodiment of service in accordance with another embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
In order to solve when disposing by the way of backup with more new demand servicing service, every time renewal service operations are loaded down with trivial details, rise The not convenient problem of grade at least one of level deployment, the embodiment of the present invention carries out hot restart to service, i.e., in the situation of continual service Under the service of restarting, it is simple to operate without the need for disposing backup server, upgrade it is convenient.
With reference to Fig. 1, flow the step of show a kind of method for restarting embodiment of service according to an embodiment of the invention Cheng Tu, specifically may include steps of:
Step 102, service processes obtain the socket with target interface binding according to instruction of restarting.
In the present embodiment, start a service processes service, set up socket and bind with target interface, there is provided for this The service of target interface.Arranging service processes service can respond signal specific and then perform hot restart, wherein, specific letter Number include instruction of restarting, after instruction of restarting is sent, service processes service obtains the service processes according to the instruction of restarting The socket that service correspondences are bound with target interface.Wherein, socket is used to describe IP address and port, is a communication The handle of chain.
Step 104, creates and service processes identical service subprocess, incoming to the service subprocess described to tie up Fixed socket.
It is to ensure that service is not interrupted during carrying out hot restart according to instruction of restarting, one can be set up with the clothes Business process identical services subprocess, the socket to the incoming binding of the service subprocess, i.e., in the service subprocess Incoming socket such that it is able to provide the socket with target interface binding, there is provided support the service of the target interface.So as to take The request being carrying out in business process is continued executing with, and afterwards for the request of the target interface, is provided by incoming socket Perform to service subprocess.
Step 106, judges that the service processes are not deposited upon request, closes the service processes.
Step 108, for the data of the target interface, using the service subprocess binding is called socket。
Then for the request on service processes is monitored, there is no request when service processes are listened in service processes Afterwards, the service processes can be closed, service processes no longer provide service, for the data of the target interface, using the clothes Business subprocess calls the socket of the binding, i.e., be supplied to service subprocess by incoming socket, using service subprocess Processed, continue to provide for the service of target interface, completed for the hot restart of service.
To sum up, service processes obtain the socket with target interface binding according to instruction of restarting, then create and the clothes Business process identical services subprocess, the socket to the incoming binding of the service subprocess, is connect by servicing subprocess There is provided service to target interface for service processes, judging that the service processes do not deposit upon request, closing is described service into Journey, calls the socket of the binding to provide the service for target interface, so as to realize to service using service subprocess Hot restart, can the service of restarting in the case of continual service, it is simple to operate, without using backup server, service upgrade It is convenient.
With Thrift in order to be described in the embodiment of the present invention.Wherein, thrift is a software frame, can be used to into The exploitation of expansible and across language the service of row.It combines powerful software stack and code building engine, to build In C++, Java, Go, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Seamless combination, efficient service between Node.js, Smalltalk, and OCaml these programming languages.Thrift allows definition One simple data type and service interface defined in file, so that used as input file, compiler generates code and is used for side Just the seamless across programming language of RPC client and servers communication is generated.Based on Thrift configuration service hot restarts, specifically such as Under:
With reference to Fig. 2, the step of show a kind of method for restarting embodiment of service in accordance with another embodiment of the present invention Flow chart, specifically may include steps of:
Step 202, changes in advance bank code, so that process supports incoming socket.
Step 204, encapsulates the bank code of change, obtains the library file of correspondence support process hot restart.
In the present embodiment, the software frame of service is more than incoming socket and directly uses, i.e., generally only support to set up Use after socket, and can not be incoming using by the socket having built up.Therefore the present embodiment changes the storehouse of software frame Code so that the process of the software frame can support that incoming socket is directly used.Change is Resealed after change bank code Bank code more, obtains supporting the bank code that incoming socket is directly used such that it is able to realize passing through the incoming socket of process To support the library file of process hot restart.Wherein, the process includes service processes and service subprocess.
For example, thrift server do not support that an incoming socket is directly used, it is assumed that service has been come using C++ Into, then use the C++ storehouses of thrift.Because thrift server do not support that an incoming socket is directly used, because This can transform thrift bank codes makes it support that incoming socket is directly used.The bank code of transformation is packaged again, is obtained Hot restart library file can be supported to one.In the present embodiment, hot restart can keep the continual offer service of port energy, and Process can respond signal specific and then perform hot restart process.
Step 206, according to the library file of the support process hot restart service processes are created.
Step 208, according to interface requests the socket with target interface binding is created.
After change bank code Reseals library file, service processes are created based on the library file, service processes can be carried For interface service, therefore for the interface requests of target interface, service processes can create socket, by the socket and target Interface is bound.
Step 210, service processes are added to the socket of the binding in environmental variable according to instruction of restarting.
Step 212, creates and services subprocess with the service processes identical.
Step 214, to the incoming environmental variable of the service subprocess, with the socket of the incoming binding.
When needing to restart service, instruction of restarting is sent, service processes determine and target interface binding according to instruction of restarting Socket, the socket of the binding is added in environmental variable, environmental variable (environment variables) is i.e. The relevant parameter of system, process.And create according to instruction of restarting and service subprocess with the service processes identical, for example may be used Subprocess is serviced with one by fork function creations with the service processes identical.Then to the incoming institute of the service subprocess Environmental variable is stated, i.e., to the socket of the incoming binding of service subprocess, to provide the service for target interface.
Wherein, a process may include code, data and distribute to resource of process etc., and fork functions can be adjusted by system With create one with the substantially identical process of original process, so as to the executable identical operation of two processes, if certainly just Beginning parameter or incoming variable are different, and two processes also can perform different operations.Created by fork functions in the present embodiment Service subprocess is built, the binary system and the incoming environmental variable comprising socket of the service are loaded in service subprocess, so as to So that service subprocess is able to carry out being operated with service processes identical, the socket for being based on binding is provided for target interface Service.
Service processes for example for thrift, obtain the socket of current service, in being saved in environmental variable, then hold Row fork creates a service subprocess, and the binary system that execve loads service routine is performed in service subprocess, while passing Enter environmental variable so that service subprocess is able to carry out being operated with service processes identical, and the socket for being based on binding is provided For the service of target interface.
Step 216, judges the service processes with the presence or absence of request.
In the incoming environmental variable comprising socket of service subprocess, using the teaching of the invention it is possible to provide right after for the service of target interface Service is provided by subprocess is serviced in the new request of the target interface, and service processes are continued executing with the request for performing, directly Request to service processes is finished and could close the service processes, provides service by service subprocess completely.Therefore to sentence The service processes break with the presence or absence of request;If service processes have request, return to step 216 continues to judge;If service into There is no request, execution step 218 in journey.
Step 218, closes the service processes.
Judge that the service processes are not deposited upon request, close the service processes, that is, exit the service processes.
Step 220, at the target interface, judges whether the socket of the binding.
For interface requests, interface requests correspondence target interface is determined, the mesh is first judged whether at target interface Tag splice mouth bind to socket, provide service if there is the socket corresponding with service process is then used;Hold if not existing Row step 208 creates the socket with target interface binding.
Therefore for service subprocess passes through incoming environmental variable with incoming socket, then can judge at target interface With the presence or absence of the socket of the binding in the environmental variable of the service subprocess;If depositing in the environmental variable of service subprocess In the socket of the binding, then execution step 222;If there is no the socket with the target interface binding, execution step 208 create the socket with target interface binding.
Step 222, using the service subprocess socket of the binding is called.
If there is the socket of the binding in the environmental variable of service subprocess, institute is called using the service subprocess The socket of binding is stated, i.e., the service of target interface is provided by service subprocess using the socket of binding.
It can be seen that, the backed off after random service processes are not asked in service processes, provide the clothes of target interface by service subprocess Business, realizes for the hot restart of service.Therefore can judge whether have in environmental variable entrance (such as target interface) place is performed Socket, if then directly being serviced using this socket, so as to service subprocess upon execution, into entrance with regard to energy Using the incoming socket of parent process, the uninterrupted of service is realized.
It is achieved thereby that the hot restart of thrift services, it is ensured that service will not also interrupt service when updating, and simplify Deployment is serviced with O&M thrift.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as a series of combination of actions, but this area Technical staff should know that the embodiment of the present invention is not limited by described sequence of movement, because according to present invention enforcement Example, some steps can adopt other orders or while carry out.Secondly, those skilled in the art also should know, description Described in embodiment belong to preferred embodiment, necessary to the involved action not necessarily embodiment of the present invention.
On the basis of above-described embodiment, the present embodiment additionally provides a kind of rebooting device of service.
With reference to Fig. 3, a kind of structural frames of the rebooting device embodiment of service according to an embodiment of the invention are shown Figure, specifically can include such as lower module:
Acquisition module 302, for service processes according to instruction of restarting, obtains the socket with target interface binding socket。
Afferent module 304, subprocess is serviced for creating with the service processes identical, and the service subprocess is passed Enter the socket of the binding.
Closedown module 306, for judging that the service processes are not deposited upon request, closes the service processes.
Service module 308, for for the data of the target interface, using the service subprocess binding being called Socket.
To sum up, service processes obtain the socket with target interface binding according to instruction of restarting, then create and the clothes Business process identical services subprocess, the socket to the incoming binding of the service subprocess, is connect by servicing subprocess There is provided service to target interface for service processes, judging that the service processes do not deposit upon request, closing is described service into Journey, calls the socket of the binding to provide the service for target interface, so as to realize to service using service subprocess Hot restart, can the service of restarting in the case of continual service, it is simple to operate, without using backup server, service upgrade It is convenient.
With reference to Fig. 4, a kind of structure of the rebooting device embodiment of service in accordance with another embodiment of the present invention is shown Block diagram, specifically can include such as lower module:
Module 310 is changed in storehouse, for change bank code in advance, so that process supports incoming socket, wherein, the process Including service processes and service subprocess;The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
Creation module 312, for creating service processes according to the library file of the support process hot restart;Please according to interface Seek the socket created with target interface binding.
Acquisition module 302, for service processes according to instruction of restarting, obtains the socket with target interface binding socket。
Variable add module 314, for the socket of the binding to be added in environmental variable.
Afferent module 304, subprocess is serviced for creating with the service processes identical;Pass to the service subprocess Enter the environmental variable, with the socket of the incoming binding.
Closedown module 306, for judging that the service processes are not deposited upon request, closes the service processes.
Service module 308, for for the data of the target interface, using the service subprocess binding being called Socket.
Wherein, the service module, in the environmental variable at the target interface, judging the service subprocess With the presence or absence of the socket of the binding;If there is the socket of the binding, described tying up is called using the service subprocess Fixed socket.
It can be seen that, the backed off after random service processes are not asked in service processes, provide the clothes of target interface by service subprocess Business, realizes for the hot restart of service.Therefore can judge whether have in environmental variable entrance (such as target interface) place is performed Socket, if then directly being serviced using this socket, so as to service subprocess upon execution, into entrance with regard to energy Using the incoming socket of parent process, the uninterrupted of service is realized.
It is achieved thereby that the hot restart of thrift services, it is ensured that service will not also interrupt service when updating, and simplify Deployment is serviced with O&M thrift.
For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, it is related Part is illustrated referring to the part of embodiment of the method.
Provided herein algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment. Various general-purpose systems can also be used together based on teaching in this.As described above, construct required by this kind of system Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this Bright preferred forms.
In description mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The more features of feature that the application claims ratio of shield is expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint One of meaning can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation Software module realize, or with combinations thereof realization.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) set come the method for restarting and device for realizing service according to embodiments of the present invention The some or all functions of some or all parts in standby.The present invention is also implemented as described here for performing Method some or all equipment or program of device (for example, computer program and computer program).This The program of the realization present invention of sample can be stored on a computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from internet website and obtained, or be provided on carrier signal, or with any other Form is provided.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims, Any reference markss between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.
The invention discloses A1, a kind of method for restarting of service, including:
Service processes obtain the socket with target interface binding according to instruction of restarting;
Create and service subprocess with the service processes identical, to the incoming binding of the service subprocess socket;
Judge that the service processes are not deposited upon request, close the service processes;
For the data of the target interface, the socket of the binding is called using the service subprocess.
A2, the method as described in A1, wherein, also include:
Bank code is changed in advance, so that process supports incoming socket, wherein, the process includes service processes and service Subprocess;
The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
A3, the method as described in A2, wherein, also include:
Service processes are created according to the library file of the support process hot restart.
A4, the method as described in A1, wherein, after obtaining the socket with target interface binding, also include:
The socket of the binding is added in environmental variable.
A5, the method as described in A4, wherein, the socket to the incoming binding of the service subprocess, including:
To the incoming environmental variable of the service subprocess, with the socket of the incoming binding.
A6, the method as described in A5, wherein, for the data of the target interface, called using the service subprocess The socket of the binding, including:
At the target interface, judge in the environmental variable of the service subprocess with the presence or absence of the binding socket;
If there is the socket of the binding, the socket of the binding is called using the service subprocess.
A7, the method as described in A1, wherein, also include:
The socket with target interface binding is created according to interface requests.
The embodiment of the present invention additionally provides B8, a kind of rebooting device of service, including:
Acquisition module, for service processes according to instruction of restarting, obtains the socket with target interface binding;
Afferent module, subprocess is serviced for creating with the service processes identical, incoming to the service subprocess The socket of the binding;
Closedown module, for judging that the service processes are not deposited upon request, closes the service processes;
Service module, for for the data of the target interface, using the service subprocess binding being called socket。
B9, the device as described in B8, wherein, also include:
Module is changed in storehouse, for change bank code in advance, so that process supports incoming socket, wherein, the process bag Include service processes and service subprocess;The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
B10, the device as described in B9, wherein, also include:
Creation module, for creating service processes according to the library file of the support process hot restart.
B11, the device as described in B8, wherein, also include:
Variable add module, for the socket of the binding to be added in environmental variable.
B12, the device as described in B11, wherein,
The afferent module, for the incoming environmental variable of the service subprocess, with the incoming binding socket。
B13, the device as described in B12, wherein,
The service module, in the environmental variable at the target interface, judging the service subprocess whether There is the socket of the binding;If there is the socket of the binding, the binding is called using the service subprocess socket。
B14, the device as described in B8, wherein, also include:
Creation module, for creating the socket with target interface binding according to interface requests.

Claims (10)

1. a kind of method for restarting of service, including:
Service processes obtain the socket with target interface binding according to instruction of restarting;
Create and service subprocess with the service processes identical, the socket to the incoming binding of the service subprocess;
Judge that the service processes are not deposited upon request, close the service processes;
For the data of the target interface, the socket of the binding is called using the service subprocess.
2. the method for claim 1, wherein also include:
Bank code is changed in advance, so that process supports incoming socket, wherein, the process includes that service processes and service enter Journey;
The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
3. method as claimed in claim 2, wherein, also include:
Service processes are created according to the library file of the support process hot restart.
4. after the method for claim 1, wherein obtaining the socket with target interface binding, also include:
The socket of the binding is added in environmental variable.
5. method as claimed in claim 4, wherein, the socket to the incoming binding of the service subprocess, including:
To the incoming environmental variable of the service subprocess, with the socket of the incoming binding.
6. method as claimed in claim 5, wherein, for the data of the target interface, adjusted using the service subprocess With the socket of the binding, including:
At the target interface, judge in the environmental variable of the service subprocess with the presence or absence of the socket of the binding;
If there is the socket of the binding, the socket of the binding is called using the service subprocess.
7. the method for claim 1, wherein also include:
The socket with target interface binding is created according to interface requests.
8. a kind of rebooting device of service, including:
Acquisition module, for service processes according to instruction of restarting, obtains the socket with target interface binding;
Afferent module, subprocess is serviced for creating with the service processes identical, incoming described to the service subprocess The socket of binding;
Closedown module, for judging that the service processes are not deposited upon request, closes the service processes;
Service module, for for the data of the target interface, using the service subprocess binding being called socket。
9. device as claimed in claim 8, wherein, also include:
Module is changed in storehouse, for change bank code in advance, so that process supports incoming socket, wherein, the process includes clothes Business process and service subprocess;The bank code of encapsulation change, obtains the library file of correspondence support process hot restart.
10. device as claimed in claim 9, wherein, also include:
Creation module, for creating service processes according to the library file of the support process hot restart.
CN201611236720.3A 2016-12-28 2016-12-28 Service restarting method and device Pending CN106648870A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611236720.3A CN106648870A (en) 2016-12-28 2016-12-28 Service restarting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611236720.3A CN106648870A (en) 2016-12-28 2016-12-28 Service restarting method and device

Publications (1)

Publication Number Publication Date
CN106648870A true CN106648870A (en) 2017-05-10

Family

ID=58833257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611236720.3A Pending CN106648870A (en) 2016-12-28 2016-12-28 Service restarting method and device

Country Status (1)

Country Link
CN (1) CN106648870A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257235A (en) * 2018-11-12 2019-01-22 深信服科技股份有限公司 Network Abnormal restoration methods, device, equipment and computer readable storage medium
CN109947576A (en) * 2017-12-21 2019-06-28 上海盛霄云计算技术有限公司 A kind of method of virtual machine internal broker program management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7827152B1 (en) * 2005-10-26 2010-11-02 Oracle America, Inc. Asynchronous on-demand service startup
CN103746977A (en) * 2013-12-27 2014-04-23 东软熙康健康科技有限公司 Connection method and device for Linux server
CN105930191A (en) * 2016-04-28 2016-09-07 网宿科技股份有限公司 System service reloading method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7827152B1 (en) * 2005-10-26 2010-11-02 Oracle America, Inc. Asynchronous on-demand service startup
CN103746977A (en) * 2013-12-27 2014-04-23 东软熙康健康科技有限公司 Connection method and device for Linux server
CN105930191A (en) * 2016-04-28 2016-09-07 网宿科技股份有限公司 System service reloading method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947576A (en) * 2017-12-21 2019-06-28 上海盛霄云计算技术有限公司 A kind of method of virtual machine internal broker program management
CN109947576B (en) * 2017-12-21 2022-12-06 上海盛霄云计算技术有限公司 Method for managing internal agent program of virtual machine
CN109257235A (en) * 2018-11-12 2019-01-22 深信服科技股份有限公司 Network Abnormal restoration methods, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108432208B (en) Service arranging method, device and server
CN104731625B (en) A kind of method, apparatus and mobile terminal loading plug-in unit
KR20210005035A (en) Renewable smart contract
CN102981915B (en) A kind of inter-application communication method and device
US8806475B2 (en) Techniques for conditional deployment of application artifacts
CN111506322B (en) Automatic integrated construction development deployment platform and method
CN105404524A (en) Class loading and isolating method and apparatus in Java application
CN109753300B (en) Algorithm upgrading method, calculation task sending method and related device
CN105740027B (en) Application program update method and apparatus
CN109672553A (en) Gateway Dynamic Configuration, system, computer equipment and storage medium
CN104899068A (en) Method and device for multi-process start by container
CN104915239A (en) Method and device for carrying out multi-process startup by container
US11290495B2 (en) Solution management systems and methods for addressing cybersecurity vulnerabilities
CN107526584B (en) Data access method and device
CN110109684B (en) Block chain link point management proxy service installation method, electronic device and storage medium
CN106648870A (en) Service restarting method and device
CN102981942B (en) A kind of task processing method and system
CN117112122A (en) Cluster deployment method and device
CN102968336B (en) Method and system for processing tasks
CN102843342A (en) Method and system for dynamically upgrading resource
US11010154B2 (en) System and method for implementing complex patching micro service automation
CN109933355A (en) Application program updating method and device
US20200401394A1 (en) Updating features in an automation device
CN102902564A (en) Method and device for installing patches
CN109144575A (en) Device, method, electronic equipment and the memory of cross operating system operation application

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

Application publication date: 20170510

RJ01 Rejection of invention patent application after publication