Friday 15 July 2011

jquery - How to implement Server push / long polling / comet using PHP and Javascript -


How can I apply Comet / Server push design patterns using PHP and Javascript? Basically what I want to do:

  • The user clicks on a 'Submit' button
  • JavaScript shows a message like 'processing 0/100 item'
  • Once a new item is processed, php / server pushes an update, and javascript changes the message to '2/100 items processing, 3/100 items and so on'.

How can I do this? Any links / info please?

There are some difficult topics with comet scaling with PHP, an option would be a mother-in-law solution, such as (Disclaimer: I work there). In this way you do not have to worry about any behind the scenes stuff, and you can only get your server-push functionality.


No comments:

Post a Comment