javascript - How to design a subscription and push message similar to Zhihu
学习ing
学习ing 2017-06-10 09:49:25
0
1
818

Function:

  1. Users can follow other users or questions, but they can receive messages when other users update answers or when questions have new answers

  2. Users can process messages as read or unread, and can know the number of unread messages

Confuse:

What technologies need to be used under node? There are message queue subscriptions (redis?)
How should the database table be designed? It feels like each user has his own independent data that needs to be stored....

学习ing
学习ing

reply all (1)
学霸

I think it’s just a table that saves users’ followers. Every time you want to get push information, just go to their personal database to get updated items based on your followers and then feed back. In fact, because push is not a function that requires high accuracy, it can be updated while the user is browsing the page, so it will not have much impact on the experience. Just look at your own needs.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!