CN109002353A - A kind of JAVA unifies task central dispatching method - Google Patents

A kind of JAVA unifies task central dispatching method Download PDF

Info

Publication number
CN109002353A
CN109002353A CN201810933427.5A CN201810933427A CN109002353A CN 109002353 A CN109002353 A CN 109002353A CN 201810933427 A CN201810933427 A CN 201810933427A CN 109002353 A CN109002353 A CN 109002353A
Authority
CN
China
Prior art keywords
task
queue
execution
cancel
retry
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
CN201810933427.5A
Other languages
Chinese (zh)
Inventor
宋国徽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Wutong Network Technology Co Ltd
Original Assignee
Beijing Zhongke Wutong Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhongke Wutong Network Technology Co Ltd filed Critical Beijing Zhongke Wutong Network Technology Co Ltd
Priority to CN201810933427.5A priority Critical patent/CN109002353A/en
Publication of CN109002353A publication Critical patent/CN109002353A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of JAVA to unify task central dispatching method, includes the following steps: to access task by unified task api interface;The share tasks of access are distributed on local server or network server;It is lined up to task processing, the present invention passes through unified task interface, provides enough task schedule extension points, and flexibly, distributed task dispatching avoids task duplication from executing for configuration, realizes that flexible, efficient task automatically switches implementation strategy.

Description

A kind of JAVA unifies task central dispatching method
Technical field
The invention belongs to task dispatcher technical fields, and in particular to a kind of JAVA unifies task central dispatching method.
Background technique
In computer software programming, the job scheduler of any stricti jurise all provides the directly specified execution time, deposits Storage job information is customized to a variety of introductions and using hook and other more functions, now leads several mainstreams to be used Job scheduler is suitble to simple scheduling such as the primary Timer scheduler of JDK, but configures simply, cannot support flexible dispatching, can only Task serialization executes, and previous task result influences latter task, at runtime if there is a timed task, generates not The exception of processing then all timed tasks can all stop, being affected, is holding then this current thread will stop It needs to repeat to create when row, no thread pool concept, resource can not be shared;And simple scheduling is suitble to for thread pool task schedule, Task execution time interval is not fixed, and is not supported complicated scheduler task, can not also be accomplished task colony dispatching;For Quartz Task schedule is suitble to complicated scheduling, but learning difficulty is big, is not easy to grasp, and time rule change is inconvenient, cannot distinguish between level set Group or vertical cluster.
It can see from the scheduler of above-mentioned mainstream, the various scheduling for executing scheduler are required to learn, and learning cycle is long, Some task schedules can not accomplish distribution, and task configures disunity, more scattered, it is difficult to manage, nothing conveniently manages From the background, it is difficult to adjustment in time, while task schedule is easily lost without persistence, is difficult to restore.Existing for the scheduler of mainstream not Foot place, so that these schedulers are difficult to the job scheduler as a complete meaning.
Summary of the invention
According to above-mentioned elaboration, the purpose of the present invention is to provide a kind of JAVA to unify task central dispatching method, using depth Degree encapsulation Timer task schedule, encapsulates thread pool task scheduling strategy, depth encapsulates Quartz task schedule center, and provides Enough extension points configure for customizing on task schedule line, realize integrated distributed lock, integrated distributed task schedule is kept away Exempt from task duplication execution.
Technical solution provided by the invention:
A kind of JAVA unifies task central dispatching method, includes the following steps:
Q1, pass through unified task api interface, access task;
Q2, by task dispatcher, the share tasks of access are distributed on local server or network server;
Q3, it is selected in any local server or network server after idle server is connected to task, the service of calling is held Row then calls service execution to finish, if implementing result is unsuccessful, system judges failure cause, according to mistake such as implementing result success Lose reason, task is divided into: 1, mistake can not execute, then cancel calling, and 2, can execute, then task, which enters to retry, executes team Column;
Q4, task are lined up in retrying execution queue and enter the step of retrying execution program, repeating Q3, task when such Cancel, then cancels calling;
In retrying execution queue, logger task, which enters to retry, executes program number, given threshold, to entrance for Q5, task It retries and executes queue task and judge, judgement retries task type every time, and after activation threshold value, then task enters team to be checked Column when judging to need to retry execution, into queue is retried, when judgement can not retry, are then held when non-activation threshold value into cancellation Row queue;
Q6, in cancelling queue, such as cancel Mission Success, then task complete, such as cancel task it is failed, then enter Q4 step;
Q7, the task in queue to be checked is analyzed, if judgement can not execute, then terminates to call, as needed to continue to hold Row then enters Q5 step.
The present invention passes through unified task interface, provides enough task schedule extension points, configuration is flexible, distributed task scheduling tune Degree, avoids task duplication from executing, and realizes that flexible, efficient task automatically switches implementation strategy.
Detailed description of the invention
Fig. 1 is flow diagram of the invention.
Specific embodiment
Technical solution of the present invention is clearly and completely described in following accompanying drawings combination specific embodiment, it is clear that institute The embodiment of description is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, Every other embodiment obtained by those of ordinary skill in the art without making creative efforts, belongs to this hair The range of bright protection.
According to Fig. 1, a kind of JAVA unifies task central dispatching method, includes the following steps:
Q1, pass through unified task api interface, access task;
Q2, by task dispatcher, the share tasks of access are distributed on local server or network server;
Q3, it is selected in any local server or network server after idle server is connected to task, the service of calling is held Row then calls service execution to finish, if implementing result is unsuccessful, system judges failure cause, according to mistake such as implementing result success Lose reason, task is divided into: 1, mistake can not execute, then cancel calling, and 2, can execute, then task, which enters to retry, executes team Column;
Q4, task are lined up in retrying execution queue and enter the step of retrying execution program, repeating Q3, task when such Cancel, then cancels calling;
In retrying execution queue, logger task, which enters to retry, executes program number, given threshold, to entrance for Q5, task It retries and executes queue task and judge, judgement retries task type every time, and after activation threshold value, then task enters team to be checked Column when judging to need to retry execution, into queue is retried, when judgement can not retry, are then held when non-activation threshold value into cancellation Row queue;
Q6, in cancelling queue, such as cancel Mission Success, then task complete, such as cancel task it is failed, then enter Q4 step;
Q7, the task in queue to be checked is analyzed, if judgement can not execute, then terminates to call, as needed to continue to hold Row then enters Q5 step.
The foregoing describe basic principle of the invention and advantages.It should be understood by those skilled in the art that the present invention not by The limitation of above-mentioned case study on implementation is merely illustrated the principles of the invention described in above-mentioned case study on implementation and specification, is not being departed from Under the premise of spirit and scope of the invention, various changes and improvements may be made to the invention, these changes and improvements both fall within requirement In the scope of the invention of protection.Claimed range of the invention is defined by the appending claims and its equivalent thereof.

Claims (1)

1. a kind of JAVA unifies task central dispatching method, characterized by the following steps:
Q1, pass through unified task api interface, access task;
Q2, by task dispatcher, the share tasks of access are distributed on local server or network server;
Q3, after selecting idle server to be connected to task in any local server or network server, service execution is called, such as Implementing result success, then call service execution to finish, and if implementing result is unsuccessful, system judges failure cause, former according to failure Task is divided by cause: 1, mistake can not execute, then cancel calling, and 2, can execute, then task, which enters, retries execution queue;
Q4, task are lined up in retrying execution queue and enter the step of retrying execution program, repeating Q3, and task is cancelled when such, Then cancel calling;
Q5, task are in retrying execution queue, and logger task, which enters to retry, executes program number, and given threshold is retried to entering Execution queue task judge, each to judge to retry task type, and after activation threshold value, then task enters queue to be checked, When non-activation threshold value, when judging to need to retry execution, into queue is retried, when judgement can not retry, then enters and cancel Queue;
Q6, in cancelling queue, such as cancel Mission Success, then task complete, such as cancel task it is failed, then enter Q4 walk Suddenly;
Q7, the task in queue to be checked is analyzed, if judgement can not execute, then terminates to call, as needed to continue to execute, then Into Q5 step.
CN201810933427.5A 2018-08-16 2018-08-16 A kind of JAVA unifies task central dispatching method Pending CN109002353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810933427.5A CN109002353A (en) 2018-08-16 2018-08-16 A kind of JAVA unifies task central dispatching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810933427.5A CN109002353A (en) 2018-08-16 2018-08-16 A kind of JAVA unifies task central dispatching method

Publications (1)

Publication Number Publication Date
CN109002353A true CN109002353A (en) 2018-12-14

Family

ID=64593056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810933427.5A Pending CN109002353A (en) 2018-08-16 2018-08-16 A kind of JAVA unifies task central dispatching method

Country Status (1)

Country Link
CN (1) CN109002353A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725998A (en) * 2018-12-26 2019-05-07 亚信科技(中国)有限公司 A kind of task retries method and device
CN110688206A (en) * 2019-09-05 2020-01-14 平安科技(深圳)有限公司 Timing task scheduling method and device, computer equipment and storage medium
CN111459754A (en) * 2020-03-26 2020-07-28 平安普惠企业管理有限公司 Abnormal task processing method, device, medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0491367A2 (en) * 1990-12-19 1992-06-24 Bull HN Information Systems Inc. A queue managing method for an electronic mail system
US20130179881A1 (en) * 2012-01-09 2013-07-11 Microsoft Corporation Decoupling paas resources, jobs, and scheduling
CN104166590A (en) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 Task scheduling method and system
CN104239148A (en) * 2013-06-06 2014-12-24 腾讯科技(深圳)有限公司 Distributed task scheduling method and device
CN106406983A (en) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 Task scheduling method and device in cluster
CN106598705A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Asynchronous task scheduling method, device and system and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0491367A2 (en) * 1990-12-19 1992-06-24 Bull HN Information Systems Inc. A queue managing method for an electronic mail system
US20130179881A1 (en) * 2012-01-09 2013-07-11 Microsoft Corporation Decoupling paas resources, jobs, and scheduling
CN104166590A (en) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 Task scheduling method and system
CN104239148A (en) * 2013-06-06 2014-12-24 腾讯科技(深圳)有限公司 Distributed task scheduling method and device
CN106406983A (en) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 Task scheduling method and device in cluster
CN106598705A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Asynchronous task scheduling method, device and system and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓海川;方旭升: "日志分析系统的任务调度体系结构研究", 《科技信息》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725998A (en) * 2018-12-26 2019-05-07 亚信科技(中国)有限公司 A kind of task retries method and device
CN110688206A (en) * 2019-09-05 2020-01-14 平安科技(深圳)有限公司 Timing task scheduling method and device, computer equipment and storage medium
CN111459754A (en) * 2020-03-26 2020-07-28 平安普惠企业管理有限公司 Abnormal task processing method, device, medium and electronic equipment
CN111459754B (en) * 2020-03-26 2022-09-27 平安普惠企业管理有限公司 Abnormal task processing method, device, medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109002353A (en) A kind of JAVA unifies task central dispatching method
EP2989541B1 (en) Controlling tasks performed by a computing system
CN100585563C (en) Method for servicing task of timer
JP2866241B2 (en) Computer system and scheduling method
US7607124B2 (en) Method for debugging a business process flow
CN105260248B (en) A kind of task scheduling system and dispatching method being dynamically adapted
CN110012062A (en) A kind of multimachine room method for scheduling task, device and storage medium
CN108897610A (en) Method for scheduling task, device, computer equipment and storage medium
US20060036910A1 (en) Automated testing framework for event-driven systems
CN103426045B (en) A kind of circulation method and apparatus of process virtual machine
KR102672394B1 (en) Apparatus for multi-robot task processing organizing service packages through tasks, contexts, and knowledge models
Yoon et al. A multiagent-based decision-making system for semiconductor wafer fabrication with hard temporal constraints
CN103744730A (en) Task scheduling method and device
CN115907413A (en) Cleaning task processing method and device
CN111240819A (en) Dispatching task issuing system and method
CN107632885A (en) The readjustment management method and device of inter-module
Guan et al. Resource sharing protocols for real-time task graph systems
CN113268352A (en) Multi-instruction response type task collaborative management method facing general service robot
CN110780869A (en) Distributed batch scheduling
CN116204289A (en) Process data processing method, terminal equipment and storage medium
CN103995743A (en) Two-stage mixed task scheduling method based on resource reservation
Real et al. Incorporating operating modes to an ada real-time framework
López Martínez et al. Scheduling configuration of real-time component-based applications
Rongfa Adaptive software test management system based on software agents
Burns et al. Dual priority scheduling in Ada 95 and real-time POSIX

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181214

WD01 Invention patent application deemed withdrawn after publication