1 / 17

Publishing Repositories with mod_dav

Publishing Repositories with mod_dav. Greg Stein CollabNet, Inc. gstein@lyra.org, http://www.lyra.org/greg/. Agenda. WebDAV introduction mod_dav introduction The mod_dav API for backends Example: mod_dav_fs Example: mod_dav_svn Future. WebDAV Introduction What is it? (1 of 2).

Download Presentation

Publishing Repositories with mod_dav

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Publishing Repositories with mod_dav Greg Stein CollabNet, Inc. gstein@lyra.org, http://www.lyra.org/greg/ O'Reilly Open Source Convention

  2. Agenda • WebDAV introduction • mod_dav introduction • The mod_dav API for backends • Example: mod_dav_fs • Example: mod_dav_svn • Future O'Reilly Open Source Convention

  3. WebDAV IntroductionWhat is it? (1 of 2) • Web-based Distributed Authoring and Versioning • “DAV” is the usual short form • Goal: enable interoperability of tools for distributed web authoring • Turns the Web into a writeable medium O'Reilly Open Source Convention

  4. WebDAV Introduction What is it? (2 of 2) • Applies to all kinds of content - not just HTML and images • Based on extensions to HTTP • Uses XML for properties, control, status • RFC 2518 and RFC 3253 O'Reilly Open Source Convention

  5. WebDAV IntroductionScenarios • Collaborative authoring • Network file system • Remote software engineering • Unified repository-access protocol O'Reilly Open Source Convention

  6. WebDAV Introduction Some Tools and Clients • Open source • Joe Orton’s sitecopy and cadaver • Nautilus (gnome-vfs), KDE (kio) • Subversion • Python, Perl, C, Java client APIs • Commercial • MacOS X, most Adobe and Microsoft products • Dreamweaver and other authoring tools • Lots of (commercial) DAV servers O'Reilly Open Source Convention

  7. mod_dav Introduction • mod_dav is an Apache module • Separate module for Apache 1.3 • Integrated into Apache 2.0 • On June 1, securityspace.com reported 171505 sites using mod_dav (6th most popular Apache module) O'Reilly Open Source Convention

  8. mod_dav Introduction • mod_dav has an API for a “pluggable back-end repository” • Default repository uses the native filesystem • Oracle and ClearCase are shipping products using mod_dav with custom back-ends O'Reilly Open Source Convention

  9. mod_dav Back-ends • Sometimes called “providers” • Implemented as Apache modules • Register themselves with mod_dav when they are first loaded • Each has a short name for reference • Used in the DAV directive (e.g. DAV svn) • Associated with a portion of the URL tree O'Reilly Open Source Convention

  10. Apache 2.0 DSO loader mod_dav Back-ends mod_dav mod_dav_fs FS O'Reilly Open Source Convention

  11. mod_dav Hooks • mod_dav does the protocol work and most of the interaction with Apache • Back-ends provide groups of functionality • Each group defines a set of “hooks” • Some groups or individual hooks are optional • The provider fills in the groups and hooks that it understands and can respond to O'Reilly Open Source Convention

  12. Groups of Functionality • Content (“repository”) required • “Dead” properties required • “Live” properties optional, recommended • Locks optional • Versioning optional, very complex • Binding optional, ill-defined • Searching optional, ill-defined O'Reilly Open Source Convention

  13. How to Start • Look at mod_dav_fs • Set up your Apache module • Register your provider with mod_dav • Set up your dav_provider structure • Begin with the repository hooks • Stub out the dead property hooks • Leave the other groups as NULL O'Reilly Open Source Convention

  14. Key Structures • dav_resource - the backend object being operated upon • The “info” field for your private data • dav_error - returning errors • dav_response - returning multistatus info • See mod_dav.h O'Reilly Open Source Convention

  15. dav_hooks_repository • get_resource • open/close/seek/write_stream • set_headers, deliver • copy/move/remove_resource • create_collection • walk • miscellaneous O'Reilly Open Source Convention

  16. get_resource • Identify a resource based on the user request • Four parameters • The Apache request_rec pointer • The root of this DAV-enabled space • Label header and DAV:checked-in property • Remember stuff in resource->info O'Reilly Open Source Convention

  17. Future • Evolve the mod_dav API • Integrate more closely with Apache, apr(-util) • Performance and memory usage changes • Documentation(!) • New Open Source providers • Catacomb (a MySQL backend) • Shims to implement a backend in Perl, Python, or PHP O'Reilly Open Source Convention

More Related