Project

General

Profile

Development #7114

Updated by Kyle Chong 3 months ago

Refer to: docs/planning/modules/M02_Product_Data_Sync.md 

 Implement Product & Master Data Sync (M02) (docs/planning/modules/M02_Product_Data_Sync.md). Sync the Cashier-side master-data synchronization service. 

 Cashier must be able to receive approved offline-safe user credential/permission projection in the same master-data event regardless of whether it arrives through Kafka or LAN. 

 Scope: 

 * Receive events from configured Kafka or LAN transport. 
 * Convert/pass received messages into the common M02 processing pipeline. 
 * Validate Event ID, Entity, Operation snapshot and Version. 
 * Process Add/Create. 
 * Process Update. 
 * Process Delete/Deactivate. 
 * Update the local Cashier database/SQLite. 
 * Prevent duplicate processing. 
 * Prevent older events from overwriting newer local data. 
 * Preserve historical transaction data delta mechanism. Never copy reusable plaintext credentials. Done when master records are deleted/deactivated. 
 * Record processing success/failure. 
 * Perform synchronization a new cashier can log in offline after user change reaches the background without unnecessarily blocking cashier operation. 

 Expected design: 

 Kafka Receiver ─┐ 
                 ├→ Master Data Processor → Local SQLite 
 LAN Receiver ───┘ 

 Done when: Cashier correctly updates its local master data through either Kafka or LAN using the same processing logic. store.

Back