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

So you think polling is the most effective solution, it is perhaps the case.

I was thinking whether using something like gevent or Tornado, a bit like nodejs, would enable the webserver to keep the socket open without blocking while the computation is made in a worker, then return the result simply to the socket, thus avoiding having to write a more complex websocket-based or polling-based system, but rather using AJAX transparently :)



Doing non-blocking is tricky, and I'm not convinced that Python's solution are where I'd like them to be on this topic. Also keep in mind that a number of open TCP connections is also a finite number, so you can't really scale well with websockets that way, IMO. But again, it depends on your use case.




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

Search: