ALL COVERED TOPICS

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

NAVIGATE MAIN CATEGORIES

Close

nosql tips'n'tricks: All content tagged as nosql tips'n'tricks in NoSQL databases and polyglot persistence

CouchDB List Functions

Just another trick for your CouchDB toolbox:

List functions are a mechanism for iterating over rows in a view to produce output. CouchDB list functions are typically used to generate alternate formats for output (Atom, XML, HTML, etc.). I still want to generate JSON for consumption by my Sinatra application. Hopefully, that will not prove difficult.

Other CouchDB tips&tricks

via: http://japhr.blogspot.com/2010/02/collating-not-reducing-with-couchdb.html


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

via: http://www.mikealrogers.com/archives/726


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

References

via: http://www.rubyflow.com/items/3441


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

via: http://fapper.com/post/379058417/easy-document-revisions-with-relaxdb


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