Monday, August 2, 2010

Push Email

One of my colleagues requested me to explain push email. I wrote up a brief description and was rather pleased with it (I guess my expectations/standards aren't that high these days..) so thought I'd post it on my blog. So here it is..

1. There are two options with respect to informing the handset about the presence of new messages at the server:
- Using IP
- Using SMS

2. If the SMS method is used all the issues of keeping the IP connection up and knowing the IP address go away. WAP Push can be used in conjunction with SMS. There is also an OMA standard on the format to be used when sending email notifications over WAP Push. Microsoft used to use SMS in one of their earlier solutions. However SMS involves additional cost/integration so is not preferred. 

3. If the new message notification has to be sent using IP:
- the phone needs to maintain IP connectivity.
- the server needs a protocol to send the information to the handset.
- the server also needs to know the IP address of the phone if it is initiating the data   transfer (as opposed to responding to a request from  the handset).

4. In GPRS (and I think 3G) networks, the IP address is assigned by the GGSN. The phone will have the same IP address as long as the same PDP context is retained. In other words, even if it moves to a different area (under a different SGSN), it will have the same IP address.

5. The client and server will exchange some kind of keep-alive messages in order to prevent timeouts that will close the connection. The timeouts could happen on the server (TCP connection timeout or application protocol timeout) or in the NAT gateway. The keep-alive interval needs to be configured appropriately based on the network.

6. The notification of new messages can be sent to the handset in response to a request from the handset. For e.g. Microsoft Exchange informs the handset of new messages as a response to a long lived HTTPS request. I guess some other solutions may be sending this information in response to an IMAP IDLE command. As the information is being sent in response to a client request, the server knows the IP address associated with the client

7. It is possible that some solutions allow the server to inform the client of new messages without a request from the client. For e.g. a number of Push email solutions involve a NOC (Network Operations Center) which may have some sort of integration with the operator network. Such an NOC will be able to know the device IP address even if the client has not initiated a request to it; for e.g. it may be able to do a phone number to IP address lookup with some box in the operator network. Such solutions may also involve some non-standard protocols for informing the client about new messages; for e.g. it could send a message using a proprietary format to a designated UDP port on the handset.


References:
The following websites contain additional information:
- GPRS Core Network (including IP address mgmt): http://en.wikipedia.org/wiki/GPRS_Core_Network. 
- Using NOCs for Wireless Email: http://www.blackberry.com/select/get_the_facts/pdfs/infrastructure/gartner_pros_and_cons_of_using_NOCs_for_wireless_email.pdf
- Difference between Windows Mobile and Blackberry Email: http://www.techatplay.com/?p=482
- Understanding Microsoft Direct Push: http://technet.microsoft.com/en-us/library/aa997252(EXCHG.80).aspx
- LEMONADE for Mobiles: http://www.lemonadeformobiles.com/quick.html
- IMAP IDLE: http://www.isode.com/whitepapers/imap-idle.html


Sunday, August 1, 2010

Mani Shankar Aiyar vs. Suresh Kalmadi

Mani Shankar Aiyar (MSA) was in the news last week on account of his comments on the Commonwealth Games - that he would be happy of the Delhi edition was a flop as it would discourage us from hosting more games and we would instead spend the money more usefully (on sports facilities in villages etc). This led to Suresh Kalmadi, the president of the Indian Olympic Association and one of the main organizers, labeling him as anti-national.

NDTV interviewed MSA as part of their evening news program. He said that he had been against the idea of hosting the games even when he was sports minister in the last government and quoted a line from T.S. Eliot's "The Wasteland":

"I Tiresias, old man with wrinkled dugs, Perceived the scene and foretold the rest"

He prefixed his quote with a statement that Prannoy Roy (the interviewer) would need to explain this to Kalmadi since he probably would not understand the meaning :-)

I wonder how many of the current generation of politicians (Rahul Gandhi, Joytiraditya Scindia, Sachin Pilot, Akhilesh Yadav..) are interested in (or capable of?) quoting poetry. The only person who comes to mind is Sashi Tharoor. (I confess that my statements are based on the little I have seen of them in a few TV interviews so I may have misjudged their interest/abilities). Maybe this a skill that is no longer valued and holds no attraction for the "younger" lot. Does the inability or lack of interest in such areas reflect the fact that a well-rounded education (where people read for the love of reading) is not as common as it used to be?

I guess being impressed by such skills can be viewed as being a bit of a snob, but I am willing to plead guilty on that count. And MAS may score debating points but I suspect Kalmadi will still be there, holding onto his posts, long after MAS is gone.

Coming back to MAS - I narrated this interview story to a friend of mine and he told me another incident involving MAS and Natwar Singh, both alumni of St. Stephen's College, Delhi. Natwar Singh once remarked that "everything he was, was because of the college" to which MAS retorted "why blame the college?"

Kalmadi was part of Sharad Pawar's NCP for some time before returning to the Congress party. One story I have heard is that when asked whether Kalmadi's exit was a loss, Sharad Pawar replied to the effect that "Yes... even when you throw out cow dung from your courtyard, you also end up throwing out some mud.. and Kalmadi is more than cow dung".

So acerbic wit is not the sole preserve of the Doon / Stephen's / Oxford brigade..