<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Oops! Remember to post to list next time! :)<div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Tom Needham<br><a href="mailto:tom@owncloud.com">tom@owncloud.com</a><br><br></span></div><div><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Tom Needham <<a href="mailto:tom@owncloud.com">tom@owncloud.com</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: [Owncloud] Sync Client needs server help</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">17 May 2012 17:23:15 GMT+01:00<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Frank Karlitschek <<a href="mailto:frank@owncloud.com">frank@owncloud.com</a>><br></span></div><br><div>On 17 May 2012, at 16:43, Frank Karlitschek wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On 17.05.2012, at 11:12, Klaas Freitag <<a href="mailto:freitag@owncloud.com">freitag@owncloud.com</a>> wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">one of the biggest shortcomings of the sync client currently is that it does a full scan of its the ownCloud directories via webdav to query the last modified times. That causes load and other trouble. It would be great to find out if something has changed server side more cheaply.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Completely agreed. The current approach doesnīt work with lotīs of files anymore.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">We have the file system cache which also has the mod times in the database. My idea is now, instead of querying every single file, I just issue a HEAD request on the top sync directory and get the latest modtime of all files in that dir back. If that is younger than the one I know, I have to do a sync.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This should be easy doable.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">I know that it could be even more cool, ie. delivering the list of files back etc. but lets do small steps. Doing just one HEAD instead of querying the whole tree already will be great.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The implementation seems easy: Just get all database id's of the fscache table entries below the top directory of the sync dir and do kind of<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">SELECT MAX(mtime) FROM fscache WHERE id in ( list-of-all-ids-in dir );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">That should be fast enough.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">My question now is: How do we do that? Should we have another app called /files/sync? Or do we want to enhance the WebDAV server to be able to do the described logic if a HEAD request on a dir comes in?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I think the latter is more "within the concept" of doing the sync via WebDAV, OTOH a sync app could be useful anyway for other sync related server support.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Both is fine I think.<br></blockquote><blockquote type="cite">We will need some additional REST calls for the sync client anyways if we want to support new features. Examples are: Accessing the history via the sync client, make it possible to share files from the sync client or control the encryption. We need to build a new custom REST API for this anyways. So an additional call to fetch a list of changed files is easy and fitīs into this concept.<br></blockquote><br></div></blockquote><div>Would also be interesting to allow apps to somehow integrate with this api. For example, someone the other day wanted to access bookmarks from an outside app. Saves each app implementing its own API, auth....<br><br>Tom<br><br>Tom Needham<br><a href="mailto:tom@owncloud.com">tom@owncloud.com</a><br></div><div><br></div><blockquote type="cite"><div><br><blockquote type="cite"><br></blockquote><blockquote type="cite">Frank<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Owncloud mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Owncloud@kde.org">Owncloud@kde.org</a><br></blockquote><blockquote type="cite"><a href="https://mail.kde.org/mailman/listinfo/owncloud">https://mail.kde.org/mailman/listinfo/owncloud</a><br></blockquote><br></div></blockquote></div><br></div></body></html>