How to implement push? Beg you

Source: Internet
Author: User
How to implement push? Sorry, great God RT, I am A little bit, now I am working on A project: our server A network connection [multiple] others' server B, if A new entry msg is added to database B, the msg is pushed to A. after processing the msg to database A, the msg is pushed to the browser that is currently accessing A (multiple users may simultaneously access it) which technologies are used to update data? The easier it is, the better it is. the time is tight and the task is heavy. thank you !!! ------ Solution ------- how to implement push? Beg you
RT, I am A newbie. now I am working on A project: our server A is connected to [multiple] another server B. If the database of B is added with A new entry msg, the msg is pushed to, A pushes msg to the browser that is currently accessing A after receiving the msg into the database for data updates. Which of the following technologies are used in these processes? The easier it is, the better it is. the time is tight and the task is heavy. thank you !!!
------ Solution --------------------
The msg of B is pushed to A, and it is okay to directly use the http post protocol, just like submitting A form in A browser.
A. only two methods are available for pushing to users.
One is ajax + php, fake push, which is actually an ajax request from the browser every X seconds. ask the server if there is any new product.
The second is nodejs, an event-driven web server. after a browser accesses the server, the IP address of a client server will not occupy the link and will not consume server resources. When php has new messages, it will be sent to nodejs, let him deliver the goods, this should be the real push

Hurry up, Method 1
------ Solution --------------------
Reference:
Quote: reference:

Pushing between servers is simpler. to push to a specified user is a little more complicated, you can use the JS timed request (passive) method on the client side. This may be the most done method. The lowest development cost
What should I do during the service period? What is the appropriate interval for client-side timed requests? This project has high requirements on real-time performance.


The server simply uses curl for POST. the duration of the client depends on the message density in actual conditions, and the server load at the refresh frequency.
------ Solution --------------------
Server-to-server push can be implemented using soap.

I wrote an example: http://blog.csdn.net/fdipzone/article/details/21810347.

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.