| CARVIEW |
Every repository with this icon (
Every repository with this icon (
| Description: | A new way to deal with memcached edit |
| Homepage: | https://twitter.com/binary42 edit |
| Public Clone URL: |
git://github.com/binary42/remix-stash.git
Give this clone URL to anyone.
git clone git://github.com/binary42/remix-stash.git
|
| Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:binary42/remix-stash.git
|
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Aug 29 15:10:35 -0700 2009 | Woops. CD to the right directory #fail [binary42] |
| |
AUTHORS | Mon Sep 28 14:32:07 -0700 2009 | Adding an AUTHORS list in hope of some other co... [binary42] |
| |
LICENSE | Fri Aug 28 14:40:10 -0700 2009 | The LICENSE file isn't markdown [binary42] |
| |
README.markdown | Loading commit data... |
|
| |
Rakefile | Tue Oct 13 15:21:53 -0700 2009 | Add gemcutter release support via jeweler. [binary42] |
| |
VERSION | Fri Oct 23 09:28:24 -0700 2009 | Version bump to 1.0.4 [binary42] |
| |
benchmarks/ | Sun Sep 20 22:27:32 -0700 2009 | Update readme and use consistent benchmark labels [binary42] |
| |
examples/ | Sat Sep 12 11:48:18 -0700 2009 | Remove an example for old style APIs. [binary42] |
| |
harness.rb | Sat Sep 12 11:47:30 -0700 2009 | Make libraries optional for benchmarks [binary42] |
| |
init.rb | Mon Sep 28 13:03:02 -0700 2009 | Add a simple initializer for use as a plugin [binary42] |
| |
lib/ | ||
| |
remix-stash.gemspec | ||
| |
spec/ | Tue Oct 06 08:59:14 -0700 2009 | Don't track logs in support rails app. [binary42] |
Quick & Dirty Specs
New API that doesn't actually suck! I've rethought a lot of the API and this comes with a lot of new capabilities. More work is being done on making it as expressive as possible without terrible overhead. This includes vectorized keys which allow emulation of partial cache clearing as well as nice shortcuts like eval and gate for expressions. Options, clusters, and implicit scope are easy to manage on a stash-by-stash basis. Keys are also easy to pass in as it will create composite keys from whatever you pass in (as long as it has to_s) so no more ugly string interpolation all over the place.
It's fast (faster than memcache-client). It's simple (pure ruby and only a few hundred lines). It's tested (shoulda). Of course, because it's pure ruby it will run almost anywhere as well unlike many other clients.
It does require memcached 1.4+ but you should be running that anyway (if you aren't, upgrade already).
Take a look at the examples and let me know what you think!
Installation
Right now remix-stash is designed to be run as a gem. I've published it to both github and gemcutter (preferred). You can also safely use this as a rails plugin, just check out the source in your plugin directory and it will be automatically loaded.
Install via GemCutter
gem install remix-stash --source=https://gemcutter.org/
Install via GitHub
Warning: THIS IS CURRENTLY LIMITED TO VERSION 0.9.6 (until github reenables gem building).
gem install binary42-remix-stash --source=https://gems.github.com/
Using Remix::Stash
The examples directory has some simple code snippets that introduce general features of the library. In general, everything should just work after require 'remix/stash'. This includes integration with Rails and automatic pick-up of Heroku style memcached environment variables. Of course, this library is completely independent of Rails and does not need environment variables to function or be used.
Specifications
This project is tested with shoulda (install via the thoughtbot-shoulda gem on github) and takes the philosophy that fewer moving parts is better. So to avoid complex runners just run spec/spec.rb or the spec you are interested in directly. In order for the specs to function, you should have memcached 1.4+ running locally on port 11211.
Future Work
- add block form to access response headers directly
- get/set add/replace read/write should allow a CAS flag to be passed
- allow swappable cluster types for consistent hashing, ketama, etc...
- support non-marshal value dumps configured per stash
- support multi vector sets
- thread safe cluster
- quiet/multi command forms (will require a protocol refactoring most likely)
- accelerated binary API implementation with Ruby fallback
- redis support for vectors and/or value
- UDP support (more experimentation on the tradeoffs)
- EventMachine integration (non-blocking?)








