Syncing Google Tasks created in Google Apps with those created in our Web Application (Grails/Java)

316 views Asked by At

We want to integrate Google Tasks API into our Grails Web Application but I have a number of concerns with regard to the syncing of tasks and prevention of conflicting data.

  1. What is best practice for syncing Tasks, at the point when a Task has been created in an authorised Google account. Should we create a service which polls for these at a regular interval or can we programmatically enable some kind of Push update in the user's google account which would notify our Web Application of the change?

  2. How can we prevent conflicts arising from a user editing a task in our system while the same task is being manipulated in the Google account? Is there any versioning/locking available?

1

There are 1 answers

0
Gerardo On BEST ANSWER

1.- You have to poll this information using the API. You can call the TaskList.list method, The field "etag" changes every time something has changed in the tasklist, so you have to compare which lists have a different etag and then you can get the information in those lists. Here you can find information on the reason for this approach https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=2675.

2.- In the case of concurrency, the last changes made, will be the final changes. There is no way to lock the element being updated.