Skip navigation
This discussion is archived

iPhone 3G, Fetch vs. Push - What are the differences?

74705 Views 4 Replies Latest reply: Jan 20, 2011 12:21 PM by roaminggnome RSS
MobileDev Level 3 Level 3 (565 points)
Currently Being Moderated
Jan 20, 2011 8:44 AM
I've seen quite a few postings here where otherwise smart people claim that the "Push" mail/etc synchronization used by the iPhone never transmits any data until there is something to send. Here are the facts:

*BOTH Fetch and Push ping the server.*

+Sometimes Push will even ping more often.+ Fetch always pings at a certain interval that you set. Push's interval is dynamic and changes depending on network TCP/IP connection longevity. It can vary from every few minutes to well over half an hour.

*The main difference is in how quickly the server responds.*

Fetch = Phone sends request. Server replies immediately. Wait a while. Repeat.

Push = Phone sends request with a timeout. Server replies immediately, OR when mail arrives, OR just before the timeout. Repeat.

*I'm confused. Why does Push have to ping at all? Doesn't it just magically send some kind of notification to the phone?*

Sorry, no magic in this case. The server must know your IP address to respond to, and the phone must be waiting for that response.

Mobile IP connections are volatile. Your IP address can change. The connection will be dropped by the carrier if they don't see traffic. The connection can be dropped if a firewall along the network path has a smaller timeout. If you're on EDGE and you answer a phone call, the data connection stops working as well.

Anything that interrupts the connection, means the server can't respond with a notification.

So the Push agent on the phone creates a connection and then pings over it as often as need to keep the connection alive. Push figures out the correct ping interval by whether or not it hears from the server within the last timeout period that it used.

To use an analogy: Fetch is like calling a friend every 15 minutes to see if there's any news. Push is like calling your friend, then putting them on speakerphone and waiting for them to speak. (That way, you get the news immediately.) But if they never reply, the connection automatically drops. So every once in a while you call out "Are you still there?"
Touchscreen laptop and industrial handhelds, Other OS
  • Zipidy Level 1 Level 1 (25 points)
    So does this PROVE that PUSH drains battery life faster than FETCH?
    Dell, Windows XP
  • SourdoughJosh Level 1 Level 1 (130 points)
    Currently Being Moderated
    Jan 20, 2011 8:45 AM (in response to Zipidy)
    From the original post: "Sometimes Push will even ping more often. Fetch always pings at a certain interval that you set. Push's interval is dynamic and changes depending on network TCP/IP connection longevity. It can vary from every few minutes to well over half an hour."

    So the answer to your question would be, once again, "it depends."
    MacBook Pro, Mac Pro, iPhone 3G, Mac OS X (10.5.4)
  • roaminggnome Level 10 Level 10 (89,200 points)
    Good explanation! That make sense.

    Thanks MobileDev.
    powerbook g4, Mac OS X (10.5.1), airport express, iphone, ipod

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)

This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.