July 17, 2015
FastMail Adds Push Support for IOS (And How It Works)
Today, FastMail released push support that works with the Mail app on iOS.
This will make new messages – and notifications for new messages – appear in the Mail app as soon as they are received by FastMail’s server. From their blog post:
We’ve enabled Push IMAP for all accounts and it will activate automatically; you don’t need to do anything. If you haven’t set up your mail on your iPhone yet, follow these step-by-step instructions to get started.
Many thanks to our friends on the Apple mail teams for helping make this possible.
This last sentence piqued my curiosity. FastMail uses IMAP for syncing messages with Apple’s Mail app. Traditionally, push over IMAP uses something called IMAP IDLE. This is what modern desktop mail clients use, but the negative battery impact makes it not feasible on mobile. So how did FastMail implement push for IMAP?
robn answers this question on a Hacker News thread:
IMAP “push” usually means the IDLE extension, where a client holds a connection open and waits for the server to report that something has happened. This works ok, but isn’t great on mobile because holding a TCP connection open is usually difficult on flaky networks and consumes battery.
iOS Mail doesn’t implement it, instead doing a poll every 15 minutes. However it also implements a separate push system which allows true push if the server supports it. The details on how to support this aren’t public information.1
We talked to Apple, and they were kind enough to give us access to this system. We implemented it on our side, and now when an email arrives at FastMail we can immediately signal to Mail.app that there’s new mail available.
This seems perhaps related to Apple’s effort to support alternatives to services offered by major rivals like Google and Microsoft. See also: Apple replaces Google Maps and Apple adds support for the Duck Duck Go search engine.
- For anyone interested in the technical details of how this works, it appears someone was able to build a clean implementation of this without help from Apple (hat tip to hedgehog further down on the HN thread). [return]
Comments? Please send me a message.
Subscribe via RSS or email.