Write Locking Proposal rev 3.1
See and voice yourselves in the WriteLockingDiscussion. This version of
the proposal replaces and supercedes the prior two versions.
Jeffrey P Shell (jeffrey@Digicool.com)
The problem being addressed
Lost Updates are a common problem with editing documents on the web. As
one way of dealing with this problem, WebDAV supports exclusive write
locks, enabling an author with a WebDAV tool to prevent other WebDAV
tool users (and potentially others) from writing to their document while
they have the Lock. Zope does not support this level of WebDAV however,
while a growing number of WebDAV client tools are starting to take
advantage of it.
The proposed solution(s).
Update our WebDAV support in Zope to fully implement the LOCK and UNLOCK
methods. Where possible, OFS objects that are WebDAV editable should
be updated to alert the user when the object is being edited outside of
the LOCK (ie - through the web, FTP) and a LOCK is held by another
Zope should provide the management interface support to find and release
locks at an administrative level. This interface should be usable in
To address lost updates in some situations, namely in editing ZWiki
pages, a technique referred to as a seatbelt is used for both
through-the-web (HTML Form) and FTP editing. HTTP/1.1 appears to allow a
similar technique to be used for HTTP that doesn't require embedding
timestamps in documents, and we should investigate this to address Lost
Update problems that might not be addressable by WebDAV (non-dav tools,
Zope is a more advanced system than a file system, but many WebDAV
tools are still limited by file-system type thinking. Our write lock
support should behave as the more popular versions of these tools
expect, and as the WebDAV spec indicates.
Editing locked resources outside of the lock
Zope should try to enforce the fact that a resource is locked when it's
being edited outside of WebDAV. There is some low level ZODB technology
(Versions) that may be used to enforce this, but it could very easily
conflict with the Tool support risk by causing locks to behave in a
more advanced and different way than common tools might expect.
It's unclear how a Collection such as a folder should behave if it is
locked. The WebDAV community has had some large discussions on this
and the results of their discussions should be taken into account when
implementing LOCK for Folder and\or ObjectManager style objects.
Forgotten or Abandoned locks
Exclusive locks primarily enforce a particular editing process - take
out the lock, get the resource, edit the resource, save changes,
release the lock. However, locks are not always properly released due
to program crashes, forgetful lock owners, or other reasons. Zope
should make it easy for administrators to find locked resources and
release one or more locks. Zope should also offer the resources for
developers to write custom screens\objects to find and release locks
that aren't bound to the Zope management interface (but may still be
bound to the web).
This proposal is now only involved with:
Updating our WebDAV support to properly support LOCK and UNLOCK for
exclusive write locks. If WebDAV shared locks appear possible to
implement, support those as well. However, support for shared locks
among clients and other WebDAV servers seems minimal and the spec is
fairly ambiguous about them.
Updating common OFS objects that are WebDAV editable to be aware of
their locks when being edited through other methods.
Supporting HTTP/1.1 etags to implement a functionality similar to
the seatbelt technique used in ZWiki.
Updated WebDAV support in the Zope core that implements exclusive write
locks. This will be tested against popular WebDAV clients such as
Adobe GoLive 5 and Microsoft FrontPage 2000 and (perhaps) Goliath to
ensure that we're producing behaviour that the tools are expecting.
Documentation on how to use Zope with various tools, addressing how to
use Zope with DAV Aware tools, FTP, HTTP (non-dav) editing tools. This
document will also discuss how and which Zope permissions affect these
editing operations. added in draft 3.1
Updated HTTP/1.1 support in Zope to deliver functionality similar to
Jigsaw and Amaya from the W3C. This should address some of the lost
updates situations for HTTP/1.1 editing tools that don't support WebDAV.
WebDAV Working Group, http://www.ics.uci.edu/pub/ietf/webdav/
RFC2518 HTTP Extensions for Distributed Authoring - WEBDAV, http://www.ics.uci.edu/pub/ietf/webdav/protocol/rfc2518.txt
W3 notes on the lost updates problem, http://www.w3.org/1999/04/Editing/