| In recent years,with the progress of Internet technology,people's living standards are constantly improving and improving,and various convenient online consumer service platforms are also developing rapidly.More and more people choose online consumption service platform in shopping,travel,dining,entertainment and other aspects of life.However,coupons play a role in promoting consumption and attracting users in various online consumption service platforms.The coupon system completes a series of processes such as the creation,review,distribution,and use of coupons,and is a very important part of the online consumer service platform system.In this paper,each micro service in the coupon system under the micro service architecture is independently developed,deployed,operated and maintained.Compared with the traditional single architecture,the coupon system not only reduces the system development cost,but also makes the system have the characteristics of high performance,high fault tolerance,high availability,ductility,reproducibility and easy maintenance.The system is divided into micro-services according to user roles and business functions,including the coupon template creation service for operators,the coupon distribution service for users,and the coupon settlement service for users to use coupons for coupons and settle accounts.Most traditional coupon systems use a single service architecture.With the continuous change and increase of the business functions,the coupling degree between the functional services in the system is high,the performance is low,and it is not conducive to maintenance.Finally,the system will be abandoned because it cannot continue to provide service support and service expansion.Fully aware of the causes of the above problems,this paper,starting from the root of the problem,proposes the subject of the coupon system based on the micro-service architecture,and carries out the design and implementation of the coupon system based on the micro-service architecture.In this paper,the main work is as follows:1.Each micro service in the coupon system under the micro service architecture designed and implemented in this paper is independently developed,deployed,operated and maintained.Compared with the traditional single architecture,the coupon system not only reduces the system development cost,but also makes the system have the characteristics of high performance,high fault tolerance,high availability,ductility,reproducibility and easy maintenance.2.The whole system is developed using the newer Spring Cloud Micro service governance framework technology.Eureka component is used to realize the discovery and registration of each service in the system,which is convenient for the management and maintenance of each microservice in the system.Build the gateway component Zuul to forward the service and realize load balancing to improve the performance of the system.Inter-service calls are made by Fegin in combination with Hystrix and the circuit breaker policy is implemented to make the system highly available.3.In order to achieve high performance of system data processing,firstly,the concept of coupon template was innovatively proposed in the template microservice to complete a large number of coupon creation.Compared with the traditional method of creating coupons directly,this method not only reduces the work pressure of operation personnel,but also greatly improves the performance of the system.4.In the system design of this paper,the data operation mode of storing all the relevant information of users in the system in the cache Redis is proposed,and combining with message-oriented middleware Kafka to complete asynchronous write-back database is completed.It changes the way of direct data operation and database access in the traditional system,which can quickly complete the query,delete,modify and other operations of a large number of user-related information in the system,so that the system can meet the requirements of enterprise-level data processing capacity.In this article on the system the analysis and design of the functional and non-functional requirements,according to the user role and business functions for various business functions of micro service architecture micro services division,with the voucher template for operatingpersonnel to create services,user-oriented coupons distribution services,and ultimately to the user to use coupons for coupons and vouchers of settlement and settlement service.And through the combination of forms,source code,flow chart and other ways will be the system from the overall architecture to the realization of specific functions in each micro service.At the end of the paper,the functional and non-functional verification of the system is carried out and passed,which again proves the excellence of realizing the coupon system under the micro-service architecture.The coupon system implemented by micro-service architecture not only has obvious advantages in performance and availability,but also has strong adaptability.The system can be connected to the vast majority of online consumption service platforms to provide them with the creation,distribution,settlement and other functions of the coupons on the consumption platform,which can greatly improve the usage amount and profit of the online consumption platform. |