real time - Implementing realtime apps on the iPhone? -
things presence notification needed im messenger apps have. kik , managed improve texting experience many-fold.
if web application, comet implementation , run event loop server handle connections , keep either flash/web socket or long polling connection open on client (socket.io ftw).
i'm not sure iphone, connections on 3g+wifi , all: - maybe nsurlrequest handles stuff , it's simple keeping long running long polling connection on background thread , register notifications onto it?
anyways, appreciate pointers who's implemented realtime on iphone.
well i'll respond other peoples' reference:
you can use node.js socket.io basically, , implement long polling on iphone. there's library somewhere iirc, it's relatively simple implement yourself:
- implement state machine of sorts on phone switch between open request , getting data, fire off request.
- implement heartbeat (you don't want hit http timeout anyways) of 5 seconds, read socket.io github page more info on protocol can interface node.
Comments
Post a Comment