3 ms·
Agreed that websockets would be overkill and probably less reliable, but why not Server-Sent Events[0]? They are quite simple and should get the job done. For
by rauhl 7y ago
Agreed that websockets would be overkill and probably less reliable, but why not Server-Sent Events[0]? They are quite simple and should get the job done. For unidirectional information I find that they’re a pretty decent technology, and one which is surprisingly-often overlooked.
0: https://www.w3.org/TR/eventsource/ https://www.w3.org/TR/eventsource/
- matt_oriordan 7y agoYup, the article covers SSE, long polling and XHR streaming as all vastly superior solutions that would have improved things. So yes :+1:
- q3k 7y agoI would guess it's because they likely weren't supported yet by Google infrastructure at the time of implementation. Or that it was must simpler to just add a pollable endpoint.
- paulddraper 7y agoBrowser support may be holding SSE back. [1] It will be nice once Edge (as branded Chromium) supports it. [1] https://caniuse.com/#search=server%20side%20events https://caniuse.com/#search=server%20side%20events
- Matthias247 7y agoThose still tie up request handlers and connections on the backend side, whereas short request/response requests do not. Those things can in some cases operationally introduce a lot more pain (e.g. in terms of resource exhaustion) than the additional short lived requests.