Coders/WebDAV

These are some rough notes for a project I'm working on: A WebDAV interface to MediaWiki. I plan to move these notes to http://mediawiki.org/wiki/WebDAV in the near future.

WebDAV is a set of extensions to HTTP, beyond HTTP/1.1. It's consistent with HTTP in that it uses request and response messages, messages have headers and a body, response messages have a status. Consequently existing web servers can generally support WebDAV. WebDAV defines some extra request methods, message headers and XML message bodies. These extensions basically add metadata and locking to the HTTP protocol (however additional WebDAV specifications add further specializations like versioning, server side search and digital calendar access.) The fundamental goal of these extensions is to support distributed authoring and versioning. This is one of the original goals of the web: That it should be writable.

More information on WebDAV is available in Wikipedia and the WebDAV home page.

WebDAV's basic primitives (metadata and locking) are quite general and map well to file system operations. WebDAV is an open standard based on widely adopted technology: HTTP and XML. Consequently many WebDAV clients have been implemented. Most operating systems support mounting WebDAV resources like file systems:
 * Linux: fusedav is a WebDAV file system that maps metadata to POSIX extended attributes. cadaver is a command line WebDAV client which supports some versioning features like checkin and checkout.
 * Mac OS X: Supports mounting WebDAV resources.
 * Windows: Supports WebDAV network drives.

A WebDAV interface to MediaWiki is an interesting challenge since MediaWiki supports page revisions and WebDAV also supports versioning: RFC 3253.

How difficult would it be to make file system tools which interact with versioned files? Store the path to a version in a "checked-in" extended attribute and create "checkin" and "checkout" GNU file system tools. Get these tools into a POSIX standard. How would the WebDAV "auto-version" concept apply? Create versions for every "write" system call? Maybe not awful. How does OS X do it? Probably the "keep-checked-out" paradigm would be used more frequently.

This could be made consistent with the "ext3cow" file system if it defined "checked-in" extended attributes. Could also work with fusedav. Could perhaps even work with rcs if the file system would let you read from rcs versions.

Tools to do Subversion through fusedav is the right place to start.