News for hackers. Stuff that matters.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by arendtio on Monday March 18, 2024 @01:59PM (#39747719)
I wonder why mobile push notifications are just a side-note in this article as mobile clients are responsible for a large part of the global traffic.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by nine_k on Monday March 18, 2024 @02:30PM (#39748088)
Aren't mobile push notifications an entirely different tech, one that significantly uses the capabilities of mobile carriers?
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by arendtio on Monday March 18, 2024 @02:55PM (#39748437)
I don't know about the implementation details, but even the use case is slightly different, as the discussed techs are also meant to transfer larger amounts of data. At the same time, mobile push is more about triggering synchronization than transferring large amounts of data.

However, since the discussed techs all have major problems with mobile connections, I still think it should have been discussed in more depth.

Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by cbsmith on Monday March 18, 2024 @02:43PM (#39748275)
You can do mobile push notifications to a phone even if they aren't connected to a mobile carrier.

That said, I'd argue SSE is the browser equivalent of mobile push notifications.

Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by jallmann on Monday March 18, 2024 @05:36PM (#39750342)
SSE generally requires the page to be active in the foreground, which is not a viable solution for mobile.

Web Push is a distinct API for browsers to emulate native push notifications via service workers. https://developer.mozilla.org/en-US/docs/Web/API/Push_API

Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by cbsmith on Monday March 18, 2024 @06:51PM (#39751007)
I thought it was more that the Document object had to stay alive. ...although, these days a lot of mobile browsers will kill that thing off if the page is not in the background, so yeah...
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by slt2021 on Monday March 18, 2024 @02:40PM (#39748228)
iOS and android push does not rely on mobile carrier capability afaik, it has its own service
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by psnehanshu on Monday March 18, 2024 @05:00PM (#39749953)
Yes, iOS has APNS and Android has FCM. One can use FCM for both Android and iOS as FCM is capable of abstracting away APNS. If you are building on React Native with Expo, you can also use Expo Push, which abstracts away both APNS and FCM, albeit it is not fully featured.