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

1

6

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?

Arboreous answered 11/12, 2014 at 12:21 Comment(0)
C
0

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.

Clavier answered 15/12, 2014 at 19:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.