WebDAV for Node by Ajax.org -- experiences?

1,311 views
Skip to first unread message

Liam

unread,
Mar 31, 2011, 2:28:06 PM3/31/11
to nodejs
I recently discovered this WebDAV module (which seems quite large and/
or comprehensive)

https://github.com/ajaxorg/jsDAV

Anyone tried it? How? Pros & cons?

Liam

danjah

unread,
May 15, 2011, 2:18:02 AM5/15/11
to nodejs, Liam
Did you make any headway on a solid working implementation? Keen to
hear about your experiences if any!

Joe Developer

unread,
May 15, 2011, 3:51:38 AM5/15/11
to nod...@googlegroups.com, Liam
You may want to ping the cloud9ide team as it is being used extensively there. 

--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.


Liam

unread,
May 15, 2011, 2:51:41 PM5/15/11
to nodejs
I was warned by someone with experience that WebDAV is a mess, because
no two clients implement the spec the same way.

I asked the authors what clients jsDAV has been tested against, and
they weren't sure. Apparently it's a port of another project.

On May 14, 11:18 pm, danjah <dan...@gmail.com> wrote:
> Did you make any headway on a solid working implementation? Keen to
> hear about your experiences if any!
>

danjah

unread,
May 15, 2011, 11:53:23 PM5/15/11
to nodejs
Thanks both - I'll investigate further and report back any interesting
findings.

Mikeal Rogers

unread,
May 16, 2011, 1:37:44 PM5/16/11
to nod...@googlegroups.com
You basically just implement what Mac OS X Finder expects and ignore all the LOCK requests. It's not that hard.

Liam

unread,
May 16, 2011, 2:00:56 PM5/16/11
to nodejs


On May 16, 10:37 am, Mikeal Rogers <mikeal.rog...@gmail.com> wrote:
> You basically just implement what Mac OS X Finder expects and ignore all the LOCK requests. It's not that hard.

Can you elaborate? Why would this work for more than Macs?

Mikeal Rogers

unread,
May 16, 2011, 2:04:09 PM5/16/11
to nod...@googlegroups.com
Mac OS X Finder is one the broadest implementations, once you work for it you work for almost everyone else. They are the defacto reference implementation. It's just reality. Same thing goes for CalDAV and iCal :(

Liam

unread,
May 19, 2011, 5:10:08 PM5/19/11
to nodejs
Mikeal, how many different webdav clients have you tested against that
concept? My understanding is that each version of MS Office, of
Windows, of Mac OS, etc, uses the protocol differently, and it's
essentially impossible to know how to respond "correctly" to certain
requests.

Mikeal Rogers

unread,
May 19, 2011, 5:21:21 PM5/19/11
to nod...@googlegroups.com
like i said, ignore LOCK requests, the rest is pretty easy.

i don't test against Office and Windows so I don't know if this approach works for them, probably not :)

Tom Robinson

unread,
May 19, 2011, 5:44:26 PM5/19/11
to nod...@googlegroups.com
It's not for Node and it's all synchronous, but I have a JavaScript
implementation called JackDAV: https://github.com/tlrobinson/jack-dav

I found this compliant test suite called "litmus" extremely useful in
implementing it: http://www.webdav.org/neon/litmus/

I think I basically took the same approach Mikeal suggests of
supporting OS X Finder's implementation, and ignoring LOCK.

-tom

Liam

unread,
May 19, 2011, 5:57:48 PM5/19/11
to nodejs
And which real-world clients have you successfully tested jackdav
against?


On May 19, 2:44 pm, Tom Robinson <tlrobin...@gmail.com> wrote:
> It's not for Node and it's all synchronous, but I have a JavaScript
> implementation called JackDAV:https://github.com/tlrobinson/jack-dav
>
> I found this compliant test suite called "litmus" extremely useful in
> implementing it:http://www.webdav.org/neon/litmus/
>
> I think I basically took the same approach Mikeal suggests of
> supporting OS X Finder's implementation, and ignoring LOCK.
>
> -tom
>

Tom Robinson

unread,
May 19, 2011, 6:31:52 PM5/19/11
to nod...@googlegroups.com
Oh just OS X's Finder and I believe Transmit (for OS X). And a
JavaScript client we wrote for our app (280atlas.com), so that doesn't
count.

I was just providing it as a reference in case you decide to implement
your own. It won't work with Node without major work.

-tom

danjah

unread,
May 20, 2011, 2:04:15 AM5/20/11
to nodejs
Cheers Tom, its great to hear both sides of the coin - much
appreciated.

WebDAV doesn't appear to be a lost cause at all, its just a shame that
LOCK does appear to be "the thorn" - its one of the most interesting
parts, to our company in any event.

I'm awaiting a reply from the devs on jsDAV - if I hear anything I'll
post here, if not I'll assume a) there's too much money involved, or
b) stuff's not going so well.

Diogo Resende

unread,
May 20, 2011, 4:49:19 AM5/20/11
to nod...@googlegroups.com
On Thu, May 19, 2011 at 10:21 PM, Mikeal Rogers <mikeal...@gmail.com> wrote:
> i don't test against Office and Windows so I don't know if this approach
> works for them, probably not :)

This is a bit ridiculous, after you saying:


"Mac OS X Finder is one the broadest implementations, once you work
for it you work for almost everyone else. They are the defacto
reference implementation. It's just reality. Same thing goes for
CalDAV and iCal :("

So, you make that assumption without ever testing Windows :)

For CalDAV I agree, but I think the reason is pretty obvious (they
started!). iCal is not related with this.

Mikeal Rogers

unread,
May 20, 2011, 12:28:57 PM5/20/11
to nod...@googlegroups.com
iCal was not the first CalDAV implementation, there were a bunch before it, it was just in the widest use first.

Matt Patenaude

unread,
May 20, 2011, 12:38:18 PM5/20/11
to nod...@googlegroups.com
Although Apple is one of the primary authors of the specification: http://tools.ietf.org/html/rfc4791

-Mat

On May 20, 2011, at 12:28 PM, Mikeal Rogers wrote:

> iCal was not the first CalDAV implementation, there were a bunch before it, it was just in the widest use first.
>

Mike de Boer

unread,
May 23, 2011, 6:00:09 AM5/23/11
to nod...@googlegroups.com
Hi all, very interesting thread!

I created jsDAV, so I might be able to shed some light here... ;-)

Primarily, jsDAV started as a port of the excellent SabreDav (http://code.google.com/p/sabredav/) to NodeJS. I started working on this in my spare time, because I figured that Node's async I/O is just a perfect fit for potentially high-volume filesystem access over HTTP and deserved an - at least - decent implementation of the spec.
I used Litmus (http://www.webdav.org/neon/litmus/primarily to test the implementation during development and for the integration testing I used Mac OSX Finder and now Cloud9 as well. This combination I found most robust. That's also why you don't see any unit tests (yet!), because Litmus is in fact a standalone suite of unit tests.
The cool thing about jsDAV imho is the fact that it supports multiple backends (the latests commits on master support sftp, for example, but could also be Mysql, redis, whatever!) and plugins that are relatively easy to write (like codesearch, filesearch, auth, mount, etc) and provide the possibility to extend jsDAV's functionality with, for example, more WebDAV RFC's.

When we were to choose a filesystem connector to load and save files over HTTP for the Cloud9 IDE, WebDAV seemed the most obvious choice, which meant I could spend more time on making the library more robust and stable. We've been using it in production for months now and found one minor issue, so no stability issues whatsoever (fingers crossed!) and wonderful performance. 

A big missing feature that I've been planning to work on for months is PROPPATCH request support, CalDAV and improved documentation. The code is (almost) fully documented, but I haven't gotten around to generate a nice set of Github pages for it yet. CalDAV is just a lot of work. The RFC is smaller than WebDAV (incl. extensions) and the SabreDAV implementation as well.

@Mikeal "You basically just implement what Mac OS X Finder expects and ignore all the LOCK requests. It's not that hard."
Dare I say - without an intention of offending you - that that's just a bit too naive a statement? You can perfectly handle LOCK request for the finder, but it will not even send them if you simply don't broadcast locking support in response to an OPTIONS request (e.g. res.headers["DAV"] = "1,3,extended-mkcol";). I agree that implementing locking is not trivial at all, but I gave it a try anyway. Beware, though, that the locks jsDAV plugin hasn't been tested yet and is not used/ stress-tested in production.

Important note is that the 0.4+ versions of NodeJS can NOT handle HTTP requests from Litmus (the WebDAV testing tool), which makes it impossible for me to test jsDAV properly against these versions of Node. This is a real shame, also to the NodeJS developers themselves, because it's such an easy tool to include in an automated build system. I hope that this issue will be resolved in the near future.

I hope I answered some - if not all - of your questions!

Regards,

Mike de Boer - Ajax.org / Cloud9

Liam

unread,
May 23, 2011, 6:51:13 AM5/23/11
to nodejs
On May 23, 3:00 am, Mike de Boer <deboer...@gmail.com> wrote:
> I created jsDAV, so I might be able to shed some light here... ;-)

Having a solid WebDAV implementation for Node seems valuable, and
solid would mean it's been verified against the broad variety of
WebDAV clients. Have you considered creating a testing site and asking
folks to try various clients? Perhaps have the tester fill out a form
-- OS, app/version, and result for each test op...

> Primarily, jsDAV started as a port of the excellent SabreDav (http://code.google.com/p/sabredav/) to NodeJS.

Are you pulling in revisions they make going forward?

> The cool thing about jsDAV imho is the fact that it supports multiple
> backends (the latests commits on master support sftp, for example,

So it doesn't talk to the host filesystem itself?

> Important note is that the 0.4+ versions of NodeJS can NOT handle HTTP
> requests from Litmus (the WebDAV testing tool),

This is a bug in Node? Can you elaborate, and/or post a simple way to
reproduce it?

Thanks!
Reply all
Reply to author
Forward
0 new messages