Ok, this is a hard one. I have three things:
- An iPhone app
- PHP-mySQL database on a server
- Google App Engine (?)
The iPhone app is working fine storing data in the database.
I'd like to notify some subscribers when the database changes (i.e. someone uploads something).
I assume the app is running, so I just want the view up to date. (Also, is it feasible to send push notifications when is not running?)
I know those are very gener开发者_如何学Goal questions, but I don't know where to start.
Not knowing how popular or frequently your app is updated, I would strongly recommend not using push notifications here. Setup a cached page and have your app poll the server when it is open. It can do it every 15 seconds or so and still be fine. Check the header to see if the file is modified before doing any parsing and such to prevent wasted CPU cycles.
精彩评论