Skip to content

Speed up sync by keeping etag history #4936

Closed

Description

@icewind1991

As a way to speed up the sync client getting all the changes made on the server it might be an idea to keep the history of etags for the root folder of each user and the time that etag was generated.

With such a history in place the sync client could send a request to the server with it's own last known etag of the root folder which the server can use to easily get a list of all changed files and folder on the server since the last sync. If the server sends a fill of all changed files with their new etags and the new etags of all parent folders a download-only sync can be done with 0 propfinds, leaving only a single request overhead instead of having to run a propfind against all changed folders.

The query for listing all changes made only takes, after creating a new index, around 1 ms with 15000 files in the filecache in my test DB.

cc @dragotin @DeepDiver1975 @karlitschek @bartv2

Activity

  1. PVince81 commented on Apr 28, 2014

    @PVince81
    Contributor

    So if I understand well each "revision" of that history is like a snapshot of the file list tree or its changes from the last one (not the file contents) ?
    Interesting idea.

  2. icewind1991 commented on Apr 29, 2014

    @icewind1991
    ContributorAuthor

    My idea was to have a table of fileid, time and etag (which can be null for deleted files) and add a row every time a file changes.

    Then if the client send the last root etag that it has locally the server has enough information to calculate all changed, new and deleted files since the last sync

  3. DeepDiver1975 commented on Apr 29, 2014

    @DeepDiver1975
    Contributor

    This would allow us to perform change tracking and should deliver enough information to implement the webdav sync protocol https://tools.ietf.org/html/rfc6578

    But this requires major rework on the client - no idea if we should walk this path.

    @dragotin @danimo @MTRichards @karlitschek @craigpg

  4. PVince81 commented on Apr 29, 2014

    @PVince81
    Contributor

    This logic looks similar to how the Dropbox API works, it also accepts a hash as input. But I believe it only does it for a single directory listing.

  5. karlitschek commented on Apr 29, 2014

    @karlitschek
    Contributor

    Interesting idea. We should look into this in the long run to improve performance. Let's look into this for 8

  6. added this to the milestone on Apr 29, 2014
  7. modified the milestones: , on Jan 9, 2015
  8. DeepDiver1975 commented on Jan 9, 2015

    @DeepDiver1975
    Contributor

    @dragotin @danimo something to think about these days?

  9. modified the milestones: , on Mar 2, 2015
  10. modified the milestones: backlog, on Jul 3, 2015
  11. PVince81 commented on Oct 7, 2016

    @PVince81
    Contributor

    This sounds like the way how Webdav sync works.

  12. PVince81 commented on Nov 14, 2016

    @PVince81
    Contributor

    If we have the change history in one place it could also be used as replacement for the activity table (or at least the file-based ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions