I am working on my first android application and am looking for some
advice on design decisions.
The main goal of the application is to display trails (like cycling/
hiking trails) near the users current location.
The user will first be presented with a mapview with markers
indicating the location of near by trails.
They can then select a trail and have it overlayed on the map.
The biggest problem right now are:
1) the database is not static - new trails will be added periodically
so a master database will be needed online.
2) trail data (gpx files) consume a lot of space, usually 50 - 300 kb
per trail, so storing all trails on the device may not be feasible.

The three main designs I see are the following:

1) Store light-weight data (like trail names, trail head location,
trail distance, etc) in a local SQLite db on the device.
   Store the light-weight data in a remote database (MySQL or DB2) as
well.
   Store heavy-data (the trail gpx files) remotely.
   New trails are added to the remote database.
   Periodically synchronize/update the local SQLite database with the
remote (master) database.
   When a gpx file is needed, transfer it and parse it to display the
overlay in mapview.
   Possibly store the 10 most frequently used trails (gpx files) on
the device to save bandwidth.

   PRO: Getting the list of nearby trails is fast and easy because it
simply queries the local SQLite database.
   PRO: Minimal amount of data is stored on the local device.
   CON: Transfering gpx files to the device + parsing them will be
time consuming and power draining.

2) Store all data remotely.
   Don't store individual gpx files - parse their data into the
database so all information needed in accessable through database
queries.
   Parsing is done on the server.

   PRO: The android app consumes little space and all processing is
done remotely.
   CON: High bandwidth use due to high number of queries and lots of
returned data (could introduce lag and be costly on the data plan).

3) Store all data (light and heavy) both locally and remotely.
   Don't store individual gpx files - parse their data into the
database so all information needed is accessible through database
queries.
   New trails are added to the remote (master) database.
   Parsing of new trail gpx files is done remotely.
   Periodically synchronize/update the local SQLite database with the
remote (master) database.

   PRO: All data is local so simply query the info needed. Good
performance and low bandwidth use.
   PRO: Synchronization can be done at any time when a WiFi connection
is available so no worry about data plan costs.
   CON: Will consume way too much space. 1000 trails could easily
consume over 100 MB.


Because the database is dynamic I see no way of avoiding having a
master database stored remotely so I image any design will have to
involve network access to a remote database at least for
synchronization purposes if nothing else.


Any advice, insight, or discussion is greatly appreciated.

Thanks!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to