News for hackers. Stuff that matters.
Re:Heroku WebSockets Now in Public Beta by tlrobinson on Tuesday October 08, 2013 @03:09PM (#6517138)
Is it possible to use something like Socket.io that falls back to long-polling on older browsers?

The biggest problem I've had with Socket.io on PaaS's is it pretty much expects every request from a particular client to be routed to the same backend (i.e. sticky sessions), which works ok with a single backend but obviously doesn't scale.

Given Heroku's stateless routing architecture, I'd guess no, but maybe there's something I'm missing?

Re:Heroku WebSockets Now in Public Beta by philipnuzhnyy on Tuesday October 08, 2013 @04:21PM (#6517571)
My little weekend project (http://chatzilla.herokuapp.com/) that I put on Heroku a few weeks ago uses socket.io with Flask, gevent and socket.io would automatically fallback to XHR polling. Using socket.io is great for these cases since it's all done automagically.
Re:Heroku WebSockets Now in Public Beta by bgentry on Tuesday October 08, 2013 @03:15PM (#6517178)
If it does require sticky sessions, it will not work with more than one dyno: https://devcenter.heroku.com/articles/heroku-labs-websockets...
Re:Heroku WebSockets Now in Public Beta by friism on Tuesday October 08, 2013 @03:18PM (#6517200)
It looks like socket.io has a `RedisStore` that you can use on loadbalancing setups without sticky sessions (like Heroku): https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Soc...
Re:Heroku WebSockets Now in Public Beta by tlrobinson on Tuesday October 08, 2013 @03:52PM (#6517387)
I'm not sure that solves the sticky session problem, I think it may just be for broadcasting to channels. See the last line of this answer: http://stackoverflow.com/a/9275798/113

"A potentially big drawback with this is that socket.io sessions are not shared between workers. This will probably mean problems if you use any of the long-polling transports."