Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by rvanmil on Monday March 18, 2024 @01:39PM
(#39747423)
Or, if you’re building for clients with a traditional “enterprise” and “secure” IT infrastructure: add refresh buttons and call it a day.
If there’s one thing in my experience that consistently fails in these environments and cannot be fixed due to endless red tape, it’s trying to make real-time work for these type of clients.
[ Parent
| on HN ]
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by chgs on Monday March 18, 2024 @02:30PM
(#39748083)
My browser has a refresh button. Alas your application likely breaks when I use it.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by rvanmil on Monday March 18, 2024 @02:53PM
(#39748420)
Not entirely sure why it would break…?
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by klysm on Monday March 18, 2024 @05:12PM
(#39750084)
client side state that isn't in the URL or local storage
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by chgs on Monday March 18, 2024 @06:20PM
(#39750756)
Clearly I don’t know what your application is, but many heavyweight “web apps” don’t cope with a simple refresh, kicking back to a default screen or even login screen in some cases.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by hobobaggins on Monday March 18, 2024 @08:27PM
(#39751696)
Sometimes this is to scope logins to single tabs for security reasons (I think that's why Userify does it that way). It's annoying but for infrequently used apps, no worse than getting logged out every three minutes.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by wruza on Tuesday March 19, 2024 @06:11AM
(#39754290)
Also some apps ignore simple refresh and only react to hard refresh (ctrl-f5 and alikes). Refresh is as unreliable as other methods from user pov.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by WuxiFingerHold on Wednesday March 20, 2024 @12:06AM
(#39762771)
In this threads context of sending specific application data from the server, I don't think this will happen.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by cbsmith on Monday March 18, 2024 @02:42PM
(#39748254)
Honestly, all the techniques for this stuff have their problems, including the refresh button.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by rvanmil on Monday March 18, 2024 @02:51PM
(#39748393)
True, though when carefully implemented it’s the most reliable option I guess.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by cbsmith on Monday March 18, 2024 @02:54PM
(#39748426)
I've switched to using SSE to get around problems with the refresh button. It's pretty simple and reliable.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by rvanmil on Monday March 18, 2024 @03:32PM
(#39748903)
That’s great. Unfortunately I’ve seen SSE fail quite a few times in the scenario I described.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We...
by palmfacehn on Tuesday March 19, 2024 @12:47AM
(#39753031)
Jetty/CometD will fall back to long polling if other transports are not available.