search

Home  >  Q&A  >  body text

javascript - How to design a subscription and push message similar to Zhihu

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学习ing2756 days ago922

reply all(1)I'll reply

  • 欧阳克

    欧阳克2017-06-10 09:51:25

    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.

    reply
    0
  • Cancelreply