skeletonz - The simple Python CMS system

Currently only a Python interface is supported, but it should be easy to port LightCloud to other languages.

Be sure that you have installed Tokyo * and installed and configured LightCloud manager!

Grabbing the source

Simply do following:

$ mkdir fluffy_hamster
$ cd fluffy_hamster
$ svn co http://opensource.plurk.com/svn/opensource/lightcloud/lightcloud lightcloud

Install hash_ring:

sudo install hash_ring

Doing a simple test

In fluffy_hamster directory create a new test.py file and populate it:

import lightcloud

LIGHT_CLOUD = { 
    'lookup1_A': [ '127.0.0.1:41201', '127.0.0.1:51201' ],
    'storage1_A': [ '127.0.0.1:44201', '127.0.0.1:54201' ]
}

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

lightcloud.set("hello", "world")
print lightcloud.get("hello")
lightcloud.delete("hello")

print lightcloud.incr("fluffis_killeds")
print lightcloud.get("fluffis_killeds")

lightcloud.list_add("my_fixed_list", [1,2,3])
print lightcloud.list_get("my_fixed_list")

Run it via python test.py. Hack on :-)

If you run into problems, post an entry on LightCloud's mailing list.

Powered by Skeletonz