About This Architecture
Event-driven reward calculation lifecycle orchestrating eight sequential phases from upstream order events through settlement, leveraging MQ Consumer, Rule Engine, and distributed locking for consistency. Upstream events (OrderInstall, AfterSale, ShopReceive, TransferProperty) flow through MQ into RewardMatchService, which applies 15 eligibility rules via EasyRules before generating flow records across order, product, and attendance strategies. RewardOrderFlow Service, IndicatorProgress AggregateService, and RewardProgress Service process flow-to-detail transformations with gameplay forks for CHALLENGE and PK_RANKING activities, using Redis/MySQL/HBase for state persistence and distributed locks to prevent race conditions. This architecture demonstrates how to build scalable, rule-driven incentive systems that handle forward and reverse flows while maintaining data consistency across microservices. Fork this diagram on Diagrams.so to customize rule sets, add new event types, or adapt the settlement strategy for your reward platform.