Home  >  Article  >  Backend Development  >  Detailed explanation of how App message prompts are processed in the background

Detailed explanation of how App message prompts are processed in the background

PHP中文网
PHP中文网Original
2017-03-30 15:14:161695browse

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.

Reply content:

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.

  1. Redis stores the number of likes

  2. Regularly synchronize the number of likes in redis to mysql in batches

  3. 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)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn