How does segmenfault push messages to the background? I know the front desk is definitely AJAX

  question

First of all, I would like to know, for example, whether this offline message exists in mysql or in nosql database?
Then I want to know his update strategy.
For example, when the client goes online, whether the client goes to the server to fetch data or the server judges whether the user goes online. Once online, what about pushing messages to clients?

Then are these read messages deleted from the database after reading them? Is it deleted after reading, or is it like doing a regular task, such as deleting the read messages at 4am every day?
Is this messaging module asynchronous? But I saw a lot of news reminding that open source program was in sync. (There is no asynchronous framework, such as wecenter, which seems to use php. php itself cannot be asynchronous. Is this message asynchronous or synchronous? “
Because I also don’t understand this piece, it is drunk.
The Great Spirit Relieves Confusion!

  1. Messages can be stored in MySQL, but unread message sequences can be stored in NoSQL, SF should be stored in Redis.
  2. There is no such complicated thinking, that is, the ordinary rotation training, on-line from the server to grasp, rather than the server to push the client.
  3. No, because you can see the read message from the message. However, SF will erase the old data, that is to say, an account can hold up to 300 messages. It seems that earlier will be deleted. I deleted a message about Minutes. Personally, I don’t feel the need to use queues.
  4. Since it is polling, not pushing, it seems meaningless for you to talk about synchronous and asynchronous. If you look at your example, SF should be the same.

At last, I feel that you have confused push and polling. Push is the server pushing messages to the client voluntarily. Polling is the client requesting the server and then the server returns messages. The two mechanisms are different. If it is push, it must be a message queue to let the server push one by one.