Hacker News new | ask | show | jobs
by hyung 5404 days 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.

2 comments

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.
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.