Wed 28 Dec 2011 01:29:28 PM UTC, comment #2:
Hi Werner, many thanks for the reply.
First let me say that I have tried a number of status codes, and indeed have taken a look at the DavFS2 source code, hence my submission .. :)
I appreciate how it is working and to an extent why, so maybe it'll help if I explain what I'm doing. Essentially I've written a WEBDAV server that maps storage onto MongoDB, essentially "under the hood" I guess I've created a MongoDBFS filesystem. Now, this works remarkably well both with Linux (DavFS2) and as a storage option for Windows .. indeed (much to my amazement) the combination works as well as Windows drive shares (re performance) but without all the hassle re; remote access and security.
Now, first comment - nothing works unless I set delay_upload to 0, indeed discovering "delay_upload" was a bit of a revelation (!)
Client;
LOCK
PUT
(wait 3s)
<actual put>
UNLOCK
Granted the client will yield after the PUT, but any further operations that rely on the PUT will either block on the LOCK, or return the wrong information because although the client has completed it's "write" operation, the server hasn't actually been given the information. For any sort of shared environment where concurrency is an issue, "delay_upload" is a bit of a "gotcha". i.e. applications that use filesystems expect Async operation, so although caching is nice, Sync operation will break many things that might try to use it.
In order to make this fly (for me);
a. DavFS2 must use delay_upload=0 (obviously this is just a setting, although I submit it would be a good default!)
b. PUT must return a valid success/failure indication - I have experimented with catching errors on UNLOCK, but it's a bodge, and it'll never catch an "out of space" or transient "write" error.
Otherwise DavFS2 (IMHO) can't support any sort of "real" filesystem other than just remote mounting remote web-servers for single-user use.
(and WebDAV it appears can be SO much more)
Consider with MongoDB, the back-end database is replicated and can be scaled to 1000 servers.
Consider also that WebDAV will work through concentrators (I use "varnish") , the scope for a massively scalable filesystem is immense.
- and in testing, I have this working, in terms of response, you wouldn't know on the face of things that it wasn't a local filesystem.
If DavFS2 could support this mode of operation, it would be really cool ... looking at the code it doesn't look like it would take much to return some additional status info .. (?)
|