I observed stackoverflow and other stackexchange sites do not use
AJAX for fetching the updates in the post. Instead they use WebSockets for getting the updates. Can somebody tell me how is the notification system built for StackExchange Android app.
Here are the options and my thoughts:
- Pull mechanism (Polling)
- Will consume a lot of bandwidth.
- Better approach Long polling
- Needs some help from server for implementation. Might be difficult to implement.
- Push Mechanism
- I am not sure if this can be done with Android. I guess this can be done with iphone apps.
If Android app uses constant polling after certain intervals, it may not work out because stack exchange api also use throttling concept to limit the number of calls per day. Additionally, user experience may not be that good if polling is used.