Obviously take this with a grain of salt since I didn't publish anything, but When I did some analysis on battery life impact of HTTP polling vs websockets two years ago, the difference was completely negligible compared to keeping the screen on (which I had to do for the analysis) on the iPhone 4. This makes sense in retrospect, but it appears as if websockets don't have a huge impact.
Re:Heroku WebSocket performance
by beaumartinez on Monday October 28, 2013 @03:04PM
(#6629081)
Correct me if I'm wrong, but isn't the point of web sockets a persistent connection to the server, to facilitate sending updates? You assume the battery life hit in using them.
It'd be interesting to see the trade-offs between web sockets and persistent polling.
I did extensive research on this about 2 years ago for Android. Holding long standing connections is much more efficient than using multiple HTTP requests, polling included.
The reason being mainly the session negotiation and teardown required for making multiple requests, and the fact that the antenna required a higher energy state for creating a new connection compared to keeping an existing connection open.
Re:Heroku WebSocket performance
by thatthatis on Monday October 28, 2013 @05:46PM
(#6630061)
Is it the same result using cellular vs. using wifi?
Somewhat, but multiplicative. Wifi requires a good deal more power to begin with, and the high power state of wifi is one of the biggest drains on battery life (after the screen).
Re:Heroku WebSocket performance
by djb_hackernews on Monday October 28, 2013 @02:57PM
(#6629033)
What is it about an open connection that would drain the battery? It's not like it has to consume a thread in a busy wait.
If so, it seems that neither option is very respectful of mobile users' battery life...