omgdav - Rack app for bridging WebDAV and MogileFS¶ ↑
omgdav exposes an existing MogileFS domain over WebDAV. There is absolutely no commitment or modification needed to your existing MogileFS installation to try omgdav in read-only mode.
omgdav uses its own database and can import key listings from with an existing MogileFS domain.
omgdav (barely :P) meets class 1 WebDAV compliance according to litmus. Class 2 compliance is planned.
*** WARNING ***
Locking of any type is not yet implemented. Thus:
1) Do not attempt concurrent invocations of COPY/MOVE commands.
2) Do not use PUT or DELETE while a COPY or MOVE command is running.
Read-only operation is currently the safest way to use omgdav.
Features
-
Allows read-only access to existing MogileFS data with a WebDAV client.
-
Infers WebDAV collections based on existing MogileFS keys which look like path names (e.g. “/parts/separated/by/slashes”).
-
Implemented for Rack, so it is compatible with existing middlewares (for authentication, logging, etc…) and Rack web servers.
Requirements
-
an existing MogileFS instance
-
Ruby 1.9.3 or later (any Ruby implementation compatible with C extensions)
-
a Free, Unix-like operating system (GNU/Linux preferred)
-
a Free database supported by Sequel
Install (via RubyGems)
gem install omgdav
Usage
-
Setup your database:
# You may substitute the sqlite:/// database for any other # Free database type Sequel supports. Be sure to have the # appropriate database driver installed (e.g. "sqlite3"). omgdav-setup sqlite://test.sqlite
omgdav-setup runs idempotently. It will automatically upgrade your schema as new versions of omgdav may require database updates
-
Sync metadata from your existing MogileFS domain:
omgdav-sync -t $TRACKER_HOST_PORT -d $DOMAIN sqlite://test.sqlite
omgdav-sync runs idempotently. It may be used to resync changes to the omgdav database if keys are added/removed from MogileFS.
-
Configure your rackup config file, below is an example config.ru:
————————————- 8<———————————— require “omgdav/app” # replace hosts: and domain: with values suitable for your cluster mogc = MogileFS::MogileFS.new(hosts: %w(127.0.0.1:7001), domain: “test”) db = Sequel.connect(“sqlite://test.sqlite”)
# for the brave: :ro (“read-only”) may be swapped for :rw (“read-write”) # :worm is also supported (“write-once, read-many”) run OMGDAV::App.new(db, mogc, methods: :ro) ————————————- 8<————————————
-
Start your Rack HTTP server and point your WebDAV client at it.
rackup -s webrick -p $PORT config.ru
Code
Source code is available via git:
git clone git://bogomips.org/omgdav.git git clone git://repo.or.cz/omgdav.git
And viewable with a WWW browser via cgit or gitweb:
http://bogomips.org/omgdav.git (cgit) http://repo.or.cz/w/omgdav.git (gitweb)
Contact
Bug reports, user/development discussion, patches, pull requests are greatly appreciated via plain-text email.
We currently piggy-back onto the public MogileFS mailing list at mogile@googlegroups.com for feedback.
If you do not want to deal with the corporate host of the MogileFS mailing list or if you wish to keep your issue secret, feel free to email Eric Wong directly at normalperson@yhbt.net
HTML email will be mercilessly deleted.
License
omgdav is copyrighted Free Software by all contributors, see logs in revision control for names and email addresses of all of them.
You can redistribute omgdav and/or modify it under the terms of the GNU Affero General Public License, version 3 or later as published by the Free Software Foundation.
omgdav is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with omgdav; if not, see www.gnu.org/licenses/agpl.txt
fusedav
Some testing and use of omgdav is done on fusedav. Since fusedav upstream appears dormant, we have publicized some bug reports and patches on the Debian bug tracker. Our fusedav patches are also available via various branches in our git repository:
git clone git://bogomips.org/fusedav
Links
MogileFS - mogilefs.org/ omgdav homepage - bogomips.org/omgdav/README omgdav Atom feed - bogomips.org/omgdav/NEWS.atom.xml
References
- 1
-
litmus - www.webdav.org/neon/litmus
- 2
-
Sequel - sequel.rubyforge.org/
- 3
-
fusedav - 0pointer.de/lennart/projects/fusedav/
- 4
-
fusedav (Debian BTS) - bugs.debian.org/fusedav