couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Smith (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1867) Plugins
Date Sat, 17 Aug 2013 17:45:48 GMT


Jason Smith commented on COUCHDB-1867:

Yes, I have a common install of CouchDB with all its plugins, and I choose which to enable
when spinning up an instance. (Multiple instances can run on a machine, on different ports,
and from different config files.) Part of the config is generated dynamically when a couch
starts. So long story short, I am fine with anything, just providing some background about
the odd-looking blacklist feature.

Okay, that is good advice about going too far with OTP. Thanks. Yes, CouchDB follows the "NoTP"

I think I have found a good middle ground, using Rebar to create and build a full-featured
but no-op CouchDB plugin. I have a rebar template working which generates the kind of plugin
that CouchDB currently supports. I am now investigating perhaps a simple rebar plugin which
will automate zipping the CouchDB plugin. I am unsure if that will pay out though. I will
email the list when I am done.

Considering its near-zero real-world exercise, the .ini system is decent for adding modular
functionality. However I see three problems:

1. If you want to change functionality of an existing path (e.g. /_utils) then you must completely
override the normal handler, and then manually call it from your code. For example, futon_couchdb
serves Mobile Futon to mobile browsers. It is a simple user-agent check. For desktop browsers,
I have to manually call the original Futon handler. That is hard coded in the plugin. So if
you reconfigured to some other Futon, and also installed my plugin, then bizarrely, you would
get standard Futon.

2. In general, the order plugins are loaded is very significant. The last http handler to
register for a particular URL wins.

3. Standard stuff. It is early days so there are not many interesting or convenient hooks
into interesting situations within Couch. I am currently working on a custom logger and I
think it will require a minor change to CouchDB core. I just want standard NCSA common log
format for chrissakes! :)
> Plugins
> -------
>                 Key: COUCHDB-1867
>                 URL:
>             Project: CouchDB
>          Issue Type: New Feature
>            Reporter: Jan Lehnardt
>            Assignee: Jan Lehnardt
>            Priority: Minor
> It should be easy to install CouchDB plugins.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message