What I mean by that is client sends request, server responds in up to 2 minutes with result or a try again flag. Either way client resends request and then uses response data if provided.
Server-Sent Events: an alternative to WebSockets
51–60 of 266 posts
Re: Server-Sent Events: an alternative to WebSockets
#52My experience with sse is pretty bad. They are unreliable, don’t support headers and require keep-alive hackery. In my experience WebSockets are so much better. Also ease of use doesn’t really convince me. It’s like 5 lines of code with socket.io to have working websockets, without all the downsides of sse.
Read my comment below about that.
Re: Server-Sent Events: an alternative to WebSockets
#53Re: Server-Sent Events: an alternative to WebSockets
#54Is it worth upgrading a long polling solution to SSE? Would I see much benefit? What I mean by that is client sends request, server responds in up to 2 minutes with result or a try again flag. Either way client resends request and then uses response data if provided.
Comet-stream and SSE will save you alot of bandwidth and CPU!!!
Re: Server-Sent Events: an alternative to WebSockets
#55Did research on SSE a short while ago. Found out that the mimetype "text/event-stream" was blocked by a couple of anti-virus products. So that was a no-go for us.
Re: Server-Sent Events: an alternative to WebSockets
#56Earlier quoted context omitted.
Can you explain how H2 would make it harder to scale SSE?
The mistake they did was to assume only one TCP socket should be used; the TCP has it's own head-of-line limitations just like HTTP/1.1 has if you limit the number of sockets (HTTP/1.1 had 2 sockets allowed per client, but Chrome doesn't care...) it's easily solvable by using more sockets but then you get into concurrency problems between the sockets. That said if you, like SSE on HTTP/1.1; use 2 sockets per client (…
Re: Server-Sent Events: an alternative to WebSockets
#57I’m a huge fan of SSE. In the first chapter of my book Fullstack Node.js I use it for the real-time chat example because it requires almost zero setup. I’ve also been using SSE on https://rambly.app to handle all the WebRTC signaling so that clients can find new peers. Works great.
Re: Server-Sent Events: an alternative to WebSockets
#58Earlier quoted context omitted.
Absolutely not, HTTP/1.1 is the way to make SSE fly: https://github.com/tinspin/rupy/wiki/Comet-Stream Old page, search for "event-stream"... Comet-stream is a collection of techniques of which SSE is one. My experience is that SSE goes through anti-viruses better!
> My experience is that SSE goes through anti-viruses better! Hmm, another commenter says the opposite: https://news.ycombinator.com/item?id=30313692
Re: Server-Sent Events: an alternative to WebSockets
#59Earlier quoted context omitted.
I managed to get through almost all middle men by using 2 tricks: 1) Push a large amount of data on the pull (the comet-stream SSE never ending request) response to trigger the middle thing to flush the data. 2) Using SSE instead of just Comet-Stream since they will see the header and realize this is going to be real-time data. We had 99.6% succes rate on the connection from 350.000 players from all over the world (e…
While 350k simultaneous connections is nice, I'd be extremely skeptical of that being any kind of world record
Re: Server-Sent Events: an alternative to WebSockets
#60Earlier quoted context omitted.
I managed to get through almost all middle men by using 2 tricks: 1) Push a large amount of data on the pull (the comet-stream SSE never ending request) response to trigger the middle thing to flush the data. 2) Using SSE instead of just Comet-Stream since they will see the header and realize this is going to be real-time data. We had 99.6% succes rate on the connection from 350.000 players from all over the world (e…
While 350k simultaneous connections is nice, I'd be extremely skeptical of that being any kind of world record
350.000 was the total number of players during 6 years.