CN101464810A - Service program processing method and server - Google Patents
Service program processing method and server Download PDFInfo
- Publication number
- CN101464810A CN101464810A CNA2008101877265A CN200810187726A CN101464810A CN 101464810 A CN101464810 A CN 101464810A CN A2008101877265 A CNA2008101877265 A CN A2008101877265A CN 200810187726 A CN200810187726 A CN 200810187726A CN 101464810 A CN101464810 A CN 101464810A
- Authority
- CN
- China
- Prior art keywords
- task
- service
- service routine
- thread
- server
- 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
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a method for processing service program and a server. The method for processing service program comprises the following steps; obtaining all input service components; configuring all the service components into service programs according to directive commands; setting tasks for the service programs; and invoking the tasks and triggering corresponding thread in a thread pool to execute the tasks when the trigger conditions of the tasks are met. The server comprises a service configuration module used for obtaining all input service components and configuring all service components into service programs according to directive commands; a task configuration module used for setting tasks for the service programs; a task invocation module used for invoking the tasks and triggering corresponding thread in the thread pool to execute the tasks when the trigger conditions of the tasks are met; and a task execution module used for executing the tasks as the task invocation module triggers the thread. The technical scheme of the invention can coordinate the treatment of the service program and effectively utilize server resources.
Description
Technical field
The present invention relates to field of computer technology, be specifically related to a kind of service program processing method and server.
Background technology
Computer technology constantly develops at present, utilizes computing machine to provide the performance of the application system of service also improving constantly.The server of application system need be carried out some service routines on the backstage usually, for example garbage-cleaning reclaims, data transmission gathers, Enterprise Resources Plan (ERP, Enterprise Resource Planning) manufacturing resources planning (MRP in the system, Manufacturing Resource Planning), timing computing of MPS (MPS, Master Production Schedule) etc.
In the prior art, various service routines generally by the user separately separately to server registration, create a process by server according to the service routine of registration and carry out this service routine.That is to say, when the user needs server to provide certain backstage to serve, generally be directly to register a system service service routine promptly is set to the operating system of server, when the needs server provides another kind of service, register a service routine again again, and server is created the execution that a process is responsible for this service routine specially for each service routine of user's registration by the operating system of server when starting.Like this, the service routine of each registration all is present in the operating system of server with independent process, and is in active state always.
In research and practice process to prior art, the inventor finds that there is following problem in prior art:
The work that need do a lot of repetitions when the user develops each service routine in the prior art is with the requirement of the operating system that satisfies server, and these service routines of registering separately of server process also lack coordination, also be not easy management, can not effectively utilize server resource, might cause having a lot of processes in the operating system, make that server resource consumption is bigger.
Summary of the invention
The technical matters that the embodiment of the invention will solve provides a kind of service program processing method and server, processing that can the coordination service program and more effectively utilize server resource.
For solving the problems of the technologies described above, embodiment provided by the present invention is achieved through the following technical solutions:
The embodiment of the invention provides a kind of service program processing method, comprising:
Obtain each serviced component of input;
According to directive command each serviced component is configured to service routine;
For described service routine is provided with task;
When the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool.
Preferably, describedly according to directive command each serviced component is configured to service routine and is specially:
Directive command according to input is configured to comprise the service routine of sub-services program with each serviced component, for described sub-services program is provided with ordinal relation.
Preferably, describedly task be set be specially for described service routine:
Be arranged on the task of described service routine of operation under the trigger condition of setting or the described service routine of periodic duty.
Preferably, the trigger condition of described setting is the temporal information that task is carried out, and the temporal information that described task is carried out is behind outside output time configuration interface, and the information of obtaining according to described time configuration interface input obtains;
When described trigger condition in described task arrives, dispatch described task and be specially:
When the time that task is carried out arrives, setting and being carried in the task queue of the task of correspondence is called in thread pool.
Preferably, the described precedence information that also comprises the task of setting when task is set;
Further dispatch in the described task of scheduling and when triggering the described task of corresponding thread execution in the thread pool according to the precedence information of described task.
Preferably, described service routine and described task adopt expressly or the extend markup language format description of encrypting.
Preferably, described thread pool is set up I/O by the parameter of setting and is finished port and create initial thread and realize.
The embodiment of the invention provides a kind of server, comprising:
The service configuration module is used to obtain each serviced component of input, according to directive command each serviced component is configured to service routine;
The task configuration module is used to described service routine that task is set;
Task scheduling modules is used for when the trigger condition of described task arrives, and dispatches described task and triggers the described task of corresponding thread execution in the thread pool;
Task execution module is used for carrying out described task after described task scheduling modules triggers thread.
Preferably, server also comprises:
The task load-on module is used for the task that described task configuration module sets is loaded into task queue;
When described task scheduling modules arrived in the time that task is carried out, the task in task queue of correspondence is called in thread pool.
Preferably, server also comprises:
Initialization module is used for setting up thread pool before described task load-on module loading tasks, and described thread pool is set up I/O by the parameter of setting and finished port and create the initial thread realization.
Preferably, described task configuration module comprises:
First module is used to be arranged on the task of described service routine of operation under the trigger condition of setting or the described service routine of periodic duty;
Second module is used to the precedence information of the task that is provided with.
Preferably, described service configuration module comprises:
Acquisition module is used to obtain each serviced component of input;
Processing module is used for according to the directive command of input each serviced component being configured to comprise the service routine of sub-services program, for described sub-services program is provided with ordinal relation.
Technique scheme as can be seen, embodiment of the invention technical scheme is that each serviced component is configured to service routine, and task is set for service routine, so the user for example the developer just do not need to be concerned about again the specific implementation details of service routine, only need to design the serviced component that comprises business logic codes, thereby the design effort amount can reduce.Embodiment of the invention technical scheme is after being provided with task for service routine, when the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool, therefore can coordinate the processing of each service routine by scheduling mechanism, effectively utilize the resource of server, realize better management.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the embodiment of the invention one a service program processing method process flow diagram;
Fig. 2 is the embodiment of the invention two service program processing method process flow diagrams;
Fig. 3 is an embodiment of the invention server architecture synoptic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The embodiment of the invention provides a kind of service program processing method, processing that can the coordination service program and more effectively utilize server resource.
Seeing also Fig. 1, is the embodiment of the invention one service program processing method process flow diagram.As shown in Figure 1, comprise step:
Obtain each serviced component of user's input in this step.The serviced component that the embodiment of the invention is mentioned can be general executable file, also can be The Component Object Model (COM, Componet ObjectModel) assembly, and com component need be provided with specific interface, so that call on the backstage.
This step is that the directive command according to input is configured to comprise the service routine of sub-services program with each serviced component, for described sub-services program is provided with ordinal relation.
This step is arranged on the task of described service routine of operation under the trigger condition of setting or the described service routine of periodic duty.
The trigger condition of task can be the task executions time, also can be that other guide for example is certain incident or procedure triggers.
When the trigger condition of some tasks when for example the execution time arrives, take out and satisfy the task of current execution time and enter thread pool, send the described task of message trigger thread execution of finishing that has mission bit stream by finish port to I/O (I/O).
This embodiment as can be seen, embodiment of the invention technical scheme is that each serviced component is configured to service routine, and task is set for service routine, so the user for example the developer just do not need to be concerned about again the specific implementation details of service routine, only need to design the serviced component that comprises business logic codes, thereby the design effort amount can reduce.Embodiment of the invention technical scheme is after being provided with task for service routine, when the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool, therefore can coordinate the processing of each service routine by scheduling mechanism, effectively utilize the resource of server.
Seeing also Fig. 2, is the embodiment of the invention two service program processing method process flow diagrams.
Compare with Fig. 1 embodiment one, Fig. 2 has introduced embodiment of the invention service program processing method in more detail.As shown in Figure 2, comprise step:
Server obtains each serviced component of user's input.The serviced component that the embodiment of the invention is mentioned can be general executable file, also can be com component, and com component need be provided with specific interface, so that call on the backstage.The serviced component that the embodiment of the invention is mentioned, do not need the user to be concerned about the specific implementation details of service routine, do not need to consider the working time and the frequency of service routine yet, therefore only need the user to develop concrete business logic codes, in prior art, a lot of parameters need be set during user's registration service program and seem more simple.
Said serviced component can be editted on any machinery and equipment in advance by the user, imports server again, also can be directly at the enterprising edlin of server.
Server is configured to service routine with each serviced component behind the directive command that gets access to system manager's input.The system manager can determine how to be configured, again directive command is inputed to server, by directive command each serviced component is configured to service routine by server according to the content that is input to each serviced component in the server.For example for ERP system, the MPS computing assembly that has existed in the ERP system is configured to the service routine that to discern at server.
Information after each service routine configuration is finished comprises: service routine title, sub-services tabulation.And each sub-services program can comprise following information: the server of execution (generally all being book server), whether be independently general executable file, then generally be com component if not general executable file independently, just comprise the recalls information (comprising component identification ID, function name, parameter information) of com component this moment.
Server can provide personalizing parameters configuration interface/interface to the system manager for each service routine in addition, further imports personalized configuration parameter according to the personalizing parameters configuration interface that shows/interface by the system manager.
Each service routine of configuration can comprise one or more sub-services programs, the corresponding serviced component of each sub-services program.The sub-services program is set to be called in order.If serviced component provides relevant interface, then can be interface configuration parameter, and return results that next sub-services program uses last sub-services program is set as parameter, parameter exists with the form of set.For example, timing MPS computing and two business of exchanges data are configured to a service routine with the form of sub-services respectively, just can realize after the MPS computing draws certain result, automatically carry out exchanges data for ERP system.
The service routine of configuration can adopt extend markup language (XML, eXtensible MarkupLanguage) format description, is kept at the XML form in the file system of server.Can be to adopt expressly XML form, but because expressly the XML form is identified easily, therefore also can adopt the XML form of encryption, server can be decrypted according to the rule that presets.Adopt the XML format description, can make full use of the advantage that it is easy to expand, thereby more convenient expansion to service routine information also can make things convenient for the integrated and exchanges data of third party system etc.
Below be that a service routine illustrates:
<Service>
<ServiceName〉Service01</ServiceName 〉; Service name
<SubServiceList 〉; The sub-services program listing
<SubService 〉; The sub-services program
<ExcuteComputer>.</ExcuteComputer>
<IsExe>0</IsExe>
<ProgID>EBCGRDataMagIF.Application</ProgID>
<MethodName>ExcuteExport</MethodName>
<UserPreResult>0</UserPreResult>
<UserForm>0</UserForm>
<CallParas/>
<UserFormProgID>EBCGRDataMagIF.Application</UserFormProgID>
<UserFormMethod>ExportSetupB</UserFormMethod>
...
</SubService>
...
</Service>
The task that step 203, foundation are carried out;
Server is set up carrying out of task according to system manager's directive command to service routine.When certain service routine isolated operation of needs once or during cycling service, just can set up a task.
Server carries out the configuration of task executions time as required by the system manager, thereby guarantees time configuration flexibility, accuracy to the configuration interface that the system manager provides unified execution time.
The configuration of execution time comprises occurrence frequency, every day frequency, duration of task etc.For occurrence frequency, for example be by the sky, by week or execution monthly, and every day, frequency comprised time cycle, start time, concluding time etc.
In addition, the priority level of task can also be set as required,, will preferentially be called during subsequent calls for the high task of priority level.Can adopt numeral to identify priority level, for example adopt 1 sign higher prior rank, adopt 0 sign lower priority other.So just can guarantee that some important tasks obtain priority processing.
Server is kept at information such as task and time parameter, priority level parameter in the file system with the XML form.Can be to adopt expressly XML form, also can adopt the XML form of encryption, server can be decrypted according to the rule that presets.Adopt the XML format description, can make full use of the advantage that it is easy to expand, thereby more convenient expansion to mission bit stream also can make things convenient for the integrated and exchanges data of third party system etc.
The form of task is following to be illustrated:
<RegTasks>
<Task>
<TaskName〉Task01</TaskName 〉; Task names
<ExcuteTime〉2008-02-30T09:20:05</ExcuteTime 〉; Execution time
<TaskLevel〉0</TaskLevel 〉; The preferred rank of task
<ServiceName〉Service01</ServiceName 〉; The service routine title
<UserName>Admin</UserName>
<EndDelete>0</EndDelete>
...
</Task>
...
</RegTasks>
In the information of above-mentioned form, describe each mission bit stream, having comprised: the service routine title of the priority level of task names, task execution time, task, task correspondence, whether deleted this task (if only carry out that once task is then deleted this task if periodically the then follow-up execution time that can upgrade it in the task of executing automatically of task of carrying out) etc. after executing.
Server loads the task that above-mentioned steps has been provided with, and task is kept in the pending task queue.Specifically be that the mission bit stream of will be in the file system preserving with the XML form parse, parsing of task is saved in the task queue in the internal memory, be used for for follow-up polling dispatching.If the XML form of encrypting, then the parsing of this moment needs to be decrypted according to the rule that presets earlier.Need to prove, be to illustrate with the task that the form of formation is preserved loading but be not limited to this here.
Server need be finished the initial work of thread pool before loading tasks.
Initialized process is as follows:
The system manager obtains hardware of server information, parameters such as initial line number of passes, maximum thread, retention wire number of passes are set according to server-capabilities and import to server.These parameters generally determine (for example initial line number of passes=CPU number * 2) according to central processing unit (CPU, the Central Processing Unit) parameter of server, these parameters also reflected an I/O finish can be concurrent on the port number of threads.Server is set up I/O according to these parameters and is finished port and create initialization thread, waits for user's thread demand application.
I/O is provided by the mechanism that port is a kind of asynchronous process incident of providing of operating system, can improve the efficient of event handling.The establishment of thread, to destroy operation all be to finish to the operating system application resource of server, just a kind of I/O incident, this I/O incident with finish port association and get up after, operating system can be called core layer and come managing I/O incident.When I/O finishes port and receives thread application incident, just wait to make a strategic decision and to create new thread or can directly from the maintenance thread of having created, obtain according to defined maximum thread, retention wire number of passes; When I/O finishes port and detects the thread End Event, can make a strategic decision and to destroy thread or allow thread keep for using in the next one; When hanging up because wait for resource, can temporarily offer other request to this thread and use, reallocate other idle thread for use when waiting the service routine of hang-up to obtain resource when service routine.So just finish port and realized management, can just can handle a large amount of concurrent requests by enough numbers thread seldom, realized effective utilization of server resource thread pool by I/O.
The task queue of server automatic regular polling when the trigger condition of some tasks when for example the execution time arrives, is taken out and is satisfied the task of current execution time and enter thread pool, and finishes port to I/O and send the message of finishing that has mission bit stream.
Here the said message of finishing, to be that confession under directions I/O finishes that port model is used, by a kind of message format of operating system definition, is to be used for triggering thread application incident.Here the trigger condition of said task is to illustrate with the execution time but be not limited to this, also can be that other guide for example is certain incident or procedure triggers.
In addition, also can increase a task queue of satisfying executive condition, the task taking-up that trigger condition is arrived is stored in this task queue, get the task of coming the front in this task queue then at every turn and enter thread pool, and be set the initial execution time, if this task can not get carrying out for a long time in the subsequent step (for example can not get carrying out in the maximum latency that is provided with), then abandon carrying out or delay this task of execution by certain strategy, the task as much as possible that can guarantee under the relatively more nervous situation of considerable task and server resource is so normally carried out.
In the thread pool I/O finish thread that port waits for receive finish message after, resolve this and finish message, obtain the mission bit stream of finishing in the message, type according to this mission bit stream corresponding with service program, call relevant interface and execute the task, then the service routine of task correspondence just is in running status with the form of this thread.
Need to prove, if service routine because of after waiting for that resource is blocked, this thread can be hung up, this thread can be distributed to another service routine and uses then, and the service routine of that obstruction is activated the back another one thread of reallocating again and carries out.So just realize the management of thread pool, can just can handle a large amount of concurrent requests by enough numbers thread seldom, realized effective utilization of system resource.
Also have, when this task was periodic duty, after this carried out this task, server can be the temporal information of next performance period with the time information renovation of described task executions.
In addition, above-mentioned each step can generate log record, so that follow-up diagnosis and checking.
Can find that each service routine of the prior art all is to be present in the operating system with an independent process, and is in active state always.And in the service program processing method of the embodiment of the invention, can have only a process, can satisfy the concurrent execution of a large amount of service routines, and these service routines generally exist with the form of a thread in the thread pool, and the thread that exists can be fully used, service routine is because of after waiting for that resource is blocked, and this thread can be hung up, and this thread can be distributed to another service routine and uses then.
This embodiment as can be seen, in the embodiment of the invention technical scheme user for example the developer just do not need to be concerned about again the specific implementation details of service routine, do not need to consider the working time and the frequency of service routine yet, only need to design the serviced component that comprises business logic codes, thereby the design effort amount can reduce.Embodiment of the invention technical scheme is after being provided with task for service routine, when the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool, therefore can coordinate the processing of each service routine, reduce resource consumption by scheduling mechanism.Finish port by I/O in addition and realized management thread pool, can be adaptively, maximally utilise the server hardware resource, just can handle a large amount of concurrent requests with number thread seldom, realized effective utilization of server resource, in addition server updating do not need service routine is done any change yet.
Foregoing describes service program processing method in detail, and corresponding, the embodiment of the invention provides a kind of server.
Seeing also Fig. 3, is embodiment of the invention server architecture synoptic diagram.
As shown in Figure 3, server comprises: service configuration module 301, task configuration module 302, task scheduling modules 303, task execution module 304.
Server also comprises: task load-on module 305.
Task load-on module 305 is used for the task that described task configuration module 302 sets is loaded into task queue.
When described task scheduling modules 303 arrived in the time that task is carried out, the task in task queue of correspondence is called in thread pool.
Server comprises: initialization module 306.
Described task configuration module 302 comprises: first module 3021, second module 3022.
Described service configuration module 301 comprises: acquisition module 3011, processing module 3012.
Below further combined with the method for the embodiment of the invention and the structure of server, be illustrated.
For example ERP (Enterprise Resources Plan) system is the management system of a bulky complex, and the module that it comprises is numerous, and each module generally all exists with the form of serviced component.And many business generally need be at running background, as: MPS/MRP/MTO (Make To Order is regularly carried out on the backstage, produce by single) computing, regularly carry out the transferring accounts automatically of exchanges data, general ledger, automatically connect queries the balance, extract automatically that data are made a strategic decision, early warning or the like, the calculated amount that these business that need automatically perform have is very big, the needs that have are frequently carried out, the frequent I/O of the needs that have is mutual, and each business has all had the module of non-automatic execution to carry out manual operations for operating personnel in ERP system.
Embodiment of the invention method just can be used in above-mentioned scene preferably.Regularly to carry out the MPS computing is example, adopt embodiment of the invention method, just can use the service configuration module 301 in the server that the MPS computing assembly that has existed in the ERP system is configured to the service routine (will formulate MPS computing parameters needed information in this process) that can discern at server, use task configuration module 302 to specify executive condition, execution time etc. to form tasks this service routine then.
After server is finished relevant initial work by initialization module 306, can load having configured of task by task load-on module 305 polls, task is kept in the pending task queue.When task scheduling modules 303 has detected certain task and satisfies executive condition in the current time,, from thread pool, distribute a thread to give this task, and execute the task by task execution module 304 with regard to the operation dispatching strategy.
Professional too many owing to what need in the ERP system to automatically perform, therefore generally need a large amount of service routine of configuration, and each service routine may need various execution trigger condition, therefore also will set up a large amount of tasks, also has a plurality of tasks at one time and satisfies executive condition.Therefore the embodiment of the invention uses I/O to finish port model management thread pond, can play the effect that improves server efficient greatly, satisfying under the prerequisite that most of tasks can both carry out, only needing to use less thread, and significantly reducing I/O expenses such as the establishment of thread and destruction.In addition, the embodiment of the invention can also be integrated effectively with some business, for example regularly MPS computing and two business of exchanges data are configured to a service routine with the form of sub-services respectively, just can realize after the MPS computing draws certain result, automatically carry out exchanges data.And in the prior art, those serviced components that existed in the ERP system just must be rewritten into a service routine that can be registered in the operating system service list and can be operated system's execution, strengthened developer's burden like this, also caused the redundancy of serviced component in the ERP system, and when operation, cause a large amount of process operations in the operating system, cause the wasting of resources, not manageability, defective such as not easy of integration, and, just preferably resolve the problems referred to above by embodiment of the invention method.
In sum, embodiment of the invention technical scheme is that each serviced component is configured to service routine, and task is set for service routine, so the user for example the developer just do not need to be concerned about again the specific implementation details of service routine, only need to design the serviced component that comprises business logic codes, thereby the design effort amount can reduce.Embodiment of the invention technical scheme is after being provided with task for service routine, when the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool, therefore can coordinate the processing of each service routine by scheduling mechanism, effectively utilize the resource of server.
Further, the service routine of the embodiment of the invention and task adopt expressly or the XML form of encrypting is realized, can improve extendability, can make things convenient for the integrated and exchanges data of third party system etc.
Further, the embodiment of the invention can also be provided with service routine can comprise the sub-services program, and the priority of task is set, and uses more flexibly, guarantees the smooth execution of vital task.
The present invention can be used for numerous general or special purpose computingasystem environment or configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-size computer, mainframe computer, comprise distributed computing environment of above any system or equipment or the like.In addition, the present invention can also describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, by by communication network connected teleprocessing equipment execute the task.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
More than a kind of service program processing method and server that the embodiment of the invention provided are described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (12)
1, a kind of service program processing method is characterized in that, comprising:
Obtain each serviced component of input;
According to directive command each serviced component is configured to service routine;
For described service routine is provided with task;
When the trigger condition of described task arrives, dispatch described task and trigger the described task of corresponding thread execution in the thread pool.
2, service program processing method according to claim 1 is characterized in that:
Describedly according to directive command each serviced component is configured to service routine and is specially:
Directive command according to input is configured to comprise the service routine of sub-services program with each serviced component, for described sub-services program is provided with ordinal relation.
3, service program processing method according to claim 1 and 2 is characterized in that: describedly task is set is specially for described service routine:
Be arranged on the task of described service routine of operation under the trigger condition of setting or the described service routine of periodic duty.
4, service program processing method according to claim 3 is characterized in that:
The trigger condition of described setting is the temporal information that task is carried out, and the temporal information that described task is carried out is behind outside output time configuration interface, and the information of obtaining according to described time configuration interface input obtains;
When described trigger condition in described task arrives, dispatch described task and be specially:
When the time that task is carried out arrives, setting and being carried in the task queue of the task of correspondence is called in thread pool.
5, service program processing method according to claim 3 is characterized in that:
The described precedence information that also comprises the task of setting when task is set;
Further dispatch in the described task of scheduling and when triggering the described task of corresponding thread execution in the thread pool according to the precedence information of described task.
6, service program processing method according to claim 1 and 2 is characterized in that:
Described service routine and described task adopt expressly or the extend markup language format description of encrypting.
7, service program processing method according to claim 1 and 2 is characterized in that:
Described thread pool is set up I/O by the parameter of setting and is finished port and create the initial thread realization.
8, a kind of server is characterized in that, comprising:
The service configuration module is used to obtain each serviced component of input, according to directive command each serviced component is configured to service routine;
The task configuration module is used to described service routine that task is set;
Task scheduling modules is used for when the trigger condition of described task arrives, and dispatches described task and triggers the described task of corresponding thread execution in the thread pool;
Task execution module is used for carrying out described task after described task scheduling modules triggers thread.
9, server according to claim 8 is characterized in that, also comprises:
The task load-on module is used for the task that described task configuration module sets is loaded into task queue;
When described task scheduling modules arrived in the time that task is carried out, the task in task queue of correspondence is called in thread pool.
10, server according to claim 9 is characterized in that, also comprises:
Initialization module is used for setting up thread pool before described task load-on module loading tasks, and described thread pool is set up I/O by the parameter of setting and finished port and create the initial thread realization.
11, according to Claim 8 or 9 described servers, it is characterized in that described task configuration module comprises:
First module is used to be arranged on the task of described service routine of operation under the trigger condition of setting or the described service routine of periodic duty;
Second module is used to the precedence information of the task that is provided with.
12, according to Claim 8 or 9 described servers, it is characterized in that described service configuration module comprises:
Acquisition module is used to obtain each serviced component of input;
Processing module is used for according to the directive command of input each serviced component being configured to comprise the service routine of sub-services program, for described sub-services program is provided with ordinal relation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101877265A CN101464810A (en) | 2008-12-31 | 2008-12-31 | Service program processing method and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2008101877265A CN101464810A (en) | 2008-12-31 | 2008-12-31 | Service program processing method and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101464810A true CN101464810A (en) | 2009-06-24 |
Family
ID=40805403
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2008101877265A Pending CN101464810A (en) | 2008-12-31 | 2008-12-31 | Service program processing method and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101464810A (en) |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN102567089A (en) * | 2011-10-25 | 2012-07-11 | 曙光信息产业(北京)有限公司 | Design method for thread pool of metadata server in distributed file system |
CN102571578A (en) * | 2011-12-31 | 2012-07-11 | 青岛海尔软件有限公司 | Method for realizing on-line communication of 500 thousands of users through completion port technology |
CN102831494A (en) * | 2012-07-23 | 2012-12-19 | 北京星网锐捷网络技术有限公司 | Scheduling method, scheduling device and scheduling system |
CN103177023A (en) * | 2011-12-23 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method, device and client side for obtaining information |
CN103593232A (en) * | 2012-08-15 | 2014-02-19 | 阿里巴巴集团控股有限公司 | Task scheduling method and device of data warehouse |
CN103593193A (en) * | 2013-11-20 | 2014-02-19 | 北京国双科技有限公司 | Task processing method and device |
CN103678348A (en) * | 2012-09-10 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for running computer file |
CN103853610A (en) * | 2012-12-07 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Resource optimization method and resource optimization device |
CN104063279A (en) * | 2013-03-20 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Task scheduling method and device and terminal |
CN105426257A (en) * | 2015-12-25 | 2016-03-23 | 北京奇虎科技有限公司 | Method and device for executing task |
CN105677391A (en) * | 2015-12-30 | 2016-06-15 | 深圳联友科技有限公司 | Method and apparatus for realizing timing plug-in |
CN105824699A (en) * | 2015-01-06 | 2016-08-03 | 中国移动通信集团山东有限公司 | Distributed task scheduling apparatus and method |
CN106775977A (en) * | 2016-12-09 | 2017-05-31 | 北京小米移动软件有限公司 | Method for scheduling task, apparatus and system |
CN106897158A (en) * | 2017-01-20 | 2017-06-27 | 深圳兆日科技股份有限公司 | Data load method and device |
CN107193659A (en) * | 2017-05-24 | 2017-09-22 | 千寻位置网络有限公司 | The system and design method of upkeep operation task |
CN109358956A (en) * | 2018-09-30 | 2019-02-19 | 上海保险交易所股份有限公司 | Service calling method |
CN114217734A (en) * | 2021-04-30 | 2022-03-22 | 无锡江南计算技术研究所 | Data management method for distributed storage system |
-
2008
- 2008-12-31 CN CNA2008101877265A patent/CN101464810A/en active Pending
Cited By (30)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567089A (en) * | 2011-10-25 | 2012-07-11 | 曙光信息产业(北京)有限公司 | Design method for thread pool of metadata server in distributed file system |
CN103177023A (en) * | 2011-12-23 | 2013-06-26 | 腾讯科技(深圳)有限公司 | Method, device and client side for obtaining information |
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN102541659B (en) * | 2011-12-30 | 2013-12-18 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN102571578A (en) * | 2011-12-31 | 2012-07-11 | 青岛海尔软件有限公司 | Method for realizing on-line communication of 500 thousands of users through completion port technology |
CN102831494A (en) * | 2012-07-23 | 2012-12-19 | 北京星网锐捷网络技术有限公司 | Scheduling method, scheduling device and scheduling system |
CN103593232A (en) * | 2012-08-15 | 2014-02-19 | 阿里巴巴集团控股有限公司 | Task scheduling method and device of data warehouse |
CN103593232B (en) * | 2012-08-15 | 2017-07-04 | 阿里巴巴集团控股有限公司 | The method for scheduling task and device of a kind of data warehouse |
CN103678348A (en) * | 2012-09-10 | 2014-03-26 | 腾讯科技(深圳)有限公司 | Method and device for running computer file |
CN103678348B (en) * | 2012-09-10 | 2017-06-16 | 腾讯科技(深圳)有限公司 | A kind of method and apparatus for running computer documents |
CN103853610A (en) * | 2012-12-07 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Resource optimization method and resource optimization device |
WO2014086202A1 (en) * | 2012-12-07 | 2014-06-12 | 腾讯科技(深圳)有限公司 | Resource optimization method and device |
US9477527B2 (en) | 2012-12-07 | 2016-10-25 | Tencent Technology (Shenzhen) Company Limited | Resource optimization method and apparatus |
CN104063279A (en) * | 2013-03-20 | 2014-09-24 | 腾讯科技(深圳)有限公司 | Task scheduling method and device and terminal |
CN104063279B (en) * | 2013-03-20 | 2018-12-28 | 腾讯科技(深圳)有限公司 | Method for scheduling task, device and terminal |
CN103593193B (en) * | 2013-11-20 | 2017-08-01 | 北京国双科技有限公司 | Task processing method and device |
CN103593193A (en) * | 2013-11-20 | 2014-02-19 | 北京国双科技有限公司 | Task processing method and device |
CN105824699A (en) * | 2015-01-06 | 2016-08-03 | 中国移动通信集团山东有限公司 | Distributed task scheduling apparatus and method |
CN105426257A (en) * | 2015-12-25 | 2016-03-23 | 北京奇虎科技有限公司 | Method and device for executing task |
CN105426257B (en) * | 2015-12-25 | 2019-06-07 | 北京奇虎科技有限公司 | The execution method and device of task |
CN105677391A (en) * | 2015-12-30 | 2016-06-15 | 深圳联友科技有限公司 | Method and apparatus for realizing timing plug-in |
CN106775977A (en) * | 2016-12-09 | 2017-05-31 | 北京小米移动软件有限公司 | Method for scheduling task, apparatus and system |
CN106775977B (en) * | 2016-12-09 | 2020-06-02 | 北京小米移动软件有限公司 | Task scheduling method, device and system |
CN106897158A (en) * | 2017-01-20 | 2017-06-27 | 深圳兆日科技股份有限公司 | Data load method and device |
CN106897158B (en) * | 2017-01-20 | 2019-12-17 | 深圳兆日科技股份有限公司 | data loading method and device |
CN107193659A (en) * | 2017-05-24 | 2017-09-22 | 千寻位置网络有限公司 | The system and design method of upkeep operation task |
CN109358956A (en) * | 2018-09-30 | 2019-02-19 | 上海保险交易所股份有限公司 | Service calling method |
CN109358956B (en) * | 2018-09-30 | 2021-03-16 | 上海保险交易所股份有限公司 | Service calling method |
CN114217734A (en) * | 2021-04-30 | 2022-03-22 | 无锡江南计算技术研究所 | Data management method for distributed storage system |
CN114217734B (en) * | 2021-04-30 | 2023-10-27 | 无锡江南计算技术研究所 | Data management method for distributed storage system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101464810A (en) | Service program processing method and server | |
CA3000422C (en) | Workflow service using state transfer | |
CN102890643B (en) | Resource scheduling system based on immediate feedback of application effect under display card virtualization | |
CN108595282A (en) | A kind of implementation method of high concurrent message queue | |
JP2829078B2 (en) | Process distribution method | |
CN100585563C (en) | Method for servicing task of timer | |
US9231995B2 (en) | System and method for providing asynchrony in web services | |
CN103473138A (en) | Multi-tasking queue scheduling method based on thread pool | |
CN103473129B (en) | Multi-task queue scheduling system with scalable number of threads and implementation method thereof | |
CN102262564A (en) | Thread pool structure of video monitoring platform system and realizing method | |
CN101373474A (en) | Magnanimity data real time processing structure and real time processing platform following with necessaries for the same | |
CN104991824B (en) | A kind of method and system in switching at runtime application data source | |
WO2019047441A1 (en) | Communication optimization method and system | |
CN101667147A (en) | Multitasking controllable automatic snapshot method | |
CN101751288A (en) | Method, device and system applying process scheduler | |
CN110795254A (en) | Method for processing high-concurrency IO based on PHP | |
CN107491346A (en) | A kind of task processing method of application, apparatus and system | |
US20100121904A1 (en) | Resource reservations in a multiprocessor computing environment | |
CN109660569B (en) | Multitask concurrent execution method, storage medium, device and system | |
CN103617088A (en) | Method, device and processor of device for distributing core resources in different types of threads of processor | |
CN111240819A (en) | Dispatching task issuing system and method | |
Frantz et al. | An efficient orchestration engine for the cloud | |
CN113485812B (en) | Partition parallel processing method and system based on large-data-volume task | |
CN103019819A (en) | Dynamic link library uniform scheduling method based on plug-in mechanism | |
CN109388429A (en) | The task distribution method of MHP heterogeneous multiple-pipeline processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20090624 |