3 ms·
I honestly don't know how Blackberry implements it, but there are a number of ways to accomplish it. Periodic polling (the way you mention) is generally regard
by bmelton 16y ago
I honestly don't know how Blackberry implements it, but there are a number of ways to accomplish it. Periodic polling (the way you mention) is generally regarded as 'bad'.
A better, but similar method is long-tail polling, in which you still poll periodically, but you wait for an answer, and don't time out the connection (or at least, don't time it out quickly.) You just leave the request hanging until you hear a response. If you don't hear a response before you have to time out, you just time out and then open a new long poll, doing the same thing. It's similar to polling every x seconds if there are constantly items to fetch, but if there aren't, it's much better.
Alternately, you can just set up a listener on the phone. I mean, Apache is the ultimate push client - it's just working the wrong way. If the phone number can act as the server IP address, then it just listens for a connection. The 'server' acts as a client, and 'requests' information from the phone whenever there is information to serve it.