This question is a bit of a shot in the dark and Im not even sure it makes sense at all.
Still : Im quite used to the good ol' LAMP server design but tend to feel I could use some good push technology instead of the very inefficient repeated AJAX calls to pull new data, if any. Is there any way to achieve this without Java servlets (ie using Apache/PHP) ? Is HTML5 giving any hope for a step in that direction ?
I looked into Comet technology but it looks like it's just long-polling AJAX, which is just faking a push technology (I don't really开发者_JS百科 know but it doesnt sound like an efficient way to do push... just a way that works).
I'd suggest reading this: http://today.java.net/article/2010/04/26/html5-server-push-technologies-part-2 as an introduction to HTML5 web sockets and http://www.indicthreads.com/1525/building-real-time-web-applications-using-html-5-web-sockets/. Further Google searches will yield a lot more info. This looks like the way to do push in the most capable browsers as it has advantages over the altenative pre-HTML5 technologies.
As for PHP being the server end point, here's some reading: http://code.google.com/p/phpwebsocket/ and http://www.murraypicton.com/2010/07/websockets-and-php/ and it sure look possible.
The disadvantage of using HTML5 websockets is that it's only supported in some browsers so if you want wide cross-browser support, you will also have to implement an alternate method.
精彩评论