Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby library for Ceph's Reliable Autonomic Distributed Object Store (RADOS)

branch: master
README.rdoc

desperados: A Ruby library for Ceph's Rados

Ceph is a distributed network storage and file system. It's based on a reliable and scalable distributed object store calles RADOS. More about it here: ceph.newdream.net

Desperados is a Ruby wrapper for the C++ librados library, making interacting with a Ceph cluster in Ruby very easy.

Basic Example

require 'rados'

Rados::initialize

pool = Rados::Pool.create("mypool")
pool.write("mykey", "somedata")
pool.read("mykey") == "somedata"

Object Orientated Example

require 'rados'
Rados::initialize

pool = Rados::Pool.create("mypool")
o = pool.objects.new("mykey")
o.write("Once upon")
o.write(" a time")
o.seek(0)
o.read == "Once upon a time"
o = pool.objects.find("mykey")
o.seek(5)
o.read == "upon a time"

Configuration

librados will read your ceph.conf config file to discover your cluster's monitors, so that needs to be available (usually in ./ceph.conf or /etc/ceph/ceph.conf)

About

Author

John Leach (john@johnleach.co.uk)

Copyright

Copyright © 2010, 2011 John Leach

License

LGPL

Github

github.com/johnl/desperados/tree/master

Something went wrong with that request. Please try again.