CouchDB Weekly News, July 24, 2014

Major Discussions

Vote (ongoing): Official CouchDB Bylaws (see thread)

The vote on the official CouchDB bylaws started on Monday, July 21 (see initial email). According to feedback, the bylaws were updated on July 22, it’s now being voted on this revised, current version of the bylaws and the vote is still in progress. Binding votes can be casted by CouchDB Project Management Committee (PMC) members. Still, as this is the first vote of its kind, and this document is foundational to our decision-making process in the future, the CouchDB PMC is asking all active committers to cast voluntary, non-binding votes as well. All votes must be received by 23:59:59 UTC on Sunday, July 27, 2014.

Progress in work on Fauxton (see GitHub)

The work on the Fauxton implementation is going on and making good progress in preparation for CouchDB 2.0. It has just been merged in the new Fauxton sidebar redesign:

If you want to take a closer look: you’ll find the discussion and screenshots here.

Optimizing views (see thread)

Question: a CouchDB user has a simple user document containing fields such as gender, age and dates. They want to request these documents by age, or gender, or dates or a mix of these criteria. Is it more efficient to create a single view containing several emits, or to create several views, each of them containing one emit statement?

Answers:

  • Creating several views may be better, since each one will be slightly faster to search.
  • Also, with one view, it can be easy to get mixed up between different types of keys.
  • Multiple views also allows to split them across design documents, which means they can be built independently and in parallel.
  • Regarding the specific use case described in the question, this user falls in the field of multi-dimensional queries, which CouchDB isn’t suited for. The solution generally is to use couchdb-lucene or even elasticsearch or something similar.

How many views per desgin doc in CouchDB? (see thread)

Question: Is it better to define one view per design doc? If I have e.g. 8 views for a given person design doc, would they better be placed in one single doc or breaked into smaller units?

Answers:

  • The answer heavily depends on the specific use case. In general, one can
    split views that are slightly slower to process into separate design documents so that they may be run in parallel.  In the case of a query that
    requires a (re)build (e.g. no stale=ok or update_after), then this also
    means that one only has to wait for the one view to finish.
  • The smaller unit will save a lot of trouble, especially when updating the code of large views.
  • On the other hand, if the views are re-indexed independently, then each task is reading the documents out of the database. Whereas if the views are in the same design document, the documents only get read once and then passed to each view’s map function. This may be faster, but also depends on details of the view engine used.

Releases in the CouchDB Universe

Opinions and other News in the CouchDB Universe

Use Cases, Questions and Answers

no public answer yet:

For more new questions and answers about CouchDB, see these search results.

Get involved!

If you want to get into working on CouchDB:

  • We have an infinite number of open contributor positions on CouchDB. Submit a pull request and join the project!
  • Do you want to help moving the CouchDB docs translation forward? We’d love to have you in our L10n team! See our current status and languages we’d like to provide CouchDB docs in on this page. If you’d like to help, don’t hesitate to contact the L10n mailing list on l10n@couchdb.apache.org or ping Andy Wenk (awenkhh on IRC).

We’d be happy to have you!

Events

Job opportunities for people with CouchDB skills

Time to relax!

… and also in the news

CouchDB Weekly News, June 26

Releases

Apache CouchDB 1.6.0 released

This is a feature release. Download link | Release notes

Blog Posts

Weekly CouchDB meeting – summary

  • 1.6.0 released: We encourage you to get your own CouchDB upgrade here
  • Welcome new committer: Lena Reinhard has been elected as a new CouchDB Committer
  • BigCouch merge: The merge has been done, currently .couch file migrations are being tested from 1.1.2 onwards for the latest point releases. See the call for help with testing and details about the testing procedure here.
  • CouchDB Blog: There’ll be a new CouchDB Blog soon (see email)
  • L10n (Localisation): Help with translation of CouchDB docs is highly appreciated! See “get involved” section below for details
  • AdvocateHub: The Marketing Team is planning the implementation of a new tool for community care, a timeline has been drafted (see email)

Major Discussions

Fauxton Dashboard (see thread)

We’re about to start working on adding Show + List functions into the Fauxton Dashboard. If there is anything you would like to see added in the functionality, please let us know on dev@ mailing list.

How to get the BigCouch Merge + Fauxton running for testing (see thread)

How to get the BigCouch branch and Fauxton running for testing. The detailed description can be found here. Please help us with the tests, and post any bugs you notice to dev@ Mailing List. Your help is highly appreciated.

Error with complex viewings and doc size (see thread)

Setup: database with 10 documents, some >1GB. When the user tried to do relatively complex viewings, an error occured. They asked if there was a way for the viewing to bother only with a specified doc in the database and not go through all the doc. In addition, they asked why even with smaller docs the views take quite long.

Approaches:

  • Very large docs should be broken into smaller ones. Depending on the application and the data model, this can be recommendable. In any case, files of around 1GB size should be avoided, if possible.
  • The views get constructed at the time of first access after a new doc is uploaded to the database (and every time a doc is updated). So, in normal service this should be pretty fast.

What is considered idle in CouchDB? (see thread)

A user referred to the description of max_db_open where it says “CouchDB reference counts database accesses internally and will close idle databases when it must.” They asked what’s considered idle in CouchDB and if the idle time was configurable.

Answer:

  • The database considers idle by active references to it and by related active operations (like compaction) (see this post)
  • CouchDB uses LRU cache to manage open databases and frees idle by demand (see this post and this one).

There is no need for specific configuration.

Effects of changing the limit of max_dbs_open (see thread)

Setup: around 90K+ databases. max_dbs_open was set to 100K which led to a high memory usage. Thus, max_dbs_open was reduced to 50K. This reduced memory usage but led to a lot of opening and closing index in the log file and according to the change feed, only a quite low number of databases is being changed at all time.

Answer: CouchDB references to a database even there is no client attached to it. It will hold databases open up to the limit of max_dbs_open. If a request goes to a database not open, then the oldest database is closed to ensure that the total remains at or below the max_dbs_open setting. So CouchDB will keep 50,000 databases open at once with this setup, regardless of whether clients are making requests to them. If the user wants fewer databases open at once, max_dbs_open should be lowered.

Releases in the CouchDB Universe

  • express-user-couchdb 0.3.0 – An express app module connected to couchdb _users table
  • sails-couchdb-orm 0.10.2 – CouchDB adapter for Sails
  • couch-login 1.0.1 – A module for doing logged-in requests to a CouchDB server
  • frugal-couch 0.1.0 – Allows minimization of the number of HTTP requests to CouchDB
  • express-couchdb-fs 0.3.4 – An express module that adds a CouchDB file service API to any express app
  • slipcover 0.2.4 – Lite wrapper for CouchDB
  • http-replay 0.1 – Library to replay and compare HTTP requests and responses, e.g. to record CouchDB replication and replay that against another backend for testing; includes filtering of responses
  • ionic-pouchdb-todo – A simple Ionic Todo app with a PouchDb local storage backend configured to sync with a CouchDB installation
  • Cloudant Query – offering a declarative way to define and query indexes on the database. For more information, see also this post.

Opinions and other News in the CouchDB Universe

Use Cases, Questions and Answers

no public answer yet:

For more new questions about CouchDB, see these search results.

Get involved!

If you want to get into working on CouchDB:

  • Help test BigCouch file migration for .couch files with your personal databases – you’ll find all details on the testing procedure here
  • We have an infinite number of open contributor positions on CouchDB. Submit a pull request and join the project!
  • Do you want to help moving the CouchDB docs translation forward? We’d love to have you in our L10n team! See our current status and languages we’d like to provide CouchDB docs in on this page. If you’d like to help, don’t hesitate to contact the L10n mailing list on l10n@couchdb.apache.org or ping Andy Wenk (awenkhh on IRC).

We’d be happy to have you!

New Committers and PMC Members

Events

Job opportunities for people with CouchDB skills

… and also in the news