Sync Google tasks created in Google Apps with those created in our web application (Grails / Java)

We want to integrate the Google Task APIs into our Grails web application, but I have a number of issues regarding task synchronization and preventing conflicting data.

  • What is best suited for task synchronization at the time the task is created in an authorized Google account. Should we create a service that polls for them at regular intervals or can we programmatically enable some kind of Push update in the google user account that will notify our web application of the change?

  • How can we prevent conflicts arising from a user editing a task in our system when the same task is managed in a Google account? Is there access to version / lock?

+5
source share
1 answer

1.- You must poll this information using the API. You can call the TaskList.list method. The etag field changes every time something changes in the task list, so you need to compare which lists the other etag has, and then you can get the information in these lists. Here you can find information about 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 most recent changes will be the final changes. Unable to lock update item.

0
source

Source: https://habr.com/ru/post/1208808/


All Articles