3 ms·
I live in a country where latency for websockets is 300-400ms for most hosting services (US/Europe). And the most common internet connection speed 512kbps. Web
by SingAlong 13y ago
I live in a country where latency for websockets is 300-400ms for most hosting services (US/Europe). And the most common internet connection speed 512kbps.
Websockets disconnects for me frequently. So during reconnection, I'll have to reauth in my case.
- untog 13y agoWell it isn't difficult to detect that case and drop back to polling (which should have the exact same latency anyway). Aiming for lowest common denominator in this stuff seems unwise.
- SingAlong 13y agoTotally agree. That's the right way to do it. MogoChat is right now a one-man project, so supporting websockets and then polling seemed tedious, especially with something like Faye or SocketIO missing in Elixir. Phoenix Framework will soon have a high level abstraction over websockets (with Faye-like features). Once that's in, I'll be able to use it.
- yetihehe 13y agoWhy do you have to reauth? Websockets can carry cookies or query strings just like rest. How else do you prevent the need to reauth on every http query?