Font Size: a A A

Design And Implementation Of Distributed Timing Task Scheduling System Based On Quartz

Posted on:2023-08-29Degree:MasterType:Thesis
Country:ChinaCandidate:H X PengFull Text:PDF
GTID:2558307058997369Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of the Internet and promotion of software systems,more and more business scenarios require timing tasks to complete certain business functions.For example,the visitor expiration cleaning in the network admission system,the timing notification in the conference reservation system and the balance reminder in the billing system,etc.At the same time,many business scenarios put forward stricter requirements on the trigger conditions and reliability of timing tasks.Although some traditional timing task solutions can implement simple timing task functions,they do have some problems such as insufficient triggering accuracy,single point of failure,inability to centralize management and control,high task coupling,unbalanced load,etc.To solve the problems in the above-mentioned traditional timing task scheme,this thesis designs and implements a Quartz-based distributed timing task scheduling system.It can not only achieve second-level triggering,centralized management and control,high availability of timing tasks,but also reduce the coupling of the system.The main contents of this thesis are as follows:(1)Complete system requirement analysis and overall design.Oriented towards the actual business scenarios of the enterprise,this thesis proposes the functional and non-functional requirements of the system,and then completes the overall design.To solve the problem of single point of failure in traditional timing tasks,this thesis uses a distributed master-slave architecture to solve it.To solve the problem of coupling task scheduling and execution flow in Quartz,this thesis uses Zookeeper’s election mechanism to decouple task scheduling and execution flow.To solve the problem of insufficient trigger accuracy of the timing task,this thesis uses Quartz to ensure the second-level triggering of the timing task.(2)Researched a hybrid load balancing strategy based on gray correlation.To solve the problem of unbalanced load of task execution nodes in Quartz,the load balancing algorithm is studied,combined with the idea of weighted round-robin and weighted minimum number of connections algorithm,and a hybrid load balancing strategy is proposed.To solve the defects of empirical evaluation of server performance parameter weights,the gray correlation method is used to model and evaluate,and more reasonable weights are calculated.Finally,this thesis uses simulation experiments to illustrate the effectiveness of the hybrid load balancing strategy based on gray correlation.(3)Complete the detailed design,implementation and testing of the system.This thesis introduces the design of the main functional modules in the system in detail.In the timing task scheduling module,to solve the problem of generating timing task instances,this thesis designs a task instance dynamic generation strategy and a time window strategy.In the timing task log management module,this thesis uses Kafka and Elasticsearch to complete log transmission and storage.In the cluster management module,this thesis uses Zookeeper to manage the server and elect the master node in the system.This thesis uses class diagrams to illustrate the design structure of the key classes in the function module and describe its functions.On this basis,Spring Boot is used to implement the specific logic of each functional module of the system.Through functional and non-functional tests,it is verified that the system meets the design requirements in both functional and non-functional aspects.In conclusion,based on the open source framework Quartz,this thesis designs and implements a distributed timing task scheduling system,which solves the coupling of task scheduling and execution process in the traditional timing task system,the unbalanced load of task execution nodes and the high pressure of public database access,etc.It improved the company’s ability to manage and develop timing tasks effectively.
Keywords/Search Tags:Timing task, Quartz, Load balancing, Zookeeper
PDF Full Text Request
Related items