4 ms·
Server-sent events might be a good fit here. Note that SSE belongs to the content layer (HTML) rather than the transfer layer (HTTP) so its specifically about
by jungturk 8y ago
Server-sent events might be a good fit here.
Note that SSE belongs to the content layer (HTML) rather than the transfer layer (HTTP) so its specifically about notifications to active clients about content changes to resources they're observing.
Here's someone describing their experience with it: https://medium.com/axiomzenteam/websockets-http-2-and-sse-5c24ae4d9d96 https://medium.com/axiomzenteam/websockets-http-2-and-sse-5c...
- jondubois 8y agoThe fact that the SSE connection is unidirectional makes it impossible to quickly and efficiently detect disconnection from the server-side; this costs extra in terms of performance. Also, SSEs make it essentially impossible to implement features like real-time user online/offline presence and automatic renewal of authentication tokens (without closing the previous real-time/SSE connection).
- jungturk 8y agoGood points about the limitations - SSE certainly won't be useful for lots of scenarios and you might prefer resorting to traditional approaches in those scenarios (in lieu of or in concert with an SSE channel).