|
|
|
|
|
by baumschubser
522 days ago
|
|
I like long polling, it’s easy to understand from start to finish and from client perspective it just works like a very slow connection. You have to keep track of retries and client-side cancelled connections to have one but only one (and the right one) of requests at hand to answer to. One thing that seems clumsy in the code example is the loop that queries the data again and again. Would be nicer if the data update could also resolve the promise of the response directly. |
|
Websockets are simply a better technology. With long polling, the devil is in the details and it’s insanely hard to get those details right in every case.