@codewithryan

Note: Depending on your specific project, using SSE you may still result into the same horizontal scaling challenges as WS (e.g. sticky sessions/central sessions store). It entirely depends on what kind of feature you’re implementing and how you're moving data around. But I’ve found that SSE provides a simpler base to implement realtime functionality if the client is mostly just receiving updates.

Someone made a highly scaled MMO game with SSE: https://news.ycombinator.com/item?id=30312897
^^^ That thread also includes some interesting discussions around SSE.

Here's a performance comparison between SSE and WS (spoiler alert: both are pretty much the same): https://www.timeplus.com/post/websocket-vs-sse

@dabbopabblo

I swear to god EVERYthing you talk about is soo god damn relevant to what Im working on at any given time. I am so glad I discovered this channel

@JohnZakaria

At first I thought clickbait but then the video was 100% legit quality content.

@bastian9945

I just watched this on 1.5x and the Quality and Structure of the Information was superb, keep it that way

@AbdullahKhan-x3k1c

SignalR covers all the scenarios you mentioned. By default it will try to use web sockets and gracefully fall back to the other transport types. However you can configure it to use a specific transport type. Just remember, with WS and SSE, you may have to explicitly configure routers

@CameronFlint07

Today I learned! I didn’t know there was an intermediate solution to server-side push between polling and websockets. Great presentation of the options too. Thanks!

@lavenir9907

Hello, thanks for mentioning this technology. This is a good way to get simple one-way events like "server to client", but in most cases, when an application moves to an event-based messaging model, SocketIO or WebRTC is used. SocketIO has a wonderful fallback mechanism for older browsers that uses pooling. At the same time, WebRTC allows you to set up a fast exchange model + additional sugar for working with video, audio and text streams.

@funnycompilations8314

just found your channel (by searching for the differences between Rust and Go) and I must say that your channel is totally underrated. There are many channels with 500k+ subs out there that don't even match the quality this channel has. I also like the simplicity of the channel. I go walking quite often and I can listen to your videos on my headphones because I can understand most of the things just from listening to your voice. Keep up the good work and please make more videos like this where you go through some "slides" and explain/compare things.

@whamer100

wow ive never heard of SSE before, i was just about to start making a project that eas going to need server -> client communication and didn't want to deal with th3 complexity of websockets; this is perfect! great video as well

@ozzyfromspace

This was a superb exposition of Server-sent events, thanks Ryan!

@HollywoodCameraWork

The statefulness of websockets is a feature, not a bug. It allows you to do rigorous authentication once at the front-end API, creating a trusted channel where messages passed to back-end services side-load authentication information that cannot be user-provided, so they don't have to re-do authentication. This creates a single place where authentication happens, and not every single API endpoint on every single back-end node. Eventually something goes wrong if every endpoint is responsible for authentication, and the API becomes porous.

@oskarristolang

that was such a clean video, can't believe what i just watched. very condensed and straight to the point! loved it

@danielgilleland8611

Kudos for talking about this little-known/little-used feature for us web developers!

@foreveryoung6108

This is the best introdution for Websockets, awesome.

@cirosobral

Man, what a great voice! Just found your channel and I'm listening just because it sounds incredible. Keep up with the good job.

@Cyber_Lanka

awesome video Ryan. I wasn't aware of SSE until this.

@BrainInteractive

This is so cool, I did not know this even existed in HTTP until now, thanks!

@GrzesiuG44

If nothing chaged, both pooling and SSE suffer from being included in the count of connections to same host. With browsers limiting their count to 6 by default this was a serious reason to avoid both of them and using websockets instead.

@cellocarlos

You are awesome! I've heard about SSE but never knew how actually do that. Thank you, bro!

@The_Bitruvian_Man

Amazing video! You broke the subject down in a way I can fully understand. Subscribed!