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



couchdb tips: All content tagged as couchdb tips in NoSQL databases and polyglot persistence

Generic CouchDB _changes consumer using node.js

An interesting tool for those needing a way to process the CouchDB _changes server-side:

However, one thing that’s missing is being able to write some code in your design document that consumes these changes on the backend and doesn’t depend on another active client. To remedy this situation I decided to write a generic change consumer that you could point at CouchDB and it would find any change handlers in any of the design documents and keep them running, consuming changes, and removing or replacing them when the design document changed.

In the past we’ve also seen how to use RabbitMQ to push notifications from _changes, but both these solutions may prove quite useful.

Other CouchDB tips&tricks


A Stub Ruby Library for CouchDB

Continuing our series of CouchDB tips & tricks, I wanted to include RockingChair, a stub[1] Ruby library for CouchDB that would help you out with the speed of the test suite.

@roidrage and @jweiss

Update: Make sure you are reading also Mathias Meyer’s comment below.

Other CouchDB tips & tricks



Access CouchDB document revisions with RelaxDB

A nice trick to get quick access to the CouchDB document revisions with the Ruby RelaxDB library:

I messed with RelaxDB for Ruby for a little while to get this whole revisiony thing to work. For those familiar with RelaxDB, it exposes RelaxDB.load(_id, :revs=>true) for you, but due to limitations in Couch, you can’t get the :revs from a view, only directly loading an object. So to get around this, I mixed a revisions method into the Document class:

Check the other CouchDB tricks


Paginating with CouchDB

Except the case you are planning to offer your users a very bad experience, you’ll have to figure out a way to paginate through long collections. Using CouchDB is no different from any other storage, maybe it adds a bit of complexity:

CouchDB is a different beast, its aggressive use of indexes means that occasionally you loose some functionality that you’ve been accustomed to having in other persistence mechanisms, like the number of rows matching a query.

The following articles should get you up to speed on how to accomplish pagination while using CouchDB:

And if you have a different solution, please share it with MyNoSQL readers!

Check the other CouchDB tricks