Giter VIP home page Giter VIP logo

redisk's Introduction

Redisk

Redisk is based off of antirez's weekend idea of a redis ugly brother - BigDis (check out antirez' repos). Redisk uses Redis's protocol, and saves the data via a sha1 hash to disk.

Usage

budle exec bin/redisk

The default options are

  • port 6380
  • localhost
  • 2 level hashing
  • /tmp DB prefix

You can change these arguments via a config file, or passing options in the CLI. Check out lib/redisk/config.rb for what options are valid. Passing a CLI option will override a config file that is passed as well.

Example

  • open up one terminal and run the (eventmachine) server:

shair@comp ~/projects/redisk: $ bundle exec bin/redisk

Starting Redisk on port 6380

  • Then use the redisk server to store files on disk:

shair@comp ~/projects/redisk: $ echo "set foo bar" | redis-cli -p 6380

OK

shair@comp ~/projects/redisk: $ cat /tmp/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33

bar

shair@comp ~/projects/redisk: $ echo "get foo" | redis-cli -p 6380

bar

shair@comp ~/projects/redisk: $ echo "exists foo" | redis-cli -p 6380

(integer) 1

shair@comp ~/projects/redisk: $ echo "del foo" | redis-cli -p 6380

(integer) 1

shair@comp ~/projects/redisk: $ echo "del foo" | redis-cli -p 6380

(integer) 0

shair@comp ~/projects/redisk: $ cat /tmp/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33

cat: /tmp/0b/ee/0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33: No such file or directory

shair@comp ~/projects/redisk: $ echo "exists foo" | redis-cli -p 6380

(integer) 0

shair@comp ~/projects/redisk: $ echo "flushdb" | redis-cli -p 6380

OK

Serving files via HTTP

Nginx is known for it's blazing speed for serving static files:

See: http://wiki.nginx.org/NginxHttpRedis

It can be used with simple HTTP req's like GET /key etc.

The content type can be determined with another key.contenttype and be used as the Content Type header.

Nothing here

Any questions?

Enjoy!

redisk's People

Contributors

mutle avatar shaiguitar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.