CouchDB and Ruby Best Practices

This video explains CouchDB and Ruby best practices observed, tried and implemented, from a large pool of examples helping optimize and debug customers applications. Due to the necessity of re-explaining some core CouchDB concepts, this video may function as an introduction to CouchDB, but will also contain valuable lessons for the more experienced user.

CouchDB is an increasingly common member of the Ruby developer’s toolset. Its flexible model, low footprint, REST interface, and wide library support make it a natural choice for many web, mobile, command-line, and desktop Ruby apps. As community manager at Cloudant, I can tell you that Ruby is the #1 language customers use to access our CouchDB hosting service. But unfortunately, it’s also the language where I have observed the highest levels of egregious misuse. Out of the hundreds of Ruby production apps that use our service daily, an overwhelming majority are plagued by poor design, wasteful queries or inefficient indexing; and as a result, the average response time for our entire Ruby userbase is 2–3x higher than in other languages.

Beyond plain misuse, I have also noticed a rampant and severe underutilization of CouchDB; in most cases, it’s dropped in as a replacement for MySQL and used in the exact same pattern you would a single-instance, relational database. CouchDB has much more to offer, and by leveraging some parts of its design, I believe it can help the average Rubyist solve very common pain-points or serve very common use-cases, from embedded Ruby apps, to mobile applications and of course, web services.

Video Producer: Golden Gate Ruby Conference

Related Content: