CN108132833A - A kind of distributed timing method for scheduling task and device based on zookeeper technologies - Google Patents

A kind of distributed timing method for scheduling task and device based on zookeeper technologies Download PDF

Info

Publication number
CN108132833A
CN108132833A CN201711298774.7A CN201711298774A CN108132833A CN 108132833 A CN108132833 A CN 108132833A CN 201711298774 A CN201711298774 A CN 201711298774A CN 108132833 A CN108132833 A CN 108132833A
Authority
CN
China
Prior art keywords
task
timed task
dispatching
zookeeper
timed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711298774.7A
Other languages
Chinese (zh)
Inventor
林锡鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201711298774.7A priority Critical patent/CN108132833A/en
Publication of CN108132833A publication Critical patent/CN108132833A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The present invention relates to a kind of distributed timing method for scheduling task and device based on zookeeper technologies.The method uses Zookeeper dispatching databases, and multiple service servers are registered on Zookeeper dispatching databases, and the multiple service server is also associated with information database, including:Main business server stores timing task information into information database, will be in the storage to zookeeper dispatching databases of timed task expression formula;Main business startup of server timer timing;When timing reaches triggering moment, the timed task is performed from service server.The advantage of information database and zookeeper dispatching databases is effectively utilized in the embodiment of the present invention, it is reasonably timed the scheduling of task in a distributed system, system resource reasonably is utilized, reduce the resource consumption that multi-services device timing belt comes in prior art, more timed tasks can be carried out at the same time.

Description

A kind of distributed timing method for scheduling task and device based on zookeeper technologies
Technical field
The invention belongs to Computer Control Technology fields, and in particular to a kind of distribution based on zookeeper technologies is determined When method for scheduling task and device.
Background technology
In dcs, timed task plays important and indispensable effect, in numerous applications To use timing services.Existing timed task pattern mainly includes centralized timed task pattern and distributed timing task mould Formula.
For centralized timed task pattern, one special services with timing function of setting are needed, work as timed task After arrival time point, the special services is allowed to perform corresponding timed task.Since only there are one special services on a machine Scheduling is timed, ensure that timed task is only executed once, but it is fixed to perform to need one special services of special setting When task, the machine if special services are delayed can cause timed task to fail, increase the O&M pressure of system.
For distributed timing mission mode, needing to set respectively on multiple service servers has identical timed task Special services, when timed task arrival time point need perform when, each service server is judged by such as zookeeper components On special services whether to perform this timed task, by needing to perform the special services on the service server of this timed task It performs.That is, multiple service servers with the special services will start timer timing, the industry after then triggering Whether business server really runs the timed task, then needs to go to judge by zookeeper components.Distributed timing task mould Formula is disadvantageous in that each special services at different business server will carry out timing, but is not each business clothes The special services of business device will perform timed task, cause system resource waste, also, when timed task changes, and need Data synchronization is carried out, the special services of all service servers is notified to change.
Invention content
In order to efficiently use system resource, the embodiment of the present invention proposes a kind of distribution based on zookeeper technologies Timed task dispatching method, using Zookeeper dispatching databases, multiple service servers are registered to Zookeeper scheduling numbers According on library, the multiple service server is also associated with information database, includes the following steps:
Timed task storing step:Main business server is by the timing task information of one or more timed tasks and periodically In the storage to information database of the identity code connection of task, the timed task of one or more of timed tasks is expressed In the associated storage to zookeeper dispatching databases of the identity code of formula and timed task;
Timed task timed process:Timed task of the main business server in zookeeper dispatching databases is determined When Task representation start timer timing;
Timed task performs step:When timing reach timed task triggering moment when, main business server by this timing Task is distributed to be performed accordingly from service server.
Further, main step is selected before the dispatching method is additionally included in timed task storing step, in zookeeper In the IP address for the service server registered on dispatching database, the service server for selecting IP address sequence maximum or minimum is made For main service server, other service servers are used as from service server.
Further, the dispatching method is additionally included in the feedback step after timed task execution step, main business service Device is stored from the feedback information that tasks carrying situation is received from service server, and by feedback information into information database.
Further, described information database includes the first sub-information database and the second sub-information database, the timing Mission bit stream is stored in the first sub-information database, and first information database is redis databases;The tasks carrying situation Feedback information storage in the second sub-information database, the second sub-information database is relevant database.
Further, in timed task timed process, main business server is determined in zookeeper dispatching databases When task timed task expression formula and information database in timing task information start timer timing.
Further, in timed task performs step, main business server is got from zookeeper dispatching databases Up to the identity code of the timed task of triggering moment, and send it to accordingly from service server, from service server The timing task information of timed task is transferred from information database according to the identity code of the timed task received, and is held Row.
Further, in timed task performs step, main business server is got from zookeeper dispatching databases Up to after the identity code of the timed task of triggering moment, send to perform to the corresponding slave service server for performing task and ask It asks, after main business server is received from the confirmation answer of service server, then the body of the timed task of triggering moment will be reached Part identification code is sent to accordingly from service server.
Further, it if main business server does not receive the confirmation answer from service server at the appointed time, leads Service server performs request to other from service server transmission.
The embodiment of the present invention also provides a kind of distributed timing task scheduling apparatus based on zookeeper technologies, is used for Above-mentioned dispatching method is performed, the dispatching device includes Zookeeper dispatching databases, information database and is registered to Multiple service servers of Zookeeper dispatching databases.
The embodiment of the present invention also provides a kind of distributed timing task scheduling apparatus based on zookeeper technologies, described Dispatching device includes registration module, timed task memory module, timed task timing module and timed task execution module, In, registration module is used to multiple service servers being registered to Zookeeper dispatching databases;Timed task memory module is used for So that the timing task information of one or more timed tasks is associated with by main business server with the identity code of timed task Storage to information database in so that main business server is by the timed task expression formula of one or more of timed tasks With the associated storage of the identity code of timed task in zookeeper dispatching databases;Timed task timing module is used for So that the timed task expression formula of timed task of the main business server in zookeeper dispatching databases starts timer Timing;Timed task execution module is used for when timing reaches the triggering moment of timed task so that main business server should Timed task is distributed to be performed accordingly from service server.
The embodiment of the present invention also proposes a kind of computer readable storage medium, is stored with the calculating for performing aforementioned dispatching method Machine program.
The embodiment of the present invention also proposes a kind of computer equipment, including what is be connected to the processor on processor and operation Above computer readable storage medium storing program for executing, the processor operation perform the computer program in computer-readable medium.
Beneficial effects of the present invention:
According to embodiments of the present invention, by information data library storage timed task, the management timing of zookeeper dispatching databases Task, main business server timing perform specific task definition from service server.The embodiment of the present invention is effectively utilized The advantage of information database and zookeeper dispatching databases is reasonably timed the scheduling of task in a distributed system, System resource reasonably is utilized, reduces the resource consumption that multi-services device timing belt comes in prior art, it can be simultaneously Carry out more timed tasks.In addition, any service server in system may all be selected by zookeeper dispatching databases Main to become main business server, system setting is simple, the modification timed task that main business server can be rapidly and efficiently without Influence the work from service server.
Description of the drawings
Fig. 1 is the stream for the distributed timing method for scheduling task based on zookeeper technologies that the embodiment of the present invention proposes Cheng Tu;
Fig. 2 is the knot for the distributed timing task scheduling apparatus based on zookeeper technologies that the embodiment of the present invention proposes Composition;
Fig. 3 is the side for the distributed timing task scheduling apparatus based on zookeeper technologies that the embodiment of the present invention proposes Block diagram.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference Attached drawing, the present invention is described in more detail.But those skilled in the art know, the invention is not limited in attached drawings and following reality Apply example.
The embodiment of the present invention proposes a kind of distributed timing method for scheduling task based on zookeeper technologies, such as Fig. 1 Shown, using Zookeeper dispatching databases, multiple 1,2,3 ... N of service server are registered to Zookeeper scheduling data On library, N is the natural number more than or equal to 2.Perform this method system construction drawing as shown in Fig. 2, the system comprises Zookeeper dispatching databases, information database and be registered to Zookeeper dispatching databases multiple service servers 1,2, 3 ... N, the database include the first sub-information database and the second sub-information database.Wherein, each service server utilizes Its server ip address and the port numbers of opening register node on zookeeper dispatching databases, according to the server of registration IP address and the multiple service servers of port numbers can be accessed, and the function of each service server can be also registered to On zookeeper dispatching databases, for being used during distribution timed task.
Select main step:The multiple service server carries out selecting main operation by zookeeper dispatching databases, from multiple A main business server (host node) is selected in service server, other service servers are used as from service server (from section Point).For example, such a way, which may be used, carries out choosing master, according to the business rule that choosing is main, select IP address sequence maximum or most Small service server is used as main business server, others from service server.Each service server is in zookeeper Checked in dispatching database its IP address whether be registered service server IP address in sort maximum (or minimum), If it is, the service server is as main business server;If it is not, then the service server is used as from service server.
Timed task storing step:Main business server is by the identity of one or more timing task informations and timed task In the associated information databases stored of identification code id, the timing task information include starting timed task next time the time, Timed task performs time, the number of repetition of tasks carrying and specific tasks content.Preferably, timing task information stores In the first sub-information database of information database, first information database be redis databases, have capacity it is small, read-write Fireballing advantage.
Main business server by the timed task expression formula cron of one or more of timed tasks (represent some when Between point perform inter-related task) in the associated storage to zookeeper dispatching databases of the identity code id of timed task. In zookeeper dispatching databases, the information in Task representation cron can be dynamically changed, moreover it is possible to notify main business immediately Server goes to change the execution time of the timed task.
The form of timed task expression formula cron for example can have at least six (may also be 7) have space-separated when Between element, be followed successively by order the second (0-59), minute (0-59), hour (0-23), day (1-31), the moon (1-12), day (week, 1-7, represent SUN, MON, TUE, WED, THU, FRI or SAT), the time (1970-2099).It is fixed according to the rule arranged in advance When Task representation in can also include with particular meaning character or parameter, as *, ,/,, L etc..Such as cron1:0 15 10**2018, represent that trigger for 15 minutes at daily 10 points of 2018;cron2:0 10,44 143WED, under representing March on every Wendesdays 2 points of noon trigger for 10 minutes and 2 points for 44 minutes;cron3:0 15 10***, represent that trigger for 15 minutes at daily 10 points.
Timed task timed process:Main business server is one or more in zookeeper dispatching databases The timed task expression formula cron of a timed task starts timer timing.If on the timed task in information database Include in information and the relevant information of main business server timing, such as timing initial time, timing duration, then main business The timed task expression formula cron of one or more of timed tasks of the server in zookeeper dispatching databases and Timing task information in information database starts timer timing.
Timed task performs step:When timing reach timed task triggering moment when, main business server by this timing Task is distributed to be performed accordingly from service server.
Specifically, main business server obtains the timed task for reaching triggering moment from zookeeper dispatching databases Identity code id, request is performed to the corresponding slave service server transmission for performing task, when main business server receives After the confirmation of service server replies, by the identity code id for the timed task for reaching triggering moment be sent to accordingly from Service server is transferred from information database according to the identity code id of the timed task received from service server and is determined When task timing task information (specific tasks content), performed.If main business server is not received at the appointed time (time-out) is replied to from the confirmation of service server, then main business server performs request to other from service server transmission.
Feedback step:Main business server will appoint from the feedback information that tasks carrying situation is received from service server The feedback information for executive condition of being engaged in, such as the execution of this subtask start that the time, to perform deadline, specific executive condition (complete Into or it is abnormal) etc. information, store in information database, in preferred storage to the second sub-information database.Second sub-information Database can use relevant database, such as mysql databases.
If main business server receives the feedback information of tasks carrying exception, main business server appoints the timing Business is distributed to others and is performed from service server.
In the above embodiment of the present invention, when main business server when something goes wrong, zookeeper dispatching database meetings In other service servers again choosing master, the main business server for re-electing out loaded from information server not by from The timed task that service server performs ensures the stability of system.
In the above method of the embodiment of the present invention, by information data library storage timed task, zookeeper scheduling data Library management timed task, main business server timing perform specific task definition from service server.The above method is effective The advantage of information database and zookeeper dispatching databases is utilized, is reasonably timed task in a distributed system Scheduling, system resource is reasonably utilized, reduces the resource consumption that multi-services device timing belt in prior art comes, energy Enough it is carried out at the same time more timed tasks.In addition, any service server in system all may dispatch number by zookeeper Become main business server according to library choosing is main, system setting is simple, the modification timed task that main business server can be rapidly and efficiently Work without influencing whether working business server.
In another embodiment of the present invention, as shown in Fig. 2, show perform the above method based on zookeeper skills The structure chart of the distributed timing task scheduling apparatus of art.The distributed timing task scheduling based on zookeeper technologies Device includes Zookeeper dispatching databases, information database and the multiple business clothes for being registered to Zookeeper dispatching databases Device 1,2,3 ... N, N be engaged in as the natural number more than or equal to 2, the database includes the first sub-information database and the second son letter Cease database.Wherein, each service server dispatches data using its server ip address and the port numbers of opening in zookeeper Register node on library can be accessed, each business according to the server ip address of registration and the multiple service servers of port numbers The function of server can be also registered on zookeeper dispatching databases, for being used during distribution timed task.
In one more embodiment of the present invention, as shown in figure 3, a kind of distributed timing based on zookeeper technologies is appointed Dispatching device of being engaged in includes registration module, timed task memory module, timed task timing module, timed task execution module and anti- Present module.
Registration module is used to multiple 1,2,3 ... N of service server being registered to Zookeeper dispatching databases, and N is big In the natural number equal to 2.Wherein, the IP address of each service server and the port numbers of opening are dispatched into data in zookeeper Register node on library can access to multiple service servers by the server ip address and port numbers of registration.
Primary module is selected for so that the multiple service server carries out selecting main behaviour by zookeeper dispatching databases Make, a main business server (host node) is selected from multiple service servers, other service servers are used as from business and take Business device (from node).For example, such a way, which may be used, carries out choosing master, according to the business rule that choosing is main, IP address row is selected As main business server, others are used as from service server the maximum or minimum service server of sequence.Each service server Checked in zookeeper dispatching databases its IP address whether be registered service server IP address in sort it is maximum (or minimum), if it is, the service server is as main business server;If it is not, then the service server be used as from Service server.
Timed task memory module is for so that main business server appoints one or more timing task informations and timing In the associated information databases stored of identity code id of business, the timing task information opens next time including timed task Dynamic time, execution time, the number of repetition of tasks carrying and the specific tasks content of timed task.Preferably, timed task Information is stored in the first sub-information database of information database, and first information database is redis databases, has capacity Small, the advantages of read or write speed is fast.
Timed task memory module is for so that main business server appoints the timing of one or more of timed tasks Identity code id associated storages of the business expression formula cron (representing to perform inter-related task at some time point) with timed task Into zookeeper dispatching databases.In zookeeper dispatching databases, can dynamically it change in Task representation cron Information, moreover it is possible to main business server is notified to go to change the execution time of the timed task immediately.
The form of timed task expression formula cron for example can have at least six (may also be 7) have space-separated when Between element, be followed successively by second (0-59), minute (0-59), hour (0-23), day (moon, 1-31), the moon (1-12), day (star in order Phase, 1-7, represent SUN, SUN, MON, TUE, WED, THU, FRI or SAT), the time (1970-2099).According to what is arranged in advance Rule can also include character or parameter with particular meaning in timed task expression formula, as *, ,/,, L etc..Such as cron1:0 15 10**2018, represent that trigger for 15 minutes at daily 10 points of 2018;cron2:0 10,44 143WED represents 3 The moon on every Wendesdays afternoon 2 points 10 minutes and 2 points 44 minutes trigger;cron3:0 15 10***, represent that trigger for 15 minutes at daily 10 points.
Timed task timing module is used for cause main business server in zookeeper dispatching databases described one The timed task expression formula cron of a or multiple timed tasks starts timer timing.If on determining in information database When mission bit stream in include and the relevant information of main business server timing, such as timing initial time, timing duration, then The timed task expression formula of one or more of timed tasks of the main business server in zookeeper dispatching databases Timing task information in cron and information database starts timer timing.
Timed task execution module is used for when timing reaches the triggering moment of timed task so that main business server will The timed task is distributed to be performed accordingly from service server.
Specifically, main business server obtains the timed task for reaching triggering moment from zookeeper dispatching databases Identity code id, request is performed to the corresponding slave service server transmission for performing task, when main business server receives After the confirmation of service server replies, by the identity code id for the timed task for reaching triggering moment be sent to accordingly from Service server is transferred from information database according to the identity code id of the timed task received from service server and is determined When task timing task information (specific tasks content), performed.If main business server is not received at the appointed time (time-out) is replied to from the confirmation of service server, then main business server performs request to other from service server transmission.
Feedback module for so that main business server from from service server receive tasks carrying situation feedback information, And the feedback information of tasks carrying situation, such as the execution of this subtask are started the time, perform the deadline, specifically perform feelings The information such as condition (completing or abnormal), store in information database, in preferred storage to the second sub-information database.Second son Information database can use relevant database, such as mysql databases.
If main business server receives the feedback information of tasks carrying exception, main business server appoints the timing Business is distributed to others and is performed from service server.
In the above embodiment of the present invention, when main business server when something goes wrong, select primary module can be in other business Choosing master, the main business server for re-electing out are loaded not from information server by from service server again in server The timed task of execution ensures the stability of system.
The excellent of information database and zookeeper dispatching databases is effectively utilized in the above device of the embodiment of the present invention Gesture is reasonably timed the scheduling of task, system resource is reasonably utilized, reduces prior art in a distributed system The resource consumption that middle multi-services device timing belt comes, can be carried out at the same time more timed tasks.In addition, any in system Service server all may select master to become main business server by zookeeper dispatching databases, and system setting is simple, main business Business server can be rapidly and efficiently modification timed task without influence whether working be engaged in server work.
The embodiment of the present invention also proposes a kind of computer readable storage medium, is stored with the calculating for performing aforementioned dispatching method Machine program.
The embodiment of the present invention also proposes a kind of computer equipment, including what is be connected to the processor on processor and operation Above computer readable storage medium storing program for executing, the processor operation perform the computer program in computer-readable medium.
It will be understood by those skilled in the art that in flow charts represent or logic described otherwise above herein and/or Step for example, being considered the order list for the executable instruction for being used to implement logic function, may be embodied in and appoint In what computer-readable medium, for instruction execution system, device or equipment (such as computer based system, including processor System or other can be from the system of instruction execution system, device or equipment instruction fetch and execute instruction) use or with reference to this A little instruction execution systems, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be it is any can be with Comprising, store, communicate, propagate, or transport program performs system for instruction execution system, device or equipment or with reference to these instructions System, device or equipment and the device used.
The more specific example (non-exhaustive list) of computer-readable medium is including following:It is connected up with one or more Electrical connection section (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be performed with storage Or firmware is realized.If for example, with hardware come realize in another embodiment, can be under well known in the art Any one of row technology or combination thereof are realized:With for the logic gates to data-signal realization logic function Discrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " example ", " is specifically shown " some embodiments " The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment of the present invention or example.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiments or example in combine in an appropriate manner.
More than, embodiments of the present invention are illustrated.But the present invention is not limited to the above embodiments.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution, improvement and etc. done should be included in the guarantor of the present invention Within the scope of shield.

Claims (10)

1. a kind of distributed timing method for scheduling task based on zookeeper technologies, using Zookeeper dispatching databases, Multiple service servers are registered on Zookeeper dispatching databases, and the multiple service server is also associated with information data Library, it is characterised in that:Include the following steps,
Timed task storing step:Main business server is by the timing task information and timed task of one or more timed tasks Identity code connection storage to information database in, by the timed task expression formula of one or more of timed tasks with In the associated storage to zookeeper dispatching databases of identity code of timed task;
Timed task timed process:The timing of timed task of the main business server in zookeeper dispatching databases is appointed Expression formula of being engaged in starts timer timing;
Timed task performs step:When timing reaches the triggering moment of timed task, main business server is by the timed task It distributes to and is performed accordingly from service server.
2. dispatching method as described in claim 1, it is characterised in that:The dispatching method is additionally included in timed task storage step Main step is selected before rapid, in the IP address for the service server registered on zookeeper dispatching databases, selects IP address As main business server, other service servers are used as from service server the maximum or minimum service server of sequence.
3. dispatching method as claimed in claim 1 or 2, it is characterised in that:The dispatching method is additionally included in timed task and holds Feedback step after row step, main business server from from service server receive tasks carrying situation feedback information, and It will be in feedback information storage to information database.
4. dispatching method as claimed in claim 3, it is characterised in that:Described information database includes the first sub-information database With the second sub-information database,
The timing task information is stored in the first sub-information database, and first information database is redis databases;
In the feedback information storage to the second sub-information database of the tasks carrying situation, the second sub-information database is relationship Type database.
5. dispatching method as claimed in claim 1 or 2, it is characterised in that:In timed task timed process, main business service Timed task in the timed task expression formula and information database of timed task of the device in zookeeper dispatching databases Information starts timer timing.
6. dispatching method as claimed in claim 1 or 2, it is characterised in that:In timed task performs step, main business service Device obtains the identity code for the timed task for reaching triggering moment from zookeeper dispatching databases, and sends it to Accordingly from service server, from service server according to the identity code of the timed task received from information database The timing task information of timed task is transferred, and is performed.
7. dispatching method as claimed in claim 6, it is characterised in that:In timed task performs step, main business server After the identity code that the timed task for reaching triggering moment is obtained from zookeeper dispatching databases, performed to corresponding The slave service server transmission of task performs request, after main business server is received from the confirmation answer of service server, then The identity code for the timed task for reaching triggering moment is sent to accordingly from service server.
8. dispatching method as claimed in claim 7, it is characterised in that:If main business server does not receive at the appointed time It is replied from the confirmation of service server, then main business server performs request to other from service server transmission.
9. a kind of distributed timing task scheduling apparatus based on zookeeper technologies, it is characterised in that:For performing such as right It is required that the dispatching method described in one of 1-8, the dispatching device includes Zookeeper dispatching databases, information database and note Volume arrives multiple service servers of Zookeeper dispatching databases.
10. a kind of distributed timing task scheduling apparatus based on zookeeper technologies, it is characterised in that:The dispatching device Including registration module, timed task memory module, timed task timing module and timed task execution module, wherein,
Registration module is used to multiple service servers being registered to Zookeeper dispatching databases;
Timed task memory module for so that main business server by the timing task information of one or more timed tasks with In the associated storage to information database of identity code of timed task so that main business server will be one or more of Zookeeper dispatching databases are arrived in the timed task expression formula of timed task and the associated storage of the identity code of timed task In;
Timed task timing module is used to cause timed task of the main business server in zookeeper dispatching databases Timed task expression formula starts timer timing;
Timed task execution module is used for when timing reaches the triggering moment of timed task so that main business server determines this When task distribute to accordingly from service server perform.
CN201711298774.7A 2017-12-08 2017-12-08 A kind of distributed timing method for scheduling task and device based on zookeeper technologies Pending CN108132833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711298774.7A CN108132833A (en) 2017-12-08 2017-12-08 A kind of distributed timing method for scheduling task and device based on zookeeper technologies

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711298774.7A CN108132833A (en) 2017-12-08 2017-12-08 A kind of distributed timing method for scheduling task and device based on zookeeper technologies

Publications (1)

Publication Number Publication Date
CN108132833A true CN108132833A (en) 2018-06-08

Family

ID=62389404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711298774.7A Pending CN108132833A (en) 2017-12-08 2017-12-08 A kind of distributed timing method for scheduling task and device based on zookeeper technologies

Country Status (1)

Country Link
CN (1) CN108132833A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984290A (en) * 2018-08-02 2018-12-11 北京京东金融科技控股有限公司 Method for scheduling task and system
CN109213792A (en) * 2018-07-06 2019-01-15 武汉斗鱼网络科技有限公司 Method, server-side, client, device and the readable storage medium storing program for executing of data processing
CN109298937A (en) * 2018-09-19 2019-02-01 中国联合网络通信集团有限公司 Document analysis method and the network equipment
CN109408212A (en) * 2018-09-28 2019-03-01 平安科技(深圳)有限公司 Task schedule component building method, device and storage medium, server
CN110233886A (en) * 2019-05-30 2019-09-13 华南理工大学 A kind of High Availabitity service governing system and implementation method towards magnanimity micro services
CN110266779A (en) * 2019-06-10 2019-09-20 南威软件股份有限公司 A kind of principal and subordinate local timed task processing method and system based on zookeeper
CN110389961A (en) * 2019-07-26 2019-10-29 苏州浪潮智能科技有限公司 Timed task processing method, device, equipment and computer readable storage medium
CN110399207A (en) * 2019-06-29 2019-11-01 苏州浪潮智能科技有限公司 Timed task processing method, system and storage medium in distributed memory system
CN110830528A (en) * 2018-08-07 2020-02-21 北京京东尚科信息技术有限公司 Method and device for controlling distributed timing switch
CN110837409A (en) * 2018-08-16 2020-02-25 北京京东尚科信息技术有限公司 Method and system for executing task regularly
CN111125738A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method and device for preventing core data from being lost, computer equipment and storage medium
CN111163145A (en) * 2019-12-23 2020-05-15 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment
CN111163117A (en) * 2018-11-07 2020-05-15 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN111562971A (en) * 2020-04-09 2020-08-21 北京明略软件系统有限公司 Scheduling method and system of distributed timer
CN112416542A (en) * 2020-09-07 2021-02-26 上海哔哩哔哩科技有限公司 Distributed task system, management method and device and computer equipment
CN112597131A (en) * 2020-12-25 2021-04-02 广州趣丸网络科技有限公司 Distributed script control method and related device
CN112667370A (en) * 2020-09-24 2021-04-16 紫光云技术有限公司 Flexible public timing task allocation method
CN113312419A (en) * 2021-06-01 2021-08-27 北京思特奇信息技术股份有限公司 Timing scheduling method and system for subscription service
CN113448699A (en) * 2020-12-30 2021-09-28 北京新氧科技有限公司 Distributed timed task processing system, method and related device
CN113742063A (en) * 2021-08-06 2021-12-03 天津中新智冠信息技术有限公司 Distributed timing scheduling system and method
CN115185673A (en) * 2022-05-17 2022-10-14 贝壳找房(北京)科技有限公司 Distributed timed task scheduling method, system, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140289733A1 (en) * 2013-03-22 2014-09-25 Palo Alto Research Center Incorporated System and method for efficient task scheduling in heterogeneous, distributed compute infrastructures via pervasive diagnosis
CN104866378A (en) * 2015-05-29 2015-08-26 北京京东尚科信息技术有限公司 System and method for coordinating execution tasks
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN106921754A (en) * 2017-05-04 2017-07-04 泰康保险集团股份有限公司 The load-balancing method of group system, device, medium and electronic equipment
CN107341051A (en) * 2016-05-03 2017-11-10 北京京东尚科信息技术有限公司 Cluster task coordination approach, system and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140289733A1 (en) * 2013-03-22 2014-09-25 Palo Alto Research Center Incorporated System and method for efficient task scheduling in heterogeneous, distributed compute infrastructures via pervasive diagnosis
CN104866378A (en) * 2015-05-29 2015-08-26 北京京东尚科信息技术有限公司 System and method for coordinating execution tasks
CN105100259A (en) * 2015-08-18 2015-11-25 北京京东尚科信息技术有限公司 Distributed timed task execution method and system
CN107341051A (en) * 2016-05-03 2017-11-10 北京京东尚科信息技术有限公司 Cluster task coordination approach, system and device
CN106921754A (en) * 2017-05-04 2017-07-04 泰康保险集团股份有限公司 The load-balancing method of group system, device, medium and electronic equipment

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213792A (en) * 2018-07-06 2019-01-15 武汉斗鱼网络科技有限公司 Method, server-side, client, device and the readable storage medium storing program for executing of data processing
CN108984290A (en) * 2018-08-02 2018-12-11 北京京东金融科技控股有限公司 Method for scheduling task and system
CN108984290B (en) * 2018-08-02 2021-03-30 北京京东金融科技控股有限公司 Task scheduling method and system
CN110830528A (en) * 2018-08-07 2020-02-21 北京京东尚科信息技术有限公司 Method and device for controlling distributed timing switch
CN110837409A (en) * 2018-08-16 2020-02-25 北京京东尚科信息技术有限公司 Method and system for executing task regularly
CN109298937A (en) * 2018-09-19 2019-02-01 中国联合网络通信集团有限公司 Document analysis method and the network equipment
CN109408212A (en) * 2018-09-28 2019-03-01 平安科技(深圳)有限公司 Task schedule component building method, device and storage medium, server
CN109408212B (en) * 2018-09-28 2023-09-19 平安科技(深圳)有限公司 Task scheduling component construction method and device, storage medium and server
CN111163117A (en) * 2018-11-07 2020-05-15 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN111163117B (en) * 2018-11-07 2023-01-31 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN110233886B (en) * 2019-05-30 2021-07-20 华南理工大学 High-availability service management system for massive micro-services and implementation method
CN110233886A (en) * 2019-05-30 2019-09-13 华南理工大学 A kind of High Availabitity service governing system and implementation method towards magnanimity micro services
CN110266779A (en) * 2019-06-10 2019-09-20 南威软件股份有限公司 A kind of principal and subordinate local timed task processing method and system based on zookeeper
CN110399207A (en) * 2019-06-29 2019-11-01 苏州浪潮智能科技有限公司 Timed task processing method, system and storage medium in distributed memory system
CN110389961A (en) * 2019-07-26 2019-10-29 苏州浪潮智能科技有限公司 Timed task processing method, device, equipment and computer readable storage medium
CN111163145A (en) * 2019-12-23 2020-05-15 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment
CN111163145B (en) * 2019-12-23 2022-04-05 北京数衍科技有限公司 Distributed data timing and uniform sending method and device and electronic equipment
CN111125738A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Method and device for preventing core data from being lost, computer equipment and storage medium
CN111562971A (en) * 2020-04-09 2020-08-21 北京明略软件系统有限公司 Scheduling method and system of distributed timer
CN112416542A (en) * 2020-09-07 2021-02-26 上海哔哩哔哩科技有限公司 Distributed task system, management method and device and computer equipment
CN112667370A (en) * 2020-09-24 2021-04-16 紫光云技术有限公司 Flexible public timing task allocation method
CN112597131A (en) * 2020-12-25 2021-04-02 广州趣丸网络科技有限公司 Distributed script control method and related device
CN113448699A (en) * 2020-12-30 2021-09-28 北京新氧科技有限公司 Distributed timed task processing system, method and related device
CN113312419A (en) * 2021-06-01 2021-08-27 北京思特奇信息技术股份有限公司 Timing scheduling method and system for subscription service
CN113742063A (en) * 2021-08-06 2021-12-03 天津中新智冠信息技术有限公司 Distributed timing scheduling system and method
CN115185673A (en) * 2022-05-17 2022-10-14 贝壳找房(北京)科技有限公司 Distributed timed task scheduling method, system, storage medium and program product
CN115185673B (en) * 2022-05-17 2023-10-31 贝壳找房(北京)科技有限公司 Distributed timing task scheduling method, system, storage medium and program product

Similar Documents

Publication Publication Date Title
CN108132833A (en) A kind of distributed timing method for scheduling task and device based on zookeeper technologies
US8484061B2 (en) Scheduling sessions of multi-speaker events
CN106815066B (en) Timed task scheduling method, device and system
CN109582466A (en) A kind of timed task executes method, distributed server cluster and electronic equipment
CN103679392B (en) A kind of task scheduling processing method and system
US9262156B2 (en) Methods for transparent management of context and state in an asynchronous callback flow
CN109634730A (en) Method for scheduling task, device, computer equipment and storage medium
CN108834086A (en) Method, apparatus, computer equipment and the storage medium that short message is sent
CN109325024A (en) Label display method, apparatus, terminal device and the storage medium of project
CN109298924A (en) Management method, computer readable storage medium and the terminal device of timed task
CN110334126A (en) Timed task processing method, device and computer equipment based on Spring MVC
CN110532044A (en) A kind of big data batch processing method, device, electronic equipment and storage medium
CN114416308A (en) Task scheduling method and device, computer equipment and storage medium
CN100498735C (en) Resource using method in automatic testing process
CN106528065A (en) Thread obtaining method and device
CN109347918A (en) Call method, calling device, server, terminal and computer readable storage medium
CN106874079A (en) A kind of method and device of tasks carrying
CN110019974A (en) Implementation method and device are bored under chart
CN110413332A (en) Timed task executes method, apparatus, terminal and computer-readable medium
CN103761128A (en) Instruction execution method, instruction execution device and instruction execution system
CN114840347A (en) MPC platform, calculation power pool allocation method and electronic equipment
CN110009253A (en) A kind of production scheduling method, apparatus, equipment and the storage medium of ship
CN109522534B (en) Task generation method and device for corpus processing
CN110245009A (en) Periodic duty distribution method, device, computer equipment and storage medium
CN112363819A (en) Big data task dynamic scheduling method and device and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180608

RJ01 Rejection of invention patent application after publication