Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The more generalized takeaway from this is that you shouldn't use a heavyweight listener to handle polling (or websockets in the near future) if you can avoid it.

PHP was the culprit here, but I can't help but think you'd have had the same problem if you were trying to do the same thing with RoR, any Java app server, or any of the Python frameworks.

Likewise, node.js or Twisted probably would have been an equally effective replacement.



I'd probably go with node.js for this task - more manageable. Twisted has a huge learning curve.


If you want to stick with Python, tornado is a really good async server without all the learning curve of Twisted.


I wrote my own async servers and having done that (and used Tornado), I'm back on threads :) Async is kind of cool in some cases (long polling for one), but for most cases it's pain.

Right now mostly working on CherryPy's WSGI server.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: