README.md

Path: README.md
Last Update: Sat Feb 23 07:11:47 +0000 2019

# Moneta: A unified interface for key/value stores

[![Gem Version](badge.fury.io/rb/moneta.png)](http://rubygems.org/gems/moneta) [![Build Status](secure.travis-ci.org/minad/moneta.png?branch=master)](http://travis-ci.org/minad/moneta) [![Dependency Status](gemnasium.com/minad/moneta.png?travis)](https://gemnasium.com/minad/moneta) [![Code Climate](codeclimate.com/github/minad/moneta.png)](https://codeclimate.com/github/minad/moneta)

Moneta provides a standard interface for interacting with various kinds of key/value stores. Moneta supports the well-known NoSQL and document based stores.

A short overview of the features:

  • Supports a lot of backends with consistent behaviour (See below)
  • Allows a full configuration of the serialization -> compression -> adapter stack using proxies (Similar to [Rack middlewares](rack.github.com/))
      * Configurable serialization via `Moneta::Transformer` proxy (Marshal/JSON/YAML and many more)
      * Configurable value compression via `Moneta::Transformer` proxy (Zlib, Snappy, LZMA, ...)
      * Configurable key transformation via `Moneta::Transformer` proxy
    
  • Expiration for all stores (Added via proxy `Moneta::Expires` if not supported natively)
  • Atomic operations
      * Atomic incrementation and decrementation for most stores (Method `#increment` and `#decrement`)
      * Atomic creation of entries (Method `#create`)
      * Shared/distributed database-wide synchronization primitives `Moneta::Mutex` and `Moneta::Semaphore`
    
  • Includes a simple pure-ruby key/value server (`Moneta::Server`) and client (`Moneta::Adapters::Client`)
  • Integration with [Rails](rubyonrails.org/), [Rack](rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache), [Sinatra](sinatrarb.com/) and [Ramaze](ramaze.net/).

If you are not yet convinced, you might ask why? What are the goals of the project?

  • Get people started quickly with key/value stores! Therefore all the adapters are included in the gem and you are ready to go. [Tilt](github.com/rtomayko/tilt) does the

same for template languages.

  • Make it easy to compare different key/value stores and benchmark them
  • To hide a lot of different and maybe complex APIs behind one well-designed and simple Moneta API
  • Give people a starting point or example code to start working with their favourite key/value store. Feel free to copy code, please mention Moneta then :)
  • Create a reusable piece of code, since similar things are solved over and over again ([Rails](rubyonrails.org/) brings its own cache stores, and many frameworks do the same…)
  • See also yehudakatz.com/2009/02/12/whats-the-point/

Moneta is tested thoroughly using [Travis-CI](travis-ci.org/minad/moneta).

[Validate]