GitXplorerGitXplorer
d

rkv

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
3c58fbfa660814b3b380c5f3347a2f51a4e43176

doc update

committed 15 years ago
Unverified
abfa948c919cffc98897b7567e7c719afa3b5d38

Regenerated gemspec for version 0.2.0

committed 15 years ago
Unverified
2bb1c323f97ca4684712f67947023d45b0d98b3b

Version bump to 0.2.0

committed 15 years ago
Unverified
b2d4522ed20f7adfd82161b07783654658b98860

add tokyocabinet

committed 15 years ago
Unverified
7f209e38fa94594d32a38ccece930aea7f529280

redo module structure, integration testing

committed 15 years ago
Unverified
697a4abc8950066da0a0fd48752fb6d416bd2188

default batch implementation

committed 15 years ago

README

The README file for this repository.

rkv - Ruby Key Value - an adapter on top of various key-value and column stores

== Philosophy

The API is a nested (multidimensional) Hash. This allows effective mapping to both column stores and flat KV stores.

For example, if the Cassandra adapter is used, the first dimension is the column family, the second is the row within the CF and the third is the column within the row.

For flat KV stores, a key hierarchy is used for efficient mapping.

== Install

Installing the gem:

gem install rkv

== Usage

require 'rubygems' require 'rkv'

store = Rkv.open(:cassandra, { :servers => ['127.0.0.1:9160'], :keyspace => "Blog" })

store = Rkv.open(:memory, :recurse => {"Users" => "*"})

store = Rkv.open(:tokyocabinet, :file => "test.tcb", :recurse => {"Users" => "*"})

users = store["Users"]

user = users["5"] user["name"] = "Dev Random" user["role"] = "admin"

puts users["3"].inspect

users.batch do users[id1]["name"] = "John Doe" users[id2]["name"] = "Jane Doe" end

user_rels = client[:UserRelationships] user_rels[id1]["posts"][Cassandra::UUID.new] = post_id1

== Notes

Keystores have different features. Operations are mapped to the best of the keystore ability, but some operations may be less efficient or impossible in certain keystores.

== Documentation

RDoc: http://rdoc.info/projects/devrandom/rkv

See spec/integration/stores_spec.rb for an example program that runs identically on all stores.

Git:

== Supported KV stores

  • Cassandra
  • Memory
  • TokyoCabinet

== Planned KV stores

  • Voldemort
  • Redis
  • Keyspace
  • SQL

== Roadmap

  • Store support
  • Performance testing
  • Keystore feature support matrix
  • Object mapper?