NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter



libraries: All content tagged as libraries in NoSQL databases and polyglot persistence

LevelDB: Google’s Fast Persistent Key-Value Store Library

Google open sourced a while ago LevelDB , a C++ library that provides an ordered mapping key-value storage. LevelDB performance convinced Basho guys to experiment with adding LevelDB as a storage engine for Riak. And there’s also a benchmark comparing LevelDB with SQLite and Kyoto Cabinet.

The LevelDB project lists the following key features:

  • Keys and values are arbitrary byte arrays.
  • Data is stored sorted by key.
  • Callers can provide a custom comparison function to override the sort order.
  • The basic operations are Put(key,value), Get(key), Delete(key).
  • Multiple changes can be made in one atomic batch.
  • Users can create a transient snapshot to get a consistent view of data.
  • Forward and backward iteration is supported over the data.
  • Data is automatically compressed using the Snappy compression library.
  • External activity (file system operations etc.) is relayed through a virtual interface so users can customize the operating system interactions.
  • Detailed documentation about how to use the library is included with the source code.

You can check out also the old thread on Hacker News about LevelDB..

Original title and link: LevelDB: Google’s Fast Persistent Key-Value Store Library (NoSQL database©myNoSQL)

Redis at Causes and a Redis Mock Library

Two interesting things in this post.

First is using Redis for tracking results for A/B testing:

We here at Causes are pretty big fans of Redis. We use it to track the results of A/B testing with Modesty, our internal health-tracking app uses Redis as its sole datastore, and we’ve used the Redis-backed Resque in an app or two. However, it has been painful to write tests around our Redis-using code.

And the second is creating a Redis mock library for testing purposes:

That’s why we wrote mock_redis. It’s a Redis mock, so you can use it like you would a real Redis object. It’s just a Ruby object, so it’s confined to your Ruby process. Other test runs can’t step on your Redis data, and you can’t step on theirs. The best part is, mock_redis behaves just like a real Redis does in your tests. Transactions? Yep. Hashes, lists, and sorted sets? Check. Multiple databases? Got it. Working expiration? Yes indeed.

Original title and link: Redis at Causes and a Redis Mock Library (NoSQL database©myNoSQL)


Mongs: Data Browser for MongoDB

A read-only web based interface to your MongoDB data:

We use MongoDB pretty heavily at work (along with Postgres and an in-house db), but I haven’t found a good data browser like you get in Futon for CouchDB. There’s a port of Futon to MongoDB, but the data models don’t quite line up and I wanted something read-only and simple. I went ahead and wrote such a one in Python using the Aspen web framework. I’m calling it Mongs, after a local dairy. Check it out if you want a nice clean Python-based data browser for MongoDB.

You can get it from GitHub . Add it to the previous list of nice UI tools for MongoDB.

Original title and link: Mongs: Data Browser for MongoDB (NoSQL database©myNoSQL)


The Story of the MongoDB Erlang Driver

Tony Hannan:

The mongodb driver has a couple of objects like connection and cursor that maintain mutable state. The only way to mutate state in Erlang is to have a process that maintains its own state that it updates when it receives messages from other processes. The Erlang programmer typically creates a process for each mutable object and defines the messages it may receive and the action to take for each message. They usually provide helper functions for the clients to call that hide the actual messages being sent and returned. Erlang OTP provides a small framework called gen_server to facilitate this process definition but it is still non-trivial. To alleviate this burden I created another abstraction on top of gen_server called var. A var is an object (process) that holds a value of some type A that may change.

Original title and link: The Story of the MongoDB Erlang Driver (NoSQL database©myNoSQL)


New Redis Libraries

Silver: database cacher, indexer and searcher

Probably because Silver was released by a publisher, this new open source library got some press today:

Enter Silver. Silver is designed to be a simple, lightweight wrapper for all your calls to a database that you want to cache or index with Redis. It is completely database/web-service agnostic so you should be able to use if for anything you can imagine caching.

Couple of thoughts about this new Ruby library:

  • it is not a transparent caching layer that can be used in your application. Basically you’ll have to rewrite your app to use it.
  • there is not way to update the cache
  • the indexer is — in their own words — “stupidly simple fuzzy text search”

Project is hosted on GitHub.

redis-store: Redis-backed Tomcat session store

Definitely not benefiting from the same media buzz, Jonathan Leibiusky pushed to GitHub a Redis-backed Tomcat session store. Plugging this into your Tomcat would require just updating the conf/server.xml:

<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="true" maxActiveSessions="1" minIdleSwap="1" maxIdleSwap="1" maxIdleBackup="1">
    <Store className="org.apache.catalina.session.RedisStore" 

Tomcat default session store is disk, so if your app is a heavy session users, you’ll probably see a boost in performance[1].

  1. For the moment I haven’t tried this myself and I suppose it’ll need some extensive testing before going into production.  

Original title and link: New Redis Libraries (NoSQL databases © myNoSQL)

Rogue: Type-Safe Scala DSL for MongoDB

Foursquare’s post about Rogue:

Rogue is our newly open-sourced, badass (read: type-safe) library for querying MongoDB from Scala.

Rogue is available on Github.

Original title and link: Rogue: Type-Safe Scala DSL for MongoDB (NoSQL databases © myNoSQL)


Rogue: MongoDB Scala-based Query DSL


Rogue is a type-safe internal Scala DSL for constructing and executing find and modify commands against MongoDB in the Lift web framework. It is fully expressive with respect to the basic options provided by MongoDB’s native query language, but in a type-safe manner, building on the record types specified in your Lift models

Open sourced by Foursquare.

Original title and link: Rogue: MongoDB Scala-based Query DSL (NoSQL databases © myNoSQL)

Smalltalk Client for Riak in the Works

It sounds like someone is working on a Smalltalk client for Riak that (most probably) will be based on the Protocol Buffers-based Riak protocol — chosen for its performance compared to HTTP, the other protocol supported by Riak.

I don’t write about all NoSQL libraries out there, but some sound too geeky[1] to resist not to mention.

  1. Smalltalk is one of the languages I’ve never really got through, so maybe that explains why. Haskell, OCaml are just a couple of other examples.  

Original title and link: Smalltalk Client for Riak in the Works (NoSQL databases © myNoSQL)

JOhm: Object-Hash Mapping for Redis and Java

In case you cannot use Redis with Grails, you might find JOhm interesting:

JOhm is a Java library for storing objects in Redis, a persistent key-value database.

Still in early versions, but looks promising.

Original title and link: JOhm: Object-Hash Mapping for Redis and Java (NoSQL databases © myNoSQL)


Luwak: Riak Library for Large Files

The Riak key/value store is extremely fast and reliable, but has limitations on the size of object that preclude its use for some applications. For example, storing high definition still images or video is difficult or impossible. Luwak is a service layer on Riak that provides a simple, file-oriented abstraction for enormous objects.

Not a FUSE interface, but still interesting. An it has both a synchronous and asynchronous API.

Original title and link: Luwak: Riak Library for Large Files (NoSQL databases © myNoSQL)


MongoDB: Best Python Mapper

I have found on ☞ Quora a detailed comparison of two of the most popular MongoDB Python ODMs: ☞ MongoKit and ☞ MongoEngine (nb the post is using the term ORM, but I guess that’s just out of habit):

I prefer the manner of declaring field types in MongoEngine to MongoKit, but that’s just me. If you’re coming from something like the Django ORM, MongoEngine is very similar.

If you need to make on-the-fly modifications to document schemas at runtime, MongoKit is the way to go. MongoKit also allows you to bypass validation.

Finally, compare the MongoKit and MongoEngine documentation. I find the MongoEngine documentation a much more useful reference (it’s easier to navigate and read — very much my opinion though):

While I’m not a very experienced Pythonista, nor have I used any of these libraries, I must confess that I’m finding both being too much inspired from ORMs. There is structure in document databases, but enforcing all the rules and strictness of a relational model seems a bit too restrictive. Plus, it is unclear on how you can actually take advantage of document databases schemaless when using these libraries.

Original title and link: MongoDB: Best Python Mapper (NoSQL databases © myNoSQL)

Redis and Java: JOhm

JOhm is a Object-hash mapping library for Java inspired on the awesome Ohm.

JOhm is a library for storing objects in Redis, a persistent key-value database.


Sounds quite similar to Redis support in Grails.

Original title and link: Redis and Java: JOhm (NoSQL databases © myNoSQL)