| The development of the internet integral marketing model has promoted the exchange of user credits among multiple enterprises,promoted the circulation of points,formed the alliance effect and established a new marketing model of credit universalization.Under this business model,the pressure on integral trading system is increasing day by day.How to build a highly available trading system has become the key of this research.Such scenarios of financial transactions have high requirements on data consistency.The traditional database-based flow integration platform,business model and data storage are heavily coupled,and multiple features of flow integration cause performance bottlenecks in transaction operations.Accordingly,this paper proposes an event-driven system architecture to solve the above problems.Different from the traditional event-driven architecture,this paper integrates the model of event notification,event-carried state transfer,event sourcing and command query resposibility segregation.With domain-driven design as the guiding ideology,this paper analyzes and models the trading system of the flow integral platform,to improve the system throughput based on data consistency.At the same time,taking into account the concept of event sourcing,it is easy to cause the event to be lost due to the upgrade and downgrade of the aggregated root.It improves the concrete realization of event sourcing.By equalizing events and aggregations,it can avoid too much change of business requirements from affecting the underlying logic.To meet the needs of enterprise applications and improve the system robustness and scalability,the trading service unit is integrated into the microservices architecture,and combined with data segmentation,to achieve distributed applications.This paper describes the method of system modeling based on the actual business scenario of the flow integration platform,gives the detailed design and implementation details,and verifies the effectiveness of the flow integration platform trading system based on the event-driven model through the functional testing and performance testing. |