An App usually has a message center where the system will push notifications of how many people have liked you. After clicking on the message center to view the messages, the number of messages will be cleared. If not checked, this number will keep increasing. If viewed, the number of likes will start counting again. I want to know how to do the corresponding processing in the background, how to process such logic, and where the data is stored in redis or mysql and other database tables.
An App usually has a message center and the system will push the number of people who have liked you. After you click to view the message center, the number of messages will be cleared. If not checked, this number will keep increasing. If viewed, the number of likes will start counting again. I want to know how to do the corresponding processing in the background, how to handle such logic, and where the data is stored in redis or a database table such as mysql.
Redis stores the number of likes
Regularly synchronize the number of likes in redis to mysql in batches
nosql or disk or hdfs to store the likes log, such as who liked what at what time. Useful for data analysis, tracking issues, and data proofreading
The above is a detailed explanation of how the App message prompts are processed in the background. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!