Server-Sent Events explained
Server-Sent Events are a great way to solve one particular shortage of HTTP protocol, which is an asynchronous server to client communication.
HTTP itself is a request-response protocol and this is great – until you need to implement notifications, direct messages, or a similar feature. A backend server cannot send a message if the client didn’t ask for it explicitly.
Of course, there are WebSockets, but are we aware of the alternatives? Server-Sent Events is a technology, which allows us to push messages from a server to a browser in an asynchronous way. This is possible only in that direction, but isn’t it exactly what we miss in HTTP?