Re: Issue: WRITE_DAV_PROP

----- Original Message -----
From: "Jim Whitehead" <ejw@cse.ucsc.edu>
To: "John Glavin" <john@riverfrontsoftware.com>; "WebDAV WG"
<w3c-dist-auth@w3.org>
Sent: Monday, April 16, 2001 12:24 PM
Subject: RE: Issue: WRITE_DAV_PROP


> John Glavin writes:
> > I agree about the "getlastmodified" property.  I would love to be able
to
> > set this so that file synchronization software will work properly.  My
> > product maps a network drive to a DAV server and unless I can set the
> > "getlastmodified" property file synch software won't work right.  I only
> > know of one server that allows this now, it would be nice if this could
be
> > standardized.
>
> Hmm, it's not at all obvious to me why writing to getlastmodified helps
> synchronization. Naively I would think the synchronization algorithm on
> resource R would be:
>
> - retrieve getlastmodified and getetag properties on R
> - IF local copy of R unchanged AND ((getlastmodified > R file timestamp)
OR
> (getetag != stored value of R's etag from when it was originally
> downloaded)) THEN get file from server & update cached etag value ELSE
leave
> local copy of R unchanged (it is the latest version)
> - IF local copy of R is changed THEN
>   - IF (getlastmodified > value of getlastmodified from last download of
the
> resource) OR (getetag != stored value of R's etag from when it was
> originally downloaded) THEN note a conflict, since the file has been
updated
> on the client and the server
>   - ELSE write the client file to the server, since the client file has
been
> changed, and the server file hasn't
>
>
> I don't ever see a case here where changing the value of getlastmodified
> helps. When writing the client file to the server using PUT, the server
> automatically updates getlastmodified.
>

This is where the problem lies.  If you PUT  a file to the server, the
server will update getlastmodified.  The way that existing Windows
applications synchronize files is to copy the file to the server and then
set the modified time to match the existing modified time of the file that
is say on the users hard disk.  This way when it next checks to see if the
file is in synch it will just check the last modified property.  I know that
DAV isn't specific to Windows or any file system in particular, but it would
be nice if there was a way in DAV to allow existing file synchronization
software to work.  A simple way to do this is to allow the getlastmodified
property to be set.

The algorithm mentioned above by Jim would work fine if the synchronization
software was written with DAV in mind.  My product maps a network drive
under Windows to a DAV server, so I can't really change the method that
applications use to synchronize files, nor could I expose these additional
DAV properties to them.

The DAV server for www.mydocsonline.com does this and it works very well
with my product and some other products out there that count on this for
file synchronization.

Thanks,

John Glavin
RiverFront Software
http://www.webdrive.com

Received on Monday, 16 April 2001 19:38:05 UTC