Ruby, WebDAV, and Mozilla Sunbird inquiry

Discussion in 'Ruby' started by James Britt, Aug 24, 2004.

  1. James Britt

    James Britt Guest

    I recently downloaded Sunbird [0], the calendar application from the
    Mozilla team. It looks OK, seems to do what I want, even at version 0.2.

    It has a facility for sharing or exchanging calendar data. This
    requires WebDAV [1], though. I'd rather not have to run Apache with
    mod_webdav on every machine where I want to share a calendar. I'd
    prefer to run a lighter Ruby process that handles the WebDAV requests.

    A bigger reason for wanting to have a custom Ruby process handle the
    calender sharing is that I want to be able to hook Sunbird into my wikis
    and blogs. It would be sweet if could add a page to a wiki, use some
    special markup to indicate that something has a deadline or an
    associated calendar date, and have that info appear in all my calendars.
    and vice versa.

    I looked around but have not seen any Ruby WebDAV server code. Does
    anyone know if any such thing exists? Something for WEBrick? Has anyone
    looked into using Ruby to interact with Sunbird?

    Thanks,


    James


    [0] http://www.mozilla.org/projects/calendar/sunbird.html
    [1] http://www.webdav.org/
    James Britt, Aug 24, 2004
    #1
    1. Advertising

  2. There are actually relatively few open source WebDAV server
    implementations, aside from mod_dav. In fact, I have yet to see a full
    WebDAV client implementation for Ruby, which could complicate the Wiki
    side of the equation, as well.

    It's an area that would be nice to support for a number of potential
    applications, most notably calendaring (both Sunbird and iCal use
    WebDAV and vCard) and network backups and file transfers (ala "Web
    Folders" on Windows).

    Lennon

    --
    Lennon
    rcoder.net
    Lennon Day-Reynolds, Aug 24, 2004
    #2
    1. Advertising

  3. James Britt wrote:

    > I recently downloaded Sunbird [0], the calendar application from the
    > Mozilla team. It looks OK, seems to do what I want, even at version 0.2.
    >
    > It has a facility for sharing or exchanging calendar data. This
    > requires WebDAV [1], though. I'd rather not have to run Apache with
    > mod_webdav on every machine where I want to share a calendar.


    The user sharing the calendar just needs access to a WebDAV server, he
    doesn't have to run one himself.

    > I looked around but have not seen any Ruby WebDAV server code.


    A WebDAV server seems to be a rather big project.
    Andreas Schwarz, Aug 24, 2004
    #3
  4. James Britt

    Kirk Haines Guest

    On Wed, 25 Aug 2004 02:33:40 +0900, Lennon Day-Reynolds wrote
    > There are actually relatively few open source WebDAV server
    > implementations, aside from mod_dav. In fact, I have yet to see a
    > full WebDAV client implementation for Ruby, which could complicate
    > the Wiki side of the equation, as well.
    >
    > It's an area that would be nice to support for a number of potential
    > applications, most notably calendaring (both Sunbird and iCal use
    > WebDAV and vCard) and network backups and file transfers (ala "Web
    > Folders" on Windows).


    WebDAV doesn't look like a particularly difficult protocol to support. A
    few months ago there was a little talk about using Iowa to support
    applications to use other HTTP methods than GET and POST. Now that Iowa can
    be easily integrated with WEBrick, it doesn't seem like it would be too hard
    to extend WEBrick to allow the WebDAV HTTP methods to be accepted, and then
    write an Iowa component that can handle them.

    Anyone interested in lending me a hand or two in investigating this further
    and in implementing a proof of concept?


    Kirk Haines
    Kirk Haines, Aug 24, 2004
    #4
  5. James Britt

    Kirk Haines Guest

    On Wed, 25 Aug 2004 02:40:45 +0900, Andreas Schwarz wrote

    > A WebDAV server seems to be a rather big project.


    For a full server implementing the entire protocol, maybe. However, it
    doesn't look like it's a huge deal to implement partial support. Of course,
    I could be terribly, horribly wrong about that, too. :)


    Kirk Haines
    Kirk Haines, Aug 24, 2004
    #5
  6. James Britt

    James Britt Guest

    Kirk Haines wrote:
    > On Wed, 25 Aug 2004 02:40:45 +0900, Andreas Schwarz wrote
    >
    >
    >>A WebDAV server seems to be a rather big project.

    >
    >
    > For a full server implementing the entire protocol, maybe. However, it
    > doesn't look like it's a huge deal to implement partial support. Of course,
    > I could be terribly, horribly wrong about that, too. :)



    I've only glanced through the WebDAV spec. For calendar sharing, it may
    not be necessary to implement the entire spec. Just those commands
    Sunbird uses to exchange iCal data.

    Integration with wikis, blog, and whatever other Ruby apps sitting on
    the server need not use WebDAV.

    James

    >
    >
    > Kirk Haines
    >
    >
    >
    James Britt, Aug 24, 2004
    #6
  7. Kirk Haines wrote:
    > WebDAV doesn't look like a particularly difficult protocol to support. A
    > few months ago there was a little talk about using Iowa to support
    > applications to use other HTTP methods than GET and POST. Now that Iowa
    > can be easily integrated with WEBrick, it doesn't seem like it would be
    > too hard to extend WEBrick to allow the WebDAV HTTP methods to be
    > accepted, and then write an Iowa component that can handle them.
    >
    > Anyone interested in lending me a hand or two in investigating this
    > further and in implementing a proof of concept?


    I'm interested and have some time. I'm toying with a project that'll
    eventually want a WebDAV interface.

    WEBrick should make a good framework, but I'm not at all familiar with Iowa.

    So yeah, this sounds fun.

    -- BTS
    Brad T. Sliger, Aug 24, 2004
    #7
  8. James Britt

    Dick Davies Guest

    * James Britt <> [0810 18:10]:
    > I recently downloaded Sunbird [0], the calendar application from the
    > Mozilla team. It looks OK, seems to do what I want, even at version 0.2.
    >
    > It has a facility for sharing or exchanging calendar data. This
    > requires WebDAV [1], though. I'd rather not have to run Apache with
    > mod_webdav on every machine where I want to share a calendar. I'd
    > prefer to run a lighter Ruby process that handles the WebDAV requests.


    Surely you just want one webdav server to host the calendar?

    > A bigger reason for wanting to have a custom Ruby process handle the
    > calender sharing is that I want to be able to hook Sunbird into my wikis
    > and blogs. It would be sweet if could add a page to a wiki, use some
    > special markup to indicate that something has a deadline or an
    > associated calendar date, and have that info appear in all my calendars.
    > and vice versa.


    That would be excellent. I think a ruby webdav *client* would be more useful
    than a server for a lot of reasons:

    * DAV is still a moving target
    * all DAV clients suck

    :)

    --
    "Would you tell me, please, which way I ought to go from here?"

    "That depends a good deal on where you want to get to," said the Cat.
    -- Lewis Carroll
    Rasputin :: Jack of All Trades - Master of Nuns
    Dick Davies, Aug 25, 2004
    #8
  9. James Britt

    James Britt Guest

    Dick Davies wrote:

    > * James Britt <> [0810 18:10]:
    >
    >>I recently downloaded Sunbird [0], the calendar application from the
    >>Mozilla team. It looks OK, seems to do what I want, even at version 0.2.
    >>
    >>It has a facility for sharing or exchanging calendar data. This
    >>requires WebDAV [1], though. I'd rather not have to run Apache with
    >>mod_webdav on every machine where I want to share a calendar. I'd
    >>prefer to run a lighter Ruby process that handles the WebDAV requests.

    >
    >
    > Surely you just want one webdav server to host the calendar?


    Here's a use case: I have three PCs in my house. I'd like to run
    Sunbird on all of them. When I use Sunbird on my laptop, I want it to be
    able to go exchange calendar data with the other 2 machines. Sunbird
    speaks WebDAV, so something on the remote boxes must speak WebDAV, too.
    (Actually, the may be other ways to do this by reading/writing Sunbird
    calendars using another process, but using the built-in Sunbird stuff
    seems simpler to start with.)

    When search a server gets a request, I want it to serve up the calendars
    info, but also have it go check other files/processes on the same
    machine (such as wikis and blogs) to see if there is anything that
    should be sent over as calendar data.

    So I need a server process of some sort on each machine where I want to
    serve up or accept calendar data.

    Another scenario: A conference is listed on ruby-doc.org. I want
    people to be able to point Sunbird at some ruby-doc.org URL and have it
    fetch calendar events, so that the conference appears in their
    calendars. But, I don't want to have to store an iCal file up on
    ruby-doc.org. Just the blog/web site. The calendar-server code needs
    to know how to accept WebDAV requests go grab calendar data from the
    blog entries. Sort of a virtual iCal file proxy.

    >
    >
    >>A bigger reason for wanting to have a custom Ruby process handle the
    >>calender sharing is that I want to be able to hook Sunbird into my wikis
    >>and blogs. It would be sweet if could add a page to a wiki, use some
    >>special markup to indicate that something has a deadline or an
    >>associated calendar date, and have that info appear in all my calendars.
    >> and vice versa.

    >
    >
    > That would be excellent. I think a ruby webdav *client* would be more useful
    > than a server for a lot of reasons:
    >
    > * DAV is still a moving target
    > * all DAV clients suck


    I could be handy to have blogs, wikis, etc. speak WebDAV so that they
    could interact with shared calendars. I believe there is some WebDAV
    client code listed on the RAA.

    James
    James Britt, Aug 25, 2004
    #9
  10. In your "home LAN" example, you really do only need one WebDAV server.
    Each client (aka copy of Sunbird) then publishes a copy of its
    calendar data to that server. When they exchange data, it's through
    the server, not directly from client to client.

    Looking at the Sunbird docs, it also appears that you can use FTP to
    publish and subscribe to calendars. You'd lose iCal compatibility, but
    it could be an effective stopgap until someone has a pure Ruby WebDAV
    server ready to go.

    FTP also lacks the one major weakness I've encountered with mod_dav:
    it maintains its own permissions database, and files are all owned by
    the apache process UID. That means that, if you're using mod_dav, you
    can't offer WebDAV and direct (i.e., shell of FTP) access to the same
    files. Very un-UNIX-y, IMHO.

    --
    Lennon
    rcoder.net
    Lennon Day-Reynolds, Aug 25, 2004
    #10
  11. James Britt

    Mark Hubbart Guest

    On Aug 25, 2004, at 10:06 AM, Lennon Day-Reynolds wrote:

    > FTP also lacks the one major weakness I've encountered with mod_dav:
    > it maintains its own permissions database, and files are all owned by
    > the apache process UID. That means that, if you're using mod_dav, you
    > can't offer WebDAV and direct (i.e., shell of FTP) access to the same
    > files. Very un-UNIX-y, IMHO.


    Yes, this is a major problem. All the more reason for a WebDAV server
    written in Ruby! If there is a framework available for handling the
    requests, it appears it would be simple to write a server that handles
    permissions in an appropriate unix-y way :) If I can find any extra
    time, this would certainly be a project I would want to work on. I find
    the mod_dav implementation to be somewhat lacking.

    I've been on the lookout for a good webdav server for a long time now
    (ever since I moved to MacOS X, which treats it as a first-class
    filesystem). I have toyed with the idea of building my own, but never
    actually tackled it full force to see how much work it would really be.

    cheers,
    Mark
    Mark Hubbart, Aug 25, 2004
    #11
  12. James Britt

    James Britt Guest

    Lennon Day-Reynolds wrote:

    > In your "home LAN" example, you really do only need one WebDAV server.
    > Each client (aka copy of Sunbird) then publishes a copy of its
    > calendar data to that server. When they exchange data, it's through
    > the server, not directly from client to client.


    There's no assurance that any given machine will be running. I'd prefer
    if I could just point to the machine (or URL) that has the data I want,
    and pull it back. I also want to yank calendar info from applications
    that are not aware they are providing ical data.

    For example, I use a wiki as a PIM. It has names, addresss, birth
    dates, project plans, and who knows what else.

    If I add a wiki page to hold personal data about a friend, and that page
    has a birthday date in it, I would like some process to magically
    recognize that and add publish it as calendar data.

    (Another way might be to write a wiki plugin such that a request to a
    special wiki URL returns an ical response. Hmm ... )

    >
    > Looking at the Sunbird docs, it also appears that you can use FTP to
    > publish and subscribe to calendars. You'd lose iCal compatibility, but
    > it could be an effective stopgap until someone has a pure Ruby WebDAV
    > server ready to go.



    I did a simple experiment, and it appears that when Sunbird fetches a
    remote calendar it does a simple GET. I was able to have WEBrick spit
    back a text file with calendar data, and Sunbird added the events to my
    calendar.

    When I asked Sunbird to publish its calendar to WEBrick, it did a PUT.
    I have to go examine the headers to see just what it was trying to send.

    It may be that true WebDAV is not needed for Sunbird-specific interaction.


    James
    James Britt, Aug 25, 2004
    #12
  13. A local "mini-DAV" server for calendaring would be great, especially
    if it could advertise via Rendezvous. That could make Sunbird (and
    likely iCal, if it worked with the server, as well) a "killer app" --
    instead of using Exchange or another big centralized scheduling
    system, just let everyone maintain their own calendar, and locate
    other peoples' on demand with mDNS.

    Of course, there would be disadvantages -- namely, as you suggest,
    that individual machines may not be running 24/7, which means that the
    calendar data they publish would be unavailable. I suppose that the
    local client (or WebDAV server, if it functioned as a proxy) could
    cache the latest calendar, though.

    --
    Lennon
    rcoder.net
    Lennon Day-Reynolds, Aug 25, 2004
    #13
  14. James Britt

    Aredridel Guest

    > Another scenario: A conference is listed on ruby-doc.org. I want
    > people to be able to point Sunbird at some ruby-doc.org URL and have it
    > fetch calendar events, so that the conference appears in their
    > calendars. But, I don't want to have to store an iCal file up on
    > ruby-doc.org. Just the blog/web site. The calendar-server code needs
    > to know how to accept WebDAV requests go grab calendar data from the
    > blog entries. Sort of a virtual iCal file proxy.


    That part of DAV is called HTTP GET ;-)

    Seriously, one doesn't have to implement any of DAV for read-only
    access. Just a CGI script would do for that.

    Ari
    Aredridel, Aug 28, 2004
    #14
  15. James Britt

    Aredridel Guest

    > > FTP also lacks the one major weakness I've encountered with mod_dav:
    > > it maintains its own permissions database, and files are all owned by
    > > the apache process UID. That means that, if you're using mod_dav, you
    > > can't offer WebDAV and direct (i.e., shell of FTP) access to the same
    > > files. Very un-UNIX-y, IMHO.

    >
    > Yes, this is a major problem. All the more reason for a WebDAV server
    > written in Ruby! If there is a framework available for handling the
    > requests, it appears it would be simple to write a server that handles
    > permissions in an appropriate unix-y way :) If I can find any extra
    > time, this would certainly be a project I would want to work on. I find
    > the mod_dav implementation to be somewhat lacking.


    I, too, don't find joy in mod_dav. Its lack of unixy goodness is painful
    to me, too.

    > I've been on the lookout for a good webdav server for a long time now
    > (ever since I moved to MacOS X, which treats it as a first-class
    > filesystem). I have toyed with the idea of building my own, but never
    > actually tackled it full force to see how much work it would really be.


    It'd be quite a bit of work, but perfectly doable (especially with good
    tools like REXML -- thanks Sean!)

    It's something I'd be quite willing to help with. I rather think that
    WEBrick is a good place to start -- the basic method handling is there,
    and a DAV implementation could just start life as a servlet. (In fact, a
    servlet would make a great place to start in implementing custom
    services with a DAV interface)

    If someones else would want to pass some code around, I'd be more than
    willing to work on the project, too. It's something I see as having a
    long-term benefit to my business.

    Ari
    Aredridel, Aug 28, 2004
    #15
  16. James Britt

    James Britt Guest

    Aredridel wrote:

    >
    > Seriously, one doesn't have to implement any of DAV for read-only
    > access. Just a CGI script would do for that.


    Quite true, and what I've seen from Sunbird, all one needs to handle are
    GET and PUT. Odd, though, that on the PUT no authentication info seems
    to be passed form Sunbird.

    But adding iCal export to blogs and wikis would be easy.

    James
    James Britt, Aug 28, 2004
    #16
  17. James Britt

    Aredridel Guest

    On Sat, 2004-08-28 at 12:32 +0900, James Britt wrote:
    > Aredridel wrote:
    >
    > >
    > > Seriously, one doesn't have to implement any of DAV for read-only
    > > access. Just a CGI script would do for that.

    >
    > Quite true, and what I've seen from Sunbird, all one needs to handle are
    > GET and PUT. Odd, though, that on the PUT no authentication info seems
    > to be passed form Sunbird.


    That would be challenge style. It will only send it if sent "403
    Unauthenticated" with a WWW-Authenticate header. It will then retry with
    credentials.

    Ari
    Aredridel, Aug 28, 2004
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe Van Meer

    data relations and datasets inquiry

    Joe Van Meer, May 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    426
    Joe Van Meer
    May 5, 2004
  2. Replies:
    1
    Views:
    10,413
    kj12345
    Mar 1, 2005
  3. Bubba
    Replies:
    1
    Views:
    294
    Ben Bacarisse
    Jun 15, 2009
  4. Cofa via CofaMail
    Replies:
    1
    Views:
    1,516
    Cofa via CofaMail
    Mar 1, 2010
  5. Michael Dichtl

    WebDAV: Connect Ruby to a WebDAV Server

    Michael Dichtl, Jul 9, 2007, in forum: Ruby
    Replies:
    7
    Views:
    878
    Rob Biedenharn
    Jul 9, 2007
Loading...

Share This Page