基于Quartz的分布式定时任务调度模块的设计与实现
【摘要】:随着信息技术的快速发展和企业发展规模的不断壮大,越来越多的企业应用系统出现了因业务场景需求,要求系统在计划的时间点去执行指定的业务操作的情况,这就是“定时任务”的需求。原先只需要部署单个服务器节点就能满足定时任务需求,但随着这种类型需求的不断增多,单台服务器已经满足不了正常的企业运转。于是,多台服务器节点组成的分布式系统应运而生。但是随之而来的问题就是在分布式部署的情况下,定时任务的配置,调度,触发、执行该如何确保正常运转。本文调研了业内常用的分布式定时任务解决方案,包括淘宝的TBSchedule、当当的Elastic-Job和唯品会的Saturn等方案,发现目前这些方案都解决了一部分分布式部署的问题,但也有着各自的缺点。在调研的基础上,本文设计和实现了基于Quartz的分布式定时任务调度系统,首先使用Quartz是因为该框架是定时任务调度的经典框架,提供了强大的定时调度功能,同时开发简单。在使用Quartz开发的基础上,将整个系统分成三个模块:调度模块、执行模块和服务注册中心模块。调度模块负责分布式定时任务的调度逻辑,而执行模块只负责定时任务即业务逻辑的执行处理。这样就能实现定时任务的配置调度与系统业务逻辑的解耦分离,提高系统的可靠性和可扩展性。而调度模块作为任务配置调度触发的主模块,主要包括了任务管理子模块、日志监控子模块和执行器管理子模块。本文的技术路线是:前端使用了FreeMarker模板引擎,后端使用Java语言,基于Spring Boot框架开发,使用MyBatis与数据库进行交互。调度模块基于高性能的开发框架进行开发,相较于传统的分布式定时任务调度系统,具有一定的优势,包括较强的可扩展性和可用性,为定时任务调度的实现提供有力支持,有效地帮助企业实现大部分定时任务调度的需求。
|
|
|
|
1 |
Yuri-Mikhailovich Grishin;Long Miao;Lev-Alekseevich Borisov;Nikolay-Mikhailovich Serykh;Alexey-Yurievich Kulagin;;Applications of two electric arc plasma torches for the beneficiation of natural quartz[J];International Journal of Minerals Metallurgy and Materials;2019年03期 |
2 |
Yang Xing;Wang Haifeng;Peng Zhen;Hao Juan;Zhang Guangwen;Xie Weining;He Yaqun;;Triboelectric properties of ilmenite and quartz minerals and investigation of triboelectric separation of ilmenite ore[J];International Journal of Mining Science and Technology;2018年02期 |
3 |
;Characteristic Analysis of a Powder Quartz Mine in Yunnan Province[J];地学前缘;2009年S1期 |
4 |
;A new way of transformation from a-quartz to coesite[J];Progress in Natural Science;2006年10期 |
5 |
;An experiment study of quartz-coesite transition at differential stress[J];Chinese Science Bulletin;2005年05期 |
6 |
廖兴才,孙雨南,唐琼,崔芳;Drive Signal Frequency-Lock Method Based on 90° Phase Shift for Quartz Angular-Rate Sensor[J];Journal of Beijing Institute of Technology(English Edition);2005年01期 |
7 |
何明勤,刘家军,李朝阳,李志明,刘玉平,杨爱平,桑海清;~(40)Ar-~(39)Ar Dating of Quartz from Ore in the Baiyangping Cu-Co Polymetallic Ore-Concentrated Area, Lanping Basin, Yunnan[J];Chinese Journal of Geochemistry;2004年04期 |
8 |
应汉龙,赵利清;~(40)/Ar~(39)Ar Ages of Auriferous Quartz Veins from the Fengyang and Zhangbaling Regions and Their Geological Significance[J];Chinese Journal of Geochemistry;2003年03期 |
9 |
张友玉,谢青季,姚守拙;In Situ Monitoring of the Generation of Monodisperse Silica Particles during the Hydrolysis of Tetraethyl Orthosilicate with Piezoelectric Quartz Crystal Impedance Analyzer[J];Chinese Journal of Chemistry;2003年02期 |
10 |
魏俊浩
,刘丛强
,唐红峰;Rb-Sr Isotopic Chronology of the Au-Bearing Quartz Veins in Gold Deposits in the Eastern Part of North China Platform[J];Chinese Journal of Geochemistry;2002年04期 |
11 |
刁少波;业渝光;;Average life of oxygen vacancies of quartz in sediments[J];Science in China(Series B);2002年S1期 |
12 |
;A Series Piezoelectric Quartz Crystal Response Kinetics for T.ferrooxidans Growth in the Presence of Cu(Ⅱ)[J];Journal of Central South University of Technology(English Edition);2000年01期 |
13 |
吴宏海,吴大清,彭金莲;Experimental Study on Surface Reactions of Heavy Metal Ions With Quartz—Aqueous Ion Concentration Dependence[J];Chinese Journal of Geochemistry;1999年03期 |
14 |
;In Situ Acquisition of Equivalent Circuit Parameters of Crystal Resonance during Copper Deposition and Dissolution in Acidic Solution by Electrochemical Quartz Crystal Impedance System[J];Chinese Chemical Letters;1999年01期 |
15 |
陈培荣,刘昌实,郝艳丽,沈渭洲;The Tin-Bearing Topaz-Quartz Porphyry,Yangbin Area,Taishun County,Zhejiang Province-A Fluid Inclusion Study[J];Chinese Journal of Geochemistry;1997年02期 |
16 |
;GENESIS AND PROSPECTING PROGNOSIS OF GOLD DEPOSITS IN SHANJIA DISTRICT,EASTERN HEBEI,CHINA (Outline)[J];Geotectonica et Metallogenia;1994年Z1期 |
17 |
谢先德;EDWARD C. T. CHAO;;Studies on the Lattice Distortion and Substructures of Shocked Lamellae in Naturally Shocked Quartz[J];Chinese Journal of Geochemistry(English Language Edition);1987年01期 |
18 |
夏琤,姚孝新;SURFACE FEAT URES OF QUARTZ GRAINS IN GOUGES FROM YISHU FAULT ZONE AND THEIR SIGNIFICANCE[J];Science Bulletin;1988年04期 |
19 |
黄典豪;吴澄宇;聂凤军;;Geological Features and Genesis of the Jinduicheng Porphyry Molybdenum Deposit, Shaanxi Province, China[J];Chinese Journal of Geochemistry(English Language Edition);1988年02期 |
20 |
A.T.Williams,M.C.Thomas;S. E. M. analysis of quartz sand grains from selected Hong Kong and Chinese littoral environments[J];Acta Oceanologica Sinica;1989年03期 |
|