top | item 2942809

(no title)

hyung | 14 years ago

At its core, our networking layer uses long-polling, but we added several modifications to attempt to keep the requests alive. We also drastically changed the timeout values based on testing directly on the mobile devices.

We found that vanilla long-polling works sometimes on iPhone and some Android phones. But it often introduces huge latencies, and it often just fails for no apparent reason on some Android devices.

discuss

order

chanderson0|14 years ago

To add to this: I wrote a simple socket.io demo app for a class I was teaching that makes these issues apparent. Try opening http://node.heyanderson.com/ on your mobile device and in a browser (Chrome or Safari, preferably) and you'll see the difference in latency.

catshirt|14 years ago

ah, fair enough. though i'd say that sounds like something socket.io should handle, even if it doesn't already- because now you have the obvious disadvantage of using long polling even when sockets are available.