github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

mitchellh / lightcloud

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 82
    • 4
  • Source
  • Commits
  • Network (4)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • development
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Library for accessing Plurk's LightCloud distributed key-value store for Ruby — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Release 0.8: Somehow tyrant_client wasn't being included in the gem. Fixed 
that. 
Mitchell Hashimoto (author)
Fri Mar 06 15:23:10 -0800 2009
commit  48b2b12f73e68dd8e474d553e0b1dbf6b70245ca
tree    7c1027a19f0af8a9e80cdd36c1b0ab4a78838943
parent  18e06e6df74420549ae8faeefb463c97124f01d2
lightcloud /
name age
history
message
file .gitignore Wed Mar 04 10:19:36 -0800 2009 Bare bones repository [Mitchell Hashimoto]
file CHANGELOG Thu Mar 05 10:34:23 -0800 2009 Merged with development branch. Pushed gem vers... [Mitchell Hashimoto]
file CREDITS Wed Mar 04 10:19:36 -0800 2009 Bare bones repository [Mitchell Hashimoto]
file LICENSE Wed Mar 04 10:19:36 -0800 2009 Bare bones repository [Mitchell Hashimoto]
file README.rdoc Wed Mar 04 20:43:47 -0800 2009 Updated README to reflect changes from 0.5 to 0.6 [Mitchell Hashimoto]
file Rakefile Wed Mar 04 10:26:19 -0800 2009 Added dependencies for gemspec and modified Rak... [Mitchell Hashimoto]
directory lib/ Fri Mar 06 15:23:10 -0800 2009 Release 0.8: Somehow tyrant_client wasn't being... [Mitchell Hashimoto]
file lightcloud.gemspec Fri Mar 06 15:23:10 -0800 2009 Release 0.8: Somehow tyrant_client wasn't being... [Mitchell Hashimoto]
directory spec/ Thu Mar 05 10:31:35 -0800 2009 Added specs for 'new' class methods which use i... [Mitchell Hashimoto]
README.rdoc

LightCloud Library for Ruby

This is a library for accessing LightCloud systems through Ruby.

Background

LightCloud is a distributed key-value stored open-sourced by Plurk. The official website which includes benchmarks, design specs, and more can be viewed at the following URL:

opensource.plurk.com/LightCloud/

Usage

You can use it with class methods:

  require 'rubygems'
  require 'lightcloud'

  LIGHT_CLOUD = {
    'lookup1_A' => ['127.0.0.1:41401', '127.0.0.1:41402'],
    'storage1_A' => ['192.168.0.2:51401', '192.168.0.2:51402']
  }

  lookup_nodes, storage_nodes = LightCloud.generate_nodes(LIGHT_CLOUD)
  LightCloud.init(lookup_nodes, storage_nodes)

  LightCloud.set("hello", "world")
  print LightCloud.get("hello") # => world
  LightCloud.delete("hello")

  print LightCloud.get("hello") # => nil

Or you can also use it with instances:

  require 'rubygems'
  require 'lightcloud'

  LIGHT_CLOUD = {
    'lookup1_A' => ['127.0.0.1:41401', '127.0.0.1:41402'],
    'storage1_A' => ['192.168.0.2:51401', '192.168.0.2:51402']
  }

  lookup_nodes, storage_nodes = LightCloud.generate_nodes(LIGHT_CLOUD)
  cloud = LightCloud.new(lookup_nodes, storage_nodes)

  cloud.set("hello", "world")
  print cloud.get("hello") # => world
  cloud.delete("hello")

  print cloud.get("hello") # => nil

Installation

  sudo gem install mitchellh-lightcloud

Known Issues / To-Do

The python library actually caches the get/set values in a thread-local hash table. This library doesn’t do this yet but I’m working on adding this in now.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server