Wim Jongeneel
Oct 14, 2023

--

No its not anything like polling. If you're polling you're constantly creating new connections to send the server a message and it will send potential updates back. Polling will always be out of date because of the retry interval and has a pretty big overhead.

With SSE you open one connection once and the server decides when it wants to push data to the client. The latency is much smaller this way (like muuuuch smaller) and there is no retry interval creating delays. The best example of this technology being used in practice is the map on takeaway website that is updated when the server has new data.

Websockets could do the same, but have a much bigger server-side overhead because they are always listening as well.

gRPC is not a valid alternative because its not part of browsers.

--

--

Wim Jongeneel
Wim Jongeneel

Written by Wim Jongeneel

Software Engineer at Mendix (Rotterdam, The Netherlands) • Student MSc Software Engineering • Functional programming enthusiast

No responses yet