Skip to content

songkick/dolphin-redis

Repository files navigation

dolphin-redis

<img src=“https://secure.travis-ci.org/songkick/dolphin-redis.png?branch=master” alt=“Build Status” />

dolphin-redis is an extension enabling you to use redis as a backend to store your features.

This gem requires Dolphin 0.9.3.

Configuration

Initialize Dolphin with your custom store

Instead of your traditional

Dolphin.init('/path/to/my/features.yaml');

You can now specify to use redis as follow:

Dolphin.init_with_store(DolphinRedis::RedisFeatureStore.new())

Configure the Redis connector

RedisFeatureStore.new takes the following options:

store_key: specify the key you want to use inside Redis to store your features. This default to 'dolphin_features'.

In addition to that, the options hash is also transfered directly to the Redis connector (using the ‘redis’ gem). You can specify any options recognized by that gem, including:

host: Specify the host to connect to (defaults to 'localhost')
port: Specify the port to connect to (defaults to '6379')

Usage

Once Dolphin has been configured to use dolphin-redis as a custom feature store, you can use Dolphin as you always did. Just enjoy the power of the Redis.

Considerations

Redis is a datastructure server, which is contacted regularly using a network connection. If the server can’t be contacted for any reason (network failure, …), all your features will be turned off (instead of failing every request).

License

Copyright © 2012 Vivien Barousse, released under the MIT license

About

Redis-based feature store for Dolphin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages