androidoptimizationgeocodingserver-load

Android server load advice


I'd like a bit of advice on how to retrieve, process and store data.

I'm building an app which gets finds the nearest laser tag site to where you are. The adderss data is stored (due to some bad design) in one field in an external database, with it's country coming from another table (told you it was a bad design). I may change where it's getting it's data from if I can, as it currently requires a lot more JSON parsing.

Anyway, as I've got the address, I need to get the locations and put them on the map. As there's several hundred sites to add, it takes a while to request the co-ordinates for all of them, and process them etc.

So my question is this: would it be better to use the google georeader on android, which I'm having problems with, or to use a web server to send the requests via google's http geocoding requests.

Also, would it be better to then store the data on the phone and check for updates every time it loads, or just not store anything on the phone and get all the data every time it loads?

Ta muchly!


Solution

  • So my question is this: would it be better to use the google georeader on android, which I'm having problems with, or to use a web server to send the requests via google's http geocoding requests.

    It's not like laser tag locations move terribly frequently. Do a one-time geocoding lookup on your server, cache the data in a local database, and serve out of the cache. However, there may be legal implications here, see below...

    Also, would it be better to then store the data on the phone and check for updates every time it loads, or just not store anything on the phone and get all the data every time it loads?

    That's actually more of a question of law than of coding, IMHO. From a coding standpoint, if the database is small, keeping it on-device and updating it periodically would be OK. However, if it is not your data, it will depend on whether or not it is legal for you to hold onto it and copy it around.