r/programming • • Jun 13 '19

WebSockets vs Long Polling

https://www.ably.io/blog/websockets-vs-long-polling/
581 Upvotes

199 comments sorted by

View all comments

Show parent comments

10

u/intuxikated Jun 13 '19

Haven't used either, but it seems like the people at TutaNota had the opposite experience, + improved battery life on SSE for their android app: https://f-droid.org/en/2018/09/03/replacing-gcm-in-tutanota.html This is however for an android app, not a browser app (used as google cloud messaging replacement)

10

u/Ravavyr Jun 13 '19

Makes sense. SSE doesn't require the app to do anything. The server pushes to it. Websockets has both client and server "aware" of the other and sending/getting pingbacks, so battery usage is going to be more.

0

u/Ravavyr Jun 13 '19

Makes sense. SSE doesn't require the app to do anything. The server pushes to it. Websockets has both client and server "aware" of the other and sending/getting pingbacks, so battery usage is going to be more.