Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confused about syncing multiple tables with sync adapter and content provider

I'm confused about which way is the best to have multiple tables get synced in my application.

I have one content provider and intend to have multiple tables (events, users, etc). I also have a rest-server that the app is supposed to communicate with. I'm wondering about what is the best practice to handle multiple connections (put, get, post and delete) for each of the tables. They have also relationships, like one user can be attending an event, but also be the owner of the event. So if I have created a user and a belonging event to that user, I can either upload the user, get back info from the server about the user, upload the event with the information about the user, get back that information and then update the user with the new event information.

What is the best way to solve these problems? Should I create a method (http://example.com/sync) that aggregates all the data that should be synced? Or should I just stick with, sometimes ~15-20 requests?

like image 429
jonepatr Avatar asked Oct 26 '11 22:10

jonepatr


1 Answers

Evernote has solved a similar problem with their proprietary EDAM protocol. Worth looking into.

Evernote EDAM

like image 128
Vikram Bodicherla Avatar answered Sep 23 '22 07:09

Vikram Bodicherla