While I understand the concept, I don't understand how someone would implement push on a Palm OS Treo without significant drain on its battery.

The RFC for the IMAP mail protocol's IDLE command seems to keep the TCP connection open for a new mail message. I think that approach is fine for a desktop, but how would a Treo in sleep or REM mode keep its TCP connection open? I would think it would drop pretty much when the screen goes off.

Yet programs like Toccar and Chatter seem to pull it off. I've never used Chatter, but i've also noticed that my battery dies more quickly when I'm online with Toccar.

I can't claim to have read the Treo SDK very closely, but I am interested in how a developer could keep a TCP connection open while the Treo appears asleep or in REM. What's the most power-effiecent way of pulling this off? I'm not going to try and re-implement Chatter or Toccar but I am interested in the "push" idea.

The easiest way to do it would be just to open a incoming socket and get connections, but I know that at least one provider (T-Mobile) doesn't allow that. SMS wake-up in the old Treo Mail style works, but it might require a hefty SMS message count.

Once we have a TCP connection up, a program could just select on its socket and wait for data. The real question is how. I thought of using the Attention or Alarm API to wake up the phone to get more data, but I would think that would make the screen turn on and hence use too much power.

Maybe there's a way to wake up the OS without the screen, and thats how programs like Good do it. Thats the only way I see of the basic aspects of "push" working.

Those are my ideas. I'd like to hear more.