CN102999317B - Towards the elasticity multi-process service processing method of many tenants - Google Patents
Towards the elasticity multi-process service processing method of many tenants Download PDFInfo
- Publication number
- CN102999317B CN102999317B CN201210592900.0A CN201210592900A CN102999317B CN 102999317 B CN102999317 B CN 102999317B CN 201210592900 A CN201210592900 A CN 201210592900A CN 102999317 B CN102999317 B CN 102999317B
- Authority
- CN
- China
- Prior art keywords
- tasks carrying
- task
- host
- service processing
- carrying process
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 206
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 230000008569 process Effects 0.000 claims abstract description 156
- 238000001514 detection method Methods 0.000 claims abstract description 34
- 230000026676 system process Effects 0.000 claims abstract description 18
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000012546 transfer Methods 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 5
- 238000012544 monitoring process Methods 0.000 claims description 5
- 238000002203 pretreatment Methods 0.000 claims description 3
- 230000002159 abnormal effect Effects 0.000 claims description 2
- 238000002955 isolation Methods 0.000 abstract description 6
- 238000007726 management method Methods 0.000 description 11
- 230000004044 response Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000005059 dormancy Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
- Multi Processors (AREA)
Abstract
The invention discloses a kind of elasticity multi-process service processing method towards many tenants, comprise the steps: the internal process of computer system to be divided into system process and tasks carrying process; System process comprises host process, host's detection procedure, tasks carrying process detection process three processes, and wherein host process is responsible for the management to tasks carrying process, and whether host's detection procedure is responsible for timing detection host process and is survived; Whether tasks carrying process detection process is responsible for Detection task executive process and is survived.The present invention under multi-tenant environment, can effectively guarantee the isolation of data between each user.On the other hand, the present invention can the quantity of elasticity increase and decrease tasks carrying process, and the service condition to resource in the various service processing of conservative control, saves the execution time of task greatly.
Description
Technical field
The present invention relates to a kind of process management method, particularly relate to a kind of elasticity multi-process service processing method towards many tenants, belong to computer management technology field.
Background technology
Computing runs in units of process.Process is a program executed activity on computers, and each process performs downwards step by step according to the procedure order write.In principle, a CPU can only distribute to a process, and namely synchronization can only have a process to operate on a CPU.If programmed logic is too complicated, then need for a long time operation time, and server resource can not discharge for a long time, program efficiency is very low.After user sends task requests, need to wait for for a long time just can receive response, therefore the experience of user is very poor.
Along with advancing by leaps and bounds of computer technology, the appearance of server cluster, the raising of CPU arithmetic capability, the hardware resource such as multi-core CPU, server memory has been no longer bottleneck.So the realization of multi-course concurrency process becomes possibility.If certain service logic program can be divided into multiple process concurrence performance, then original program runtime just can be divided into many parts of parallel processings, can be finished quickly and utilize server resource more fully.
Utilize multi-course concurrency treatment technology, large-scale complex business is divided into many one's shares of expenses for a joint undertaking business, transfer to different process process, then the whole service role such as originally to need all complete and just can terminate, only need now maximum subtask to terminate i.e. whole task and complete.User so just can be made can to obtain system responses very soon, the experience of optimizing user.Such as need process 1,000,000 parts of lists, if one process process then supposes to need the time performing M second, such as, if use Multiprocessing, 10 process average treatment, then the time that only need perform M/10 second just can process.
In addition, if go to put forward high performance words from server side merely, advanced server price is high, and to reach the several times even efficiency of decades of times be very difficult.Utilize multi-course concurrency treatment technology then can use common server, different according to business in efficiency, use different concurrent schemes, performance sometimes even can be made to improve hundreds of times.
But existing multi-course concurrency treatment technology still Shortcomings part in management of process, such as, many tenants, namely shares identical system or program assembly, is difficult to the isolation guaranteeing data between each user under the environment of multi-user.
Summary of the invention
Technical matters to be solved by this invention is to provide a kind of elasticity multi-process service processing method towards many tenants.
For realizing above-mentioned goal of the invention, the present invention adopts following technical scheme:
Towards a many tenants' elasticity multi-process service processing method, comprise the steps:
The internal process of computer system is divided into system process and tasks carrying process;
Described system process comprises host process, host's detection procedure, tasks carrying process detection process three processes, wherein said host process is responsible for the management to described tasks carrying process, whether described host's detection procedure is responsible for regularly detecting described host process and is survived, if find that described host process is died, restarts a host process; Whether described tasks carrying process detection process is responsible for detecting described tasks carrying process and is survived, if find that there is the tasks carrying process that tasks carrying process dies then restarts a type.
Wherein more preferably, described host's detection procedure and described tasks carrying detection procedure perform mutually heartbeat detection mechanism.
Wherein more preferably, for the demand of many tenants, run multiple-task executive process simultaneously.
Wherein more preferably, active service task process code before execution, code file is registered in the XML configuration file of computer system, administration page starts process, computer system, according to administration page Transfer Parameters, reads configuration information, finds corresponding code file, described code file to be loaded in internal memory and regularly working procedure, to create described tasks carrying process.
Wherein more preferably, services request is first submitted in the task buffer queue according to the classification of tasks carrying process, then from task buffer queue, takes out process by corresponding tasks carrying process.
Wherein more preferably, according to services request quantity and the ability when pre-treatment services request, the quantity of elasticity increase and decrease tasks carrying process.
Wherein more preferably, monitor the service condition of internal memory, CPU, network in real time, comprehensively analyze; If analyzing conclusion is that server resource leaves unused, then start other tasks carrying process, and by this tasks carrying process scheduling to internal memory; If analyzing conclusion is that server resource exceedes load, then partial task executive process is moved to an other station server.
Wherein more preferably, front page layout carries out condition monitoring to described tasks carrying process; When user submits service role to, generate unique task identification number, and using described task identification number as key assignments, described task identification number stored in database, then is put into tasks carrying process by task parameters user submitted to; Described tasks carrying process reads data from described database, and then performs service role.
Elasticity multi-process service processing method provided by the present invention under multi-tenant environment, can effectively guarantee the isolation of data between each user.The data of the other side can not be seen mutually between tenant.By data isolation, ensure that the security of multi-tenant data, many tenants function is achieved.On the other hand, the present invention can the quantity of elasticity increase and decrease tasks carrying process, and the service condition to resource in the various service processing of conservative control, saves the execution time of task greatly.
Accompanying drawing explanation
Fig. 1 is the multi-tenant environment schematic diagram applying elasticity multi-process service processing method provided by the present invention.
Embodiment
As shown in Figure 1, elasticity multi-process service processing method provided by the present invention is applied in multi-tenant environment.In order to share identical system or program assembly under the environment of multi-user, and still can guarantee the isolation of data between each user, tasks carrying process is separated with system process by the present invention, the computer system (being called for short multi-process service processing system) of same set of this elasticity of application multi-process service processing method can run multiple-task executive process simultaneously, and Each performs its own functions to make it, do not interfere with each other, ensure data isolation.
In the present invention, the internal process of computer system is divided into system process and tasks carrying process.System process comprises host process, host's detection procedure, tasks carrying process detection process three processes, and wherein host process is responsible for the management to tasks carrying process, such as, add, delete, dormancy, the function such as to wake up.Whether host's detection procedure is responsible for timing detection host process and is survived, if find that host process is died, restarts a host process, ensures that host process keeps existing state in system implementation always.Whether tasks carrying process detection process is responsible for Detection task executive process and is survived, if find that there is the tasks carrying process that tasks carrying process dies then restarts a type.Wherein host process, host's detection procedure and tasks carrying process detection process perform mutually heartbeat detection mechanism, and then guarantee that three system processs are supervised mutually, and there will not be the situation of certain process dies.
Above-mentioned heartbeat detection mechanism is such: system process comprises host process, host's detection procedure, tasks carrying process detection process three processes, mutual detection, when a certain system process of discovery is abnormal, then kill original system process, restart the system process of an identical type, and transfer to computer system to take over, and then ensure that in computer system, three system processs are survivals.Whether the implementation method of heartbeat detection mechanism is timing Ping, adopt timing Ping server to detect server and normally run.Ping sends an ICMP bag to distance host, if do not receive response in preset time just think time-out, namely server crashes; If receive response, analyze the ICMP bag received, obtain TTL, type and used time, and then judge the health status of server.
In order to ensure the independence between each tasks carrying process, the present invention adopts registration type management of process mode, i.e. active service task process code is separated with multi-process service processing system, its code file is registered in the XML configuration file of computer system before performing by code, administration page starts process, computer system is according to administration page Transfer Parameters, automatic reading configuration information, find corresponding code file, to be loaded in internal memory and regularly working procedure, creation task executive process.Tasks carrying process can be cycled to repeat use, to reduce the expense of establishment process.
In above-mentioned registration type management of process mode, a set of computer system according to the multiple different service handler of configuration operation, and then can make full use of server resource, makes distinct program share a station server.In one embodiment of the invention, this registration type management of process mode is realized by online management system.This online management system is a central server, the resource of different server can be managed, comprise Resourse Distribute, process scheduling etc., according to server load distribution server task, the server overabsorption task that load is low, reaching different server can be used jointly by multiprogram.
Show the subprogram pseudo-code for realizing registration type management of process mode below.
In elasticity multi-process service processing method provided by the present invention, task buffer queue is used to carry out the scheduling of services request.Services request is first submitted in the task buffer queue according to the classification of tasks carrying process, then from task buffer queue, takes out process by corresponding tasks carrying process.The queue of use task buffer first can as the buffer zone of services request, reduce the percussive action to server, secondly services request task is temporally sorted, keep sequencing, finally automatically can adjust the quantity of tasks carrying process according to the untreated task in task buffer queue, increase treatment progress.
According to task quantity unenforced in task buffer queue, elasticity multi-process service processing method provided by the present invention judges that whether current tasks carrying process is enough.If not, then add the tasks carrying number of processes of identical type, make it process service role quickly.If quantity is empty in current task buffer queue, then reduce tasks carrying number of processes, reduce server resource and use, saving resource, reasonable distribution.
A distinguishing feature of this elasticity multi-process service processing method is Flexible use multi-process mode, namely according to services request quantity and the ability when pre-treatment services request, the quantity of elasticity increase and decrease tasks carrying process, the service condition to resource in the various service processing of conservative control.This Flexible use multi-process mode can be achieved by an independent program assembly.The service conditions such as this program assembly real-time monitoring system internal memory, CPU, network, comprehensively analyze, if analyzing conclusion is that server resource leaves unused in a large number, at this moment this assembly can start other tasks carrying process, by this tasks carrying process scheduling to internal memory, promote the resource utilization of server; If analyzing conclusion is that server resource exceedes load, this program assembly can be in due course, by some tasks carrying process migration to an other station server, and the high-efficiency operation of implementation process.
Subprogram pseudo-code for realizing Flexible use multi-process mode is as follows:
Above-mentioned Flexible use multi-process mode saves the execution time of task greatly, but server resource is limited, so need separately process to services request.If large task, high complexity computing time, then this task is split as multiple subtask, uses Multiprocessing, perform fast.And when processing simple service role in usual cases, still use traditional one process process.According to business service request, the self-defined processing mode relating to services request, makes resource obtain an equitable breakdown.
Another distinguishing feature of this elasticity multi-process service processing method is without lockization Multiprocessing.Be described as follows:
Multiprocessing can reduce the task processing time, and large task is divided into multiple little task, goes process by multiple process, reduces the processing time.In the present invention, data use NoSQL (non-relational database) service to carry out the parameter of stores service request forwarding, so just can realize the parameter sharing of multi-process multiserver.Front page layout carries out the services such as condition monitoring to tasks carrying process.When user submits service role to, task identification number unique in multi-process service processing system can be generated, and using this task identification number as key assignments, task parameters format user submitted to is stored in non-relational database, such as, in NoSQL memory database, then this task identification number is put into tasks carrying process.Tasks carrying process reads data from NoSQL memory database, and then performs service role.Use NoSQL service laterally can add home server, make multiple servers share parameter, unlimited interpolation host uses process.
In this elasticity multi-process service processing method, use NoSQL memory database as data storage facility, and utilize queue structure as middle fusion agent, making between process can independent processing oneself task of getting, without the need to using lock, operational efficiency can be improved well.
Above the elasticity multi-process service processing method towards many tenants provided by the present invention is described in detail.For one of ordinary skill in the art, to any apparent change that it does under the prerequisite not deviating from connotation of the present invention, all by formation to infringement of patent right of the present invention, corresponding legal liabilities will be born.
Claims (7)
1., towards a many tenants' elasticity multi-process service processing method, it is characterized in that:
The internal process of computer system is divided into system process and tasks carrying process;
Described system process comprises host process, host's detection procedure, tasks carrying process detection process three processes, wherein said host process is responsible for the management to described tasks carrying process, and whether described host's detection procedure is responsible for regularly detecting described host process and is survived; Whether described tasks carrying process detection process is responsible for detecting described tasks carrying process and is survived, if find that there is the tasks carrying process that tasks carrying process dies then restarts an identical type;
Described host process, described host's detection procedure and described tasks carrying process detection process perform mutually heartbeat detection mechanism, when a certain system process of discovery is abnormal, then kill original system process, restart the system process of an identical type, and transfer to computer system to take over.
2. elasticity multi-process service processing method as claimed in claim 1, is characterized in that:
For the demand of many tenants, run multiple-task executive process simultaneously.
3. elasticity multi-process service processing method as claimed in claim 2, it is characterized in that adopting registration type management of process mode to tasks carrying process, described registration type management of process mode is:
Active service task process code is separated with multi-process service processing system, described active service task process code before execution, code file is registered in the XML configuration file of computer system, administration page starts process, computer system, according to administration page Transfer Parameters, reads configuration information, finds corresponding code file, described code file to be loaded in internal memory and regularly working procedure, to create described tasks carrying process.
4. elasticity multi-process service processing method as claimed in claim 2, is characterized in that:
Services request is first submitted in the task buffer queue according to the classification of tasks carrying process, then from task buffer queue, takes out process by corresponding tasks carrying process.
5. elasticity multi-process service processing method as claimed in claim 2, is characterized in that:
According to services request quantity and the ability when pre-treatment services request, the quantity of elasticity increase and decrease tasks carrying process.
6. elasticity multi-process service processing method as claimed in claim 5, is characterized in that:
The service condition of real-time monitoring internal memory, CPU, network, comprehensively analyzes; If analyzing conclusion is that server resource leaves unused, then start other tasks carrying process, and by this tasks carrying process scheduling to internal memory; If analyzing conclusion is that server resource exceedes load, then partial task executive process is moved to an other station server.
7. elasticity multi-process service processing method as claimed in claim 1, is characterized in that:
Front page layout carries out condition monitoring to described tasks carrying process; When user submits service role to, generate unique task identification number, and using described task identification number as key assignments, described task identification number stored in database, then is put into tasks carrying process by task parameters user submitted to; Described tasks carrying process reads data from described database, and then performs service role.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210592900.0A CN102999317B (en) | 2012-12-30 | 2012-12-30 | Towards the elasticity multi-process service processing method of many tenants |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210592900.0A CN102999317B (en) | 2012-12-30 | 2012-12-30 | Towards the elasticity multi-process service processing method of many tenants |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102999317A CN102999317A (en) | 2013-03-27 |
CN102999317B true CN102999317B (en) | 2015-12-23 |
Family
ID=47927928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210592900.0A Active CN102999317B (en) | 2012-12-30 | 2012-12-30 | Towards the elasticity multi-process service processing method of many tenants |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102999317B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598300A (en) * | 2014-12-24 | 2015-05-06 | 北京奇虎科技有限公司 | Distributive business process customization method and system |
CN106610869B (en) * | 2015-10-23 | 2020-04-21 | 大唐移动通信设备有限公司 | Process management method and device |
CN105913344A (en) * | 2016-04-14 | 2016-08-31 | 北京思特奇信息技术股份有限公司 | Method and system for aiming at multi-tenant system configuration |
CN107704274B (en) * | 2017-08-24 | 2019-11-05 | 武汉斗鱼网络科技有限公司 | Method, storage medium, equipment and the system waken up for Android application host process |
CN110597631B (en) * | 2019-09-06 | 2022-06-21 | 广州华多网络科技有限公司 | Resource management method, monitoring server, proxy server, and storage medium |
CN112988378A (en) * | 2021-01-28 | 2021-06-18 | 网宿科技股份有限公司 | Service processing method and device |
CN114002488B (en) * | 2021-09-29 | 2024-01-16 | 苏州浪潮智能科技有限公司 | Automatic monitoring and adjusting method, device and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101122869A (en) * | 2007-09-20 | 2008-02-13 | 中兴通讯股份有限公司 | Single thread reposition method for multiple-core multiple thread processor |
CN102073537A (en) * | 2010-09-29 | 2011-05-25 | 深圳市蓝韵实业有限公司 | Method for realizing high-concurrency Web medical image server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8516483B2 (en) * | 2005-05-13 | 2013-08-20 | Intel Corporation | Transparent support for operating system services for a sequestered sequencer |
-
2012
- 2012-12-30 CN CN201210592900.0A patent/CN102999317B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101122869A (en) * | 2007-09-20 | 2008-02-13 | 中兴通讯股份有限公司 | Single thread reposition method for multiple-core multiple thread processor |
CN102073537A (en) * | 2010-09-29 | 2011-05-25 | 深圳市蓝韵实业有限公司 | Method for realizing high-concurrency Web medical image server |
Also Published As
Publication number | Publication date |
---|---|
CN102999317A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102999317B (en) | Towards the elasticity multi-process service processing method of many tenants | |
US20190349305A1 (en) | Container communication method and system for parallel applications | |
WO2015096656A1 (en) | Thread creation method, service request processing method and related device | |
SE1751212A1 (en) | Distributed data set storage and retrieval | |
CN103457775B (en) | A kind of high available virtual machine pond management system of based role | |
CN100570566C (en) | The method of coordinated scheduling and heterogeneous multi-core system between a kind of heterogeneous polynuclear | |
Yan et al. | Performance optimization for short MapReduce job execution in Hadoop | |
WO2019047441A1 (en) | Communication optimization method and system | |
Takouna et al. | Communication-aware and energy-efficient scheduling for parallel applications in virtualized data centers | |
WO2021066948A1 (en) | Real time multi-tenant workload tracking and auto throttling | |
CN110727508A (en) | Task scheduling system and scheduling method | |
WO2021036451A1 (en) | Real-time communication method and apparatus for distributed system, and distributed system | |
CN105184452B (en) | A kind of MapReduce job dependence control methods calculated suitable for power information big data | |
CN107528871A (en) | Data analysis in storage system | |
CN105550238A (en) | Architecture system of database appliance | |
CN104468710A (en) | Mixed big data processing system and method | |
CN104158833A (en) | Method for constructing intelligent desktop system | |
CN103338160B (en) | Based on optimization system and the optimization method of the polling service of buffer queue | |
Phan et al. | On Understanding the energy impact of speculative execution in Hadoop | |
US9806956B1 (en) | Managing computing resources by predicting resource usage | |
WO2019086120A1 (en) | A system and method for high-performance general-purpose parallel computing with fault tolerance and tail tolerance | |
Liang et al. | A new pre-copy strategy for live migration of virtual machines | |
Wu et al. | GA-based job scheduling strategies for fault tolerant grid systems | |
Cai et al. | Energy efficiency optimizing based on characteristics of machine learning in cloud computing | |
CN106850283B (en) | Event-driven cloud AC alarm processing system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |