• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Android client/server design problem

Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still at design stage and trying to investigate most aspects of Android before I decide how to proceed.
Basically the app will provide data to the user by retrieving it from the local SQL Lite db. Any changes the user makes will be saved to the database. Here's the tricky part. I want the user to be able to share their updates with other users and also to be able to pull fresh data into their own app from other users. So this brings us into the domain of a client / server style architecture.
The server is already up and running on the Google App engine. This app hosts a database containing the "Master copy" of all the data. The data will be exposed to the Android clients via REST services which is already up and running and hence I have to integrate to this.

So when a user wants to get fresh updates from the server they will execute a "Synchronize" routine. Any updates they have made locally will be uploaded and any new/updates other users have made will be downloaded.
Here is where I need help. How best can I keep users local DB synchronized with the server? I would prefer if the user did not have to explicitally do a synchronization as this could hit the app responsiveness. ( Even if it is threaded off ) Could the server calls be wrapped up in a Content Provider type object?
Any one got any examples of this problem or got any best practices I should follow.
I could easily just have a client get its data directly from the server and upload any changes directly to the server but this would not be desirable as the app would not work without network. An absolute requirement is the app must work without n/w coverage. Obviously synchronization would not work without coverage.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic