Tools to read data out of couch efficiently
  • Erlang 97%
  • Makefile 3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Oliver Ferrigni 152db1491f Merge pull request #7 from opscode/of/open_source_license
Apply Apache 2.0 license
2014-09-07 13:55:13 -05:00
src replace deprecated crypto:md5* functions with crypto:hash* 2014-08-20 10:43:05 -07:00
test use couch_util:to_hex for rev_id generation 2013-04-23 10:41:59 -07:00
.gitignore Pass revision id to IterFun for open_process_all 2013-04-16 21:09:18 -07:00
concrete.mk Use concrete for standard makefile targets 2013-04-16 12:52:31 -07:00
LICENSE Apply Apache 2.0 license 2014-09-06 23:54:50 -05:00
Makefile Fix default target of Makefile 2013-04-18 12:34:09 -07:00
Readme.md Apply Apache 2.0 license 2014-09-06 23:54:50 -05:00
rebar.config Add envy to deps. 2013-02-12 15:51:58 -08:00
rebar.config.script Use concrete for standard makefile targets 2013-04-16 12:52:31 -07:00

A tool to extract key/value pairs from couchdb. This code is directly derived from couchdb's file reading code, simplified and pruned down a bit to remove things I'm not using. I've removed gen_servers and tweaked the code to speed things up a bit.

License

All files in the repository are licensed under the Apache 2.0 license. If any file is missing the License header it should assume the following is attached;

Copyright 2014 Chef Software Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Notes on optimization:

Couchdb reads the last 4k of the file first, and generally tends to move from the back to the front of the file. This can subvert the readahead optimizations in the os; especially when you know you are going to read the whole file. Prereading the file in advance can shave a lot off of the walk of the btree, and the open code has been altered to read the whole file in 1MB chunks before walking the btree.