zandy icon indicating copy to clipboard operation
zandy copied to clipboard

Rework aggressive syncing

Open avram opened this issue 13 years ago • 2 comments

Aggressive syncing is currently based on a misunderstanding that led me to believe that a collection with modified items will show up as modified. We should instead request the most recently modified items (/items), requesting more pages until we get to items unmodified since our last sync. This means maintaining a last-sync timestamp. I believe this will address the reported issue with notes created on the server not showing up in Zandy; I think they aren't showing up unless the item's attachment view is the origin of the sync request.

avram avatar Dec 01 '11 17:12 avram

I haven't fully researched your code but you should keep track of etags and only refresh when the etag changes. Zoteros api supports this.

judeibe avatar Dec 12 '11 04:12 judeibe

Zandy currently does record the etag-- otherwise it would be impossible to write changes back to the server. The problem is determining what changes server-side have occurred since the last sync; we can do that by requesting all items and comparing etags, but that's a pretty major undertaking, especially for large collections (and there are collections of 10K+ out there). We can certainly use the datemodified sort to just get the changed items as described above-- so that's what I had in mind.

Changes in collection membership and server-side deletes (issue #70) are also hard to detect with the current API.

avram avatar Dec 12 '11 04:12 avram