What did Segmenfault's message push backstage do? I know the front desk is definitely Ajax

Source: Internet
Author: User
First I want to know if this offline message exists in MySQL or in a NoSQL database?
Then I would like to know his update strategy.
For example, when the client is on-line, the client to the server to fetch data or the server to determine whether the user is online. Push the message to the client once it's online?

And did these read messages get erased from the database after they were read? Is it finished to delete or for example a scheduled task, such as the Daily 4 o'clock in the morning unified deletion of read messages?
Is this message sending module an asynchronous one? But I see a lot of news to remind the Open source program is synchronized. (There is no asynchronous framework such things, such as Wecenter, it seems that the use of php,php itself can not be asynchronous, the message is asynchronous or synchronous "to seek doubts!"
Because I do not understand this piece, said is also drunk.
The Great God doubts!

Reply content:

First I want to know if this offline message exists in MySQL or in a NoSQL database?
Then I would like to know his update strategy.
For example, when the client is on-line, the client to the server to fetch data or the server to determine whether the user is online. Push the message to the client once it's online?

And did these read messages get erased from the database after they were read? Is it finished to delete or for example a scheduled task, such as the Daily 4 o'clock in the morning unified deletion of read messages?
Is this message sending module an asynchronous one? But I see a lot of news to remind the Open source program is synchronized. (There is no asynchronous framework such things, such as Wecenter, it seems that the use of php,php itself can not be asynchronous, the message is asynchronous or synchronous "to seek doubts!"
Because I do not understand this piece, said is also drunk.
The Great God doubts!

    1. Messages can exist inside MySQL, but unread message sequences can exist in NoSQL, and SF should be inside the redis.
    2. There is no such a complicated idea, is the ordinary rotation, on-line from the server grabbed, rather than the server to push the client.
    3. No, because you can see the read message from the message. However, SF clears old data, which means that an account can save up to 300 messages, which seems to be deleted earlier. Delete a message minutes of things, I personally feel no need to use the queue.
    4. Because it's polling, not pushing, so here you talk about synchronous asynchrony doesn't seem to make sense. If you look at your example, SF should be the same.

Finally it feels like you've got the push and poll mixed up, the push is that the server is actively pushing messages to the client, and polling is the client requesting the server and then the server returns the message. These two mechanisms are not the same. If it is a push, it must be a message queue to let the server a push compared to cool.

He's not Ajax, it's websocket.

  • 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.