What is the best way to synchronize users and groups using Google Directory API
Asked Answered
V

0

15

We have to get the latest update about users and groups with Google directory API asap.

For users, we now save the "Etag" in the response of users.list, groups.list and members.list in the first synchronization. Then the etag will be checked every a few seconds, when it changes, we will invoke paged calls users.list, groups.list or members.list again to get the updates.

It works well for small domains, but it will be a problem for big domains (the amount of user could be 60000 and the amount of group could be 10000 with 1000 members in each group). When there is a little change in a single user or group, the etag will change. So we have to invoke the paged calls again and again.

So the question is: Is there a better way that we can get the small changes more efficient?

Veta answered 23/6, 2015 at 5:56 Comment(2)
For users changes, you can use push notifications instead of just depending on etag. check this link developers.google.com/admin-sdk/directory/v1/guides/push . But for groups and members as there is no watch method you have to follow the same mentioned above.Ritualism
@Ritualism Thank you. The push notifications is a very solution to update the users. Just wander why google doesn't push notifications for change of group and memberVeta

© 2022 - 2024 — McMap. All rights reserved.