If you're an iPhone user, this scenario probably sounds familiar: You send someone a message, notice that it's been delivered and read, and then watch three little dots hover in a conversation bubble as you wait expectantly for a reply. But how does your iPhone know when the person texting you is typing?
You might have noticed the telltale ellipsis appears only when you're sending and receiving via iMessage; that is, exchanging texts with another user on an iPhone, iPad or iPod Touch. In 2011, Apple introduced iMessage as part of its iOS 5 release [source: Apple]. The iMessage service, which is built into the iPhone Messages app, looks just like texting but works more like an instant messaging application. When you use your iPhone's messaging app to send a text to another iMessage user, your phone recognizes the recipient's Apple ID and automatically sends the message via the iMessage service [source: Apple].
Unlike SMS text messages, which are sent through your mobile carrier's cellular network, iMessage texts are routed through Apple's servers using a technology called Apple Push Notification service (APNs) [sources: Apple, Dilger, iAnswerGuy]. The APNs is based on eXtensible Messaging and Presence Protocol (XMPP), the same system used by Google Talk and Apple's own iChat instant messaging service [sources: Apple, Dilger]. XMPP provides a way for servers to communicate with one another, allowing a user on one server to receive notifications posted through a different server. Whenever you have a network connection, your iPhone continuously checks with the APNs servers to see whether they have anything new to send your way, including text messages, FaceTime calls or alert notifications for other apps [sources: Apple, Dilger]. Because the iPhone at the other end of your text conversation is also communicating with the APNs servers, the servers are able to detect new activity, associate it with your Apple ID and let you know a text is on the way.
If your WiFi or cellular network is unavailable, or if you exchange messages with someone on a different mobile operating system, your iPhone will automatically switch from iMessage to standard SMS texting, leaving you in the dark as to whether anyone has read or begun to reply to your message.