What is the background of segmenfault message push? I know the front-end is definitely AJAX

Source: Internet
Author: User
First, I want to know, for example, whether this offline message exists in mysql or in nosql databases? Then I want to know his update policy. For example, when the client is online, whether the client obtains data from the server or the server determines whether the user is online. I want to know if this offline message exists in mysql or in nosql databases?
Then I want to know his update policy.
For example, when the client is online, whether the client obtains data from the server or the server determines whether the user is online. What if a message is pushed to the client once it is online?

Then, have these read messages been read and deleted from the database? Is it deleted after reading, or is it a scheduled task, for example, deleting a read message at every morning?
Is this message sending module asynchronous? However, I have seen many open-source programs reminding me that they are all synchronized. (There is no asynchronous framework or something like that. For example, wecenter seems to use php. php itself cannot be asynchronous. Is this message sending asynchronous or synchronous!
Because I don't understand this one, and I'm also drunk.
Be confused!

Reply content:

First, I want to know, for example, whether this offline message exists in mysql or in nosql databases?
Then I want to know his update policy.
For example, when the client is online, whether the client obtains data from the server or the server determines whether the user is online. What if a message is pushed to the client once it is online?

Then, have these read messages been read and deleted from the database? Is it deleted after reading, or is it a scheduled task, for example, deleting a read message at every morning?
Is this message sending module asynchronous? However, I have seen many open-source programs reminding me that they are all synchronized. (There is no asynchronous framework or something like that. For example, wecenter seems to use php. php itself cannot be asynchronous. Is this message sending asynchronous or synchronous!
Because I don't understand this one, and I'm also drunk.
Be confused!

  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 not such a complicated idea, that is, the general round training, the launch will be captured from the server, rather than pushing the server to the client.
  3. No, because you can view the read message from the message. However, SF will clear old data, which means that an account can store up to 300 messages, and will be deleted earlier. It's only a matter of minutes to delete a message. I personally feel that there is no need to use a queue.
  4. Because it is round robin, not push, it does not seem meaningless to talk about Synchronous Asynchronization here. If you look at the example, the SF should be the same.

Finally, I feel that you have mixed up the push and round robin. The push server actively pushes messages to the client, and the polling server requests the server and then the server returns the messages. These two mechanisms are different. If it is push, it is necessary to set up a message queue so that the server can push messages one by one.

It's not ajax, it's websocket

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.