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.