0

I have an Android (business) application which should create a notification and later update its content as soon as possible specific data changes on the server side. The data is accessed through a .NET REST style web service hosted in IIS, which serves maximal 1000 users.

I read about GCM services for push notifications which would have a lot of benefits. The reasons why I think I can not use it are:

  • The devices need to have set up a google account which is an additional deployment cost
  • The devices are not bound to a single person, but the content is. The users log in via application.

So i think i need to poll in a specific interval, where i will consider techniques not to drain the battery. It would be great, if the delay between data change and notification is less than a minute.

To make some approximated and estimated calculations:

  • Traffic / for a minute interval / per day / per device: ~500bytes for a HTTP GET request * 60 * 24 = ~700kb
  • Pay load / per minute / for 1000 users: 1000 database Guid lookups on an indexed column ~3s

I would like to reduce traffic and pay load to the lowest. So i need a technique which allows me to send less requests which does not affect the delay between change and notification which the users really consumes in the meaning of giving attention to.

Edit: Ok, I got a little deeper into the topic. A keyword is Comet. The right way to go for me seems to be long-polling techniques. Other keywords in the context of web development are server-sent events and web sockets, both require HTML5 which is anyway not touched here. Right know i am looking for a way not being forced to set up a messaging infrastructure. I'd like to use to integrate that notification feature in the existing web service. I'll update if i find an answer.

How would you reduce traffic and pay load? Maybe interesting. How does GCM do this? They can not really notify the device. They need to poll as well. They need to deal with a lot of requests as well. They care about traffic as well i guess. Edit:(Ok, they are using an xmpp infrastructure for that api functionality in the app engine api, so i guess it will be similar in gcm)

Thanks for your opinions.

Diego Frehner
  • 2,396
  • 1
  • 28
  • 35
  • 1
    you can deploy your own xmpp server and add xmpp connectivity to your app. that works just as well as google push – njzk2 Dec 13 '12 at 17:29
  • Thanks for your comment njzk2. That sounds so interesting and i didn't hear about yet (of course jabber etc.. but :)). I'll need more time to read about and understand. Right now it's another box for me like GCM and not directly answering my question. Maybe this "box" will reduce traffic and payload. Another question i'll need to figure an answer out it is how it behaves with some hundred different server installations each using different ssl certificates. And of course it's not favourable to be responsible for a possible bottleneck or a single point of failure. – Diego Frehner Dec 13 '12 at 18:33

0 Answers0