couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: [PLUGINS] Plugin Hooks
Date Mon, 19 Aug 2013 19:37:08 GMT
Jan and anyone else, if you want to review my changes (20ish lines of code)
to your plugin branch, see

It is also in ASF Git.

A plugin can have priv/couch_plugin.config which is sent to Erlang as an
application config. This is necessary if a plugin has a dependency. Almost
all Erlang "packages" out there want to be configured via
application:get_env(my_dependency, some_setting). The config file must be
present and referenced at VM start time.

A new event, 'plugin_event' for parts of CouchDB to notify plugins of
interesting events. My Erlang-fu is weak here. The event code that Couch
uses (e.g. couch_db_update_notifier, couch_replicator_notifier)
seems very heavy compared to what I did.

A couch_plugin event, to notify plugins when a request has been serviced.

I have a working plugin using this code, logging in NCSA common log format
(i.e. the one everybody expects of a web server). I will write it up in
detail. For the impatient:

* Code:
* Draft writeup:

On Thu, Aug 8, 2013 at 9:27 PM, Alexander Shorin <> wrote:

> I'd same thoughts about when posting, but I think it's good to
> overview available alternatives at least to decide "why not this
> way..."  if someone ask later (:
> On Thu, Aug 8, 2013 at 6:13 PM, Paul Davis <>
> wrote:
> > Skimming over it I'm not convinced its any better than just writing a
> > standard Erlang application. There's a bit more boilerplate but I
> > don't see the move to a non-standard Erlang project structure as a net
> > win.
> >
> >
> > On Thu, Aug 8, 2013 at 9:08 AM, Alexander Shorin <>
> wrote:
> >> Hi Jan!
> >>
> >> Have you looked at eplugin? Can he be useful?
> >>
> >>
> --
> ,,,^..^,,,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message