Font Size: a A A

Design And Implementation Of Timed Task Subsystem In Game Business Acceptance System

Posted on:2021-01-24Degree:MasterType:Thesis
Country:ChinaCandidate:D C LvFull Text:PDF
GTID:2428330647450853Subject:Engineering
Abstract/Summary:PDF Full Text Request
The game center business acceptance system provides the game with batch processing,punishment center,anti-addiction,notification push and other operational capabilities.In the development and construction of the business acceptance system,a large number of timed tasks emerged that are required to be executed according to schedule,such as message push,ban and unblocking,props distribution,and mail sending.These demand scenarios have business characteristics including a large number of short tasks,the request for non-missing tasks,and the decoupling between various basic business microservices.Therefore,the business acceptance system urgently needs a system that can provide reliable timed task services to meet the above requirements and support the upper-layer basic business.Aiming at the demand scenario of the timed task of the business acceptance system,this thesis designs and implements a lightweight and highly available distributed timed task system.Each basic business module of the business acceptance system can integrate the timed task subsystem lightly,and build a timed task cluster through distributed deployment.Multiple nodes use the highly available Redis cluster to implement the scheduling management of the distributed cluster,and realize functions including dynamic expansion and contraction,failure handling,thereby ensuring the overall high availability.Timed tasks are evenly distributed to each node based on a specific Hash algorithm.Any node alteration can trigger the redistribution of unexecuted tasks to ensure load balancing of tasks among nodes.First of all,this thesis lists the functional and non-functional requirements of the timed task subsystem based on business acceptance system requirements.According to the requirements analysis,this thesis then uses 4 + 1 views to design the architecture of the subsystem.In general,the system is divided into three layers.The top layer encapsulates a unified external interface for easy access,which also reduces the coupling between business code and timed task subsystem.The intermediate layer is divided into three modules: task submission,cluster negotiation,and task execution,which are responsible for the registration and submission of timed tasks,the negotiation and assignment of tasks among nodes,and the execution of timed tasks according to schedule,respectively.To improve system maintainability,the underlying data management layer encapsulates the operations related to the connection of the Redis cluster.Finally,this thesis uses Golang to implement the system.At present,the development process has been completed and the timed task subsystem is now accessed by the notification push service in the business acceptance system and the work order distribution service in customer service system in support of daily operation of games with hundreds of thousands of DAU.
Keywords/Search Tags:Timed Task, Cluster Negotiation, Task Scheduling, Redis Cluster
PDF Full Text Request
Related items