Wtf are Server Sent Events (SSE)?
Real-time data with a simple solution.

Just a guy who loves to write code and watch anime.
Search for a command to run...
Real-time data with a simple solution.

Just a guy who loves to write code and watch anime.
No comments yet. Be the first to comment.
Qualities that make outstanding builders.

Bipedal vs quadrupedal: how many legs This is about the number of legs the creature walks on. Bipedal. Two legs. Humans, ostriches, T-rex, kangaroos, most fantasy humanoids. Quadrupedal. Four legs. Do

Intro You hear "lerp" and "smoothstep" everywhere in game dev. They sound like math jargon. They're not. Both are small tools that do the same job: smoothly move from one value to another. The problem

What is Kinematics Kinematics is the math field. It's the study of how things move without worrying about forces (which would be dynamics). FK and IK are the two branches: forward kinematics and inver

Intro Textures are usually the biggest cost in a 3D scene. Memory, bandwidth, and load time all get eaten by them. Resizing them is the obvious lever. There's more. This post is about the less obvious

Let's say you need fresh information.
Imagine you're following a live sports match on a website. You constantly have to refresh the page to see the latest scores. This can be frustrating and inefficient.
This issue isn't just limited to sports scores. It applies to any situation where you need up-to-date information, like stock prices, news updates, etc.
SSE solves this problem by allowing the server to push new data to the browser automatically. It's like having a personal assistant who gives you updates the moment they come in, without you having to ask repeatedly.
Establish Connection: When you open a website with SSE, it establishes a persistent connection to the server.
Receive Updates: Whenever there’s new information, the server sends it directly to your browser through this open connection

Think of SSE like a radio broadcast. You tune in (open a website), and the station (server) continuously sends you music and news (data). You receive everything live, but you can't communicate back through the radio.
Real-Time Updates: Information is updated live, without manual refreshing.
Efficient: Reduces server load compared to constant polling.
Simple to Implement: Easier to set up on the server compared to technologies like WebSockets.
Unidirectional: Only the server can send data. The client can't send data back through this channel.
Browser Support: Not all browsers fully support SSE.
Not Suitable for High-Speed Interactions: For rapid, two-way interactions (like gaming), WebSockets are better.
Server Sent Events.
It's an elegant solution to receive real-time updates from the server.