Invention content
As it can be seen that having problems in that in background technology, system can not cope with diversified process, and can not be should
The suitable resource of a little diversified course allocations.And the resource in system is not flexibility and changeability, when the new application journey of addition
When sequence, it is possible to cause problem, to cannot be satisfied the demand of configuration.On the other hand, the operator of system can not understand whole
The behaviour in service of a resource can not also understand various states of a process in real time, and it is even more impossible to be carried out correspondingly when breaking down
Emergency operation, such as restart process.
Therefore, in the presence of background technology the problem of, according to the first aspect of the invention, it is proposed that one kind is for managing
The method of reason process, wherein the method includes:A. the process sends registration request to local manager, wherein it is described into
Journey is configured with thread, and the thread manages the process for assisting;B. the local manager receives the registration request, and
It is the course allocation resource according to configuration file;And local manager described in c. by the thread with the process into
Row communicates to monitor the state of a process.
Through the invention, only it is according to configuration file just when local manager receives the registration request from process
The course allocation resource.And the resource distributed is depending on configuration file.Therefore, it is possible in an orderly manner and be efficiently
Course allocation resource, local manager can clearly know which process occupies which resource.
In addition, according to the present invention, process is provided with corresponding thread, the communication being used between local manager is handed over
Mutually.By the specific thread, local manager can be with the state of monitoring process.Local manager can be for example arranged at one
On computer, and one or more local managers can be for example provided on a computer.The local manager can manage
Reason for example runs various processes on computers, such as various application programs.
In one embodiment of the invention, the step c further comprises:C1. the local manager is periodically to institute
The thread for stating process sends first message;And c2. is in response to the first message, the thread of the process is to institute
It states local manager and feeds back the state of a process.
By the preferred embodiment, local manager regular (such as per every few seconds) can send a message to process
Thread.And thread also will be responsive to the message and carry out state to local manager feedback process.Local manager can be with as a result,
Simply monitor its various process managed.
In one embodiment of the invention, the method further includes step d and e:D. when needing to stop the process,
The local manager is sent to the thread of the process stops message;And e. is according to the stopping message, the line
Journey stops the process.
By the preferred embodiment, local manager can efficiently control the startup and stopping of process.
In one embodiment of the invention, the method further includes that step f: f. stops when the process breaks down
When, the thread of the process will feed back Trouble Report from local manager described in trend.
By the preferred embodiment, local manager can learn the failure that process occurs and take corresponding in time
Subsequent step.
In one embodiment of the invention, the local manager is by the state of a process and/or the failure report
Announcement is sent to domain manager.
By the preferred embodiment, each local manager can be by relevant information, such as state of a process, process
Failure summarize to domain manager.Domain manager can know all processes administered by each local manager as a result,
Relevant information.Domain manager can be managed for example on each computer in multiple local managers, such as one computer room of management
The various application programs that are run and distribute to its resource.
In one embodiment of the invention, the step d further comprises:D1. when needing to stop the process, domain
Manager sends the stopping message to the local manager;And local manager described in d2. is to described in the process
Thread forwards the stopping message.
By the preferred embodiment, domain manager can be accurate and efficiently controls each local manager and administered
Process startup and stopping.
In one embodiment of the invention, the thread is additionally operable to be managed the resource for distributing to the process.
By the preferred embodiment, thread in process can also be to being distributed to the resource of the process by local manager
It is managed and records, to optimize operational efficiency.
In one embodiment of the invention, the configuration file is revisable, and include the resource with it is described
The relations of distribution of process.
By the preferred embodiment, configuration file is revisable, you can with by simply change configuration file come
Modification and/or increase resource, which thereby enhance the flexibility of system, are coped with convenient for system and manage various processes.For example, working as
When new application program is added, resource can be increased by changing configuration file, to meet current resource distribution demand.
And when needing to change the relations of distribution of resource and process, it can also be realized by simply changing the configuration file.This is matched
It sets file and for example records the relations of distribution for having resource and process, consequently facilitating the reading of corresponding local manager.
In one embodiment of the invention, the configuration file is stored in advance in the local manager.
According to the second aspect of the invention, it is proposed that a kind of system for managing process.The system comprises:At least one
A local manager, for being managed to process, wherein the process is configured with thread, the thread is for assisting management institute
State process;Domain manager is coupled at least one local manager, for managing the multiple local manager and institute
State process;Wherein, the local manager is configured as receiving the registration request from the process, and is according to configuration file
The course allocation resource, and communicated by the thread with the process to monitor the state of a process.
According to one embodiment of present invention, the local manager is further configured as periodically to the process
The thread sends first message, and the thread of the process is configured to respond to the first message to described
Ground manager feeds back the state of a process.
According to one embodiment of present invention, the local manager be further configured for when need to stop it is described into
The thread of process described in Cheng Shixiang, which is sent, stops message, and the thread is further configured as according to the stopping message
To stop the process.
According to one embodiment of present invention, the thread of the process is configured as stopping when process failure
Trouble Report will be fed back when only from local manager described in trend.
According to one embodiment of present invention, the local manager is by the state of a process and/or the failure report
Announcement is sent to the domain manager.
According to one embodiment of present invention, the domain manager is configured as when needing to stop the process to described
Local manager sends the stopping message, and the local manager is further configured as to described in the process
Thread forwards the stopping message, and the thread be further configured for described in being stopped according to the stoppings message into
Journey.
According to one embodiment of present invention, the thread is additionally operable to the management of the resource to distributing to the process.
According to one embodiment of present invention, the configuration file is revisable, and include the resource with it is described
The relations of distribution of process.
According to one embodiment of present invention, it is previously stored with the configuration file in the local manager.
According to one embodiment of present invention, the system also includes controllers, couple, are used for the domain manager
It shows information associated with the process and manages the process via the domain manager and the local manager.
According to one embodiment of present invention, the information associated with the process include it is following at least one
:State of a process;The state of resource;And the relations of distribution of process and resource.
The controller for example operates in backstage.The controller is by operator's operation come via domain manager and each local pipe
Device is managed to control the startup and stopping of specific process.And operator can also be checked each by the interface on controller
State of a process, resource allocation information and the occupied corresponding resource of process.Certainly when process is out of order, operator
It can promptly learn.
Additionally, on this controller, operator can also implement campaign management functions, maintenance management function, control
Function, diagnostic function, real-time monitoring and control and security-related function, configuration feature etc..
It can be seen that by using currently preferred technical solution, can effectively and in an orderly manner manage it is each into
Journey, and can resource used in process be accessed, manages, monitors and be issued.In addition it is also possible to which monitoring is each in real time
A state of a process, and by those feedback of status to the operator at controller.And when a failure occurs, operator can also and
When take measures, or can also automatically be restored.Such as when some process breaks down, it can be allowed voluntarily to taste
Examination restarting.Additionally, can also be met to resource modifying and/or increased need using currently preferred technical solution
It asks.
Finally, by using currently preferred technical solution, additionally it is possible to shield bottom access, thus be better achieved
Management to resource.
Therefore, present invention efficiently solves in the presence of background technology the problem of.
Feature that is generalized above rather than broadly giving the content of present invention.The supplementary features of the content of present invention will be
Described herein after, which form the themes of the claims in the present invention.It will be appreciated by those skilled in the art that institute can easily be used
Disclosed design and specific implementation mode, as the basis for changing or designing other structures or process, to execute and this hair
Bright identical purpose.It should also be appreciated by one skilled in the art that these equivalent structures are not detached from the appended claims and remember
The spirit and scope of the invention of load.
Specific implementation mode
Some examples show and are described in detail below in above-mentioned figure.These figures are not necessarily to scale, and
And it may be overstated in ratio or in signal for clear and/or succinct purpose, certain features of figure and certain views
The earth is shown.It should be appreciated that although following description provides many of the different features for realizing various embodiments not
Same embodiment or example, but can be achieved on other embodiments and/or the variation of structure can be carried out without departing from this public affairs
The range opened.In addition, although the specific example of component and arrangement is described below, these are only example certainly without answering
This is understood to be to limit.In addition, reference numeral and/or letter is repeated in the disclosure in each example.The repetition be only for
For the sake of clear, and not relationship of the regulation between each embodiment and/or exemplary configuration discussed itself.
As shown in Figure 1, Fig. 1 shows the block diagram of system 100 according to an embodiment of the invention.
In the present embodiment, system 100 include three local managers (Local Manager) 101,102 and 103,
One domain manager (Domain Manager) 107 and a controller (System Administration Console)
108.Local manager 101,102 and 103 is coupled respectively to domain manager 107, and domain manager 107 transfers to be coupled to controller
108.Although here it is shown that three local managers, a domain manager and a controller, the technology of this field
Personnel should be appreciated that those quantity are intended merely to illustratively to illustrate and selected, are non-limiting.In other of the present invention
In embodiment, the number of arbitrary setting local manager, domain manager and controller can be carried out according to actual needs.
Preferably, TCP connection, domain manager 107 and each local management are taken between each process and local manager
TCP connection is also taken between device 101,102 and 103.
Therefore, system 100 has multiple management structure, is conducive to implement campaign management functions, dimension to process and/or resource
Protect management function, control function, diagnostic function, real-time monitoring and control and security-related function, configuration feature etc..
As shown, local manager 101,102 and 103 is for managing relevant process.Local manager 101,102 and
Each in 103 can be installed for example on one computer, and for example manage the application program run on that computer,
That is process.In addition, for brevity, for each local manager, illustrating only three its required processes managed.
That is, for local manager 101, it to be used for managing process 10,20 and 30.For local manager 102, it to be used for managing process
40,50 and 60.For local manager 103, it to be used for managing process 70,80 and 90.Certainly, those skilled in the art should
Understand, the quantity of above-mentioned process is merely exemplary, and not restrictive.
And domain manager 107 for manage local manager 101,102 and 103 and all relevant processes 10,20,30,
40,50,60,70,80 and 90.Domain manager 107 can obtain the state of local manager 101,102,103 and all relevant
State of a process.And when local manager 101,102,103 breaks down or when some process failures, domain management
Device 107 can be learned.For example, domain manager 107 and local manager 101,102 and 103, local manager 101,102 and
Between 103 and each process 10,20,30,40,50,60,70,80 and 90 can there are one heartbeat maintenance.
In addition, controller 108 is for relevant to manage with local manager 101,102 and 103 via domain manager 107
Process.And information associated with process, such as state of a process, the state of resource, the relations of distribution of process and resource all can
In real time controller 108 is reflected into via domain manager 107 and local manager 101,102 and 103.Controller 108 as a result,
The operator at place can monitor relevant process in real time.And the operator at controller 108 needs to implement to implement process
When some operation, the process can also be managed with local manager 101,102 and 103 via domain manager 107
(being discussed further below).
On the other hand, to each process, it is both provided with the thread (Process Admin) for assisting the management process.
Referring to Fig. 1, process 10 is provided with thread 1, process 20 is provided with thread 2, process 30 is provided with thread 3, is process 40
Be provided with thread 4, process 50 be provided with thread 5, process 60 is provided with thread 6, process 70 is provided with thread 7, for into
Journey 80 is provided with thread 8, and process 90 is provided with thread 9.
Preferably, which is additionally operable to be managed the resource for distributing to process.Specifically, for example, thread 1 for pair
The resource that process 10 is distributed to by local manager 101 is managed.
In addition, each local manager is coupled with a resource.For example, local manager 101 is coupled with resource 104, this
Ground manager 102 is coupled with resource 105, local manager 103 is coupled with resource 106.In these resources 104,105 and 106
Any or all can be database, and can be located on shared memory, even if to which event occurs for local manager
Barrier will not to resource generate shadow to.
The memory may include hard disk drive, optical drive, fc tape storage device FC of any desired type etc.,
It may include solid-state memory (for example, flash memory, RAM memory etc.), magnetic memory (for example, hard disk) or be suitable for large capacity
Any other memory of storage.
Although here it is shown that each local manager is coupled with a resource, in the other embodiment of the present invention
In, local manager 101,102 and 103 can also be both coupled in a resource, i.e. a shared memory.
It is also stored with configuration file in local manager 101,102 and 103.These configuration files include resource with into
The relations of distribution of journey.Such as local manager 101, corresponding configuration file indicates process 10,20 and 30 and resource 104
In resource correspondence.For local manager 102, corresponding configuration file indicates process 40,50 and 60 and resource
The correspondence of resource in 105.For local manager 103, corresponding configuration file indicates process 70,80 and 90 and money
The correspondence of resource in source 106.
Preferably, these configuration files are also revisable, you can with by simply change configuration file change and/
Or increase resource, the flexibility of system is which thereby enhanced, is coped with convenient for system and manages various processes.For example, new when being added
Application program (i.e. new process) when, resource can be increased by changing configuration file, to which the resource for meeting current is matched
Set demand.And when needing to change the relations of distribution of resource and process, it can also be by simply changing the configuration file come real
It is existing.
During system 100 is run, start domain manager 107 first.Then start local manager 101,102 and
103。
Preferably, when local manager 101,102 and 103 starts, it is each it will to be sent to domain manager 107 respectively
From state, can clearly learn each local manager that it is administered 101,102 and 103 to domain manager 107
State, and timely reacted if made when any of local manager 101,102 and 103 breaks down,
Such as by sending the message to inform the operator at controller 108 to controller 108.
Then, each process initiation.It is described herein only for process 10.And for process 20, process 30, process
40, process 50, process 60, process 70, process 80 and process 90, will all undergo similar operation, are just no longer described in detail herein.
When process 10 starts, registration request is sent to local manager 101.Preferably, local manager 101 is again this
Registration request is sent to domain manager 107, to complete registration process.
Then, local manager 101 is that the process 10 distributes resource according to the configuration file of its storage.For example, local pipe
Device 101 is managed after the registration request of the process that receives 10, reads stored configuration file, therefrom consults process 10 and resource
The correspondence of resource in 104, and by corresponding resource allocation to process 10.On the other hand, it is preferable that opened in process 10
After dynamic and in registration process, a thread 1 will be started, for assisting to manage the process 10.
Then, local manager 101 is communicated by the thread 1 with process 10 come the state of monitoring process 10.
Preferably, local manager 101 periodically sends message to the thread 1 of process 10.And in response to the message, process 10
State from thread 1 to 101 feedback process 10 of local manager.
Preferably, after the state of the process that obtains 10, local manager 101 can be by the state and/or corresponding
The distribution condition of resource is sent to domain manager 107.And domain manager 107 then can also be by the state and/or phase of process 10
The distribution condition for the resource answered is sent to controller 108, can clearly be learned on the interface of controller 108 with this operator
The distribution condition of each state of a process and resource.
Fig. 2 shows method and step figures according to an embodiment of the invention.
As shown in Fig. 2, in step s 201, process sends registration request to local manager.
In step S202, local manager receives registration request, and is course allocation resource according to configuration file.
Specifically, which can be sent to domain manager by local manager, to complete registration process.It
Afterwards, local manager is the course allocation resource according to the configuration file of its storage.For example, local manager can receive
Stored configuration file is read after the registration request of process, therefrom consults the correspondence of process and resource, and will be opposite
The resource allocation answered is to process.
In step S203, local manager is communicated the state come monitoring process by the thread with process.
Specifically, local manager regular (such as per every few seconds) can send thread of the message to process.And line
Journey also will be responsive to the message and carry out state to local manager feedback process.Local manager can be monitored simply as a result,
Its various process managed.
Step S204 is an optional step, such as operator at controller or domain manager or local manager need
When stopping some process, the thread stopped to needs is sent and stops message.
Then, in step S205, according to message is stopped, thread stops process.
By step S204 and S205, operator or domain manager or local manager at controller can be easily
The startup and stopping of control process.In particular, for the operator at controller, the case where each process can be summarized
With state, and the startup and stopping of each process are easily controlled.
Step S206 is an optional step, and when process, which breaks down, to be stopped, the thread of process will locally be managed from trend
It manages device and feeds back Trouble Report.
Specifically, after process failure, the thread of process will feed back Trouble Report from trend local manager, from
And local manager can promptly know the situation, and take correspondingly subsequent operation.For example, local manager can be again
Start the process, or Trouble Report can also be sent to domain manager, and sends the Trouble Report to controller in turn.
The operator at controller can also know the fault condition of process in time as a result, and it takes suitable subsequent operation.
Above-mentioned example method and/or device it is at least some soft by the one or more run on a computer processor
Part and/or firmware program are realized.However, including but not limited to application-specific integrated circuit, programmable logic array and other hardware are set
Standby specialized hardware realization can be also configured to wholly or partly realize illustrative methods described here and/or dress
Some or all set.In addition, including but not limited to distributed treatment or component/object distributed treatment, parallel processing or void
The software realization of the replacement of quasi- machine processing can also be configured to realize illustrative methods and/or system described here.
It shall yet further be noted that example software described here and/or firmware realization are stored on tangible media, example
Such as:Magnetic medium (for example, disk or tape);Magneto-optic or optical medium such as CD;Or solid state medium, such as storage card or appearance
Receive one or more read-only (non-volatile) memories, random access memory or other rewritable (volatibility) memories
Other encapsulation.Therefore, example software described here and/or firmware can be stored in tangible media for example above or after
After on the storage medium of the medium of description.Quote specific standard and agreement in description above describe example components and
In the degree of function, it should be appreciated that the range of this patent is not limited to such standard and agreement.For example, for internet and other
Packet switched network transmission (for example, transmission control protocol (TCP)/Internet protocol (IP), User Datagram Protocol (UDP)/
IP, hypertext markup language (HTML), hypertext transfer protocol (HTTP)) each standard represent the example of this field current state
Son.Such Normal periodic by general utility functions having the same, faster with more effective equivalents substitution.Therefore,
Replacement standard and agreement with the same function are contemplated by this patent and are intended to be included in the model of appended claims
Enclose interior equivalents.
Although in addition, this patent discloses illustrative methods and device including software executed on the hardware or firmware,
It should be noted that such system is merely illustrative, and it is not considered as restrictive.For example, it is envisioned that these hardware and soft
Any one of part component all can be uniquely with hardware, uniquely with software, uniquely with firmware or with hardware, solid
Certain of part and/or software embodied in combination.Therefore, although description above describe illustrative methods, system and machine can
Medium is accessed, these examples are not the sole modes for realizing such system, method and machine accessible medium.Therefore, although
Certain illustrative methods, system and machine accessible medium is described herein, the coverage area of this patent is without being limited thereto.Phase
Instead, this patent is covered literal upper or being substantially within the purview of the appended claims under the introduction of equivalents all
Method, system and machine accessible medium.
Those of ordinary skill in the art should also understand that, the various illustrative logics described in conjunction with embodiments herein
Electronic hardware, computer software or combination may be implemented into block, module, circuit and algorithm steps.In order to understand earth's surface
Show this interchangeability between hardware and software, various illustrative components, block, module, circuit and step are enclosed above
General description has been carried out around its function.It is implemented as hardware as this function and is also implemented as software, depends on specific
Using and apply design constraint over the whole system.Those skilled in the art can be directed to each specific application, to become
Logical mode realizes described function, and still, this realization decision should not be interpreted as causing a departure from the scope of this disclosure.
The above description of the disclosure is for enabling any those of ordinary skill of this field to realize or use the present invention.It is right
For those of ordinary skill in the art, the various modifications of the disclosure will be apparent from, and generality defined herein
Principle can also be applied to other deformations in the case of without deviating from the spirit and scope of the disclosed invention.Therefore, the present invention is simultaneously
It is not limited to example as described herein and design, but it is consistent with the widest scope of principle disclosed herein and novel features.