couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah Slater <nsla...@apache.org>
Subject Re: [PLUGINS] Plugin Hooks
Date Wed, 21 Aug 2013 18:49:38 GMT
Nice!!


On 19 August 2013 20:37, Jason Smith <jhs@apache.org> wrote:

> Jan and anyone else, if you want to review my changes (20ish lines of code)
> to your plugin branch, see
>
>     https://github.com/jhs/couchdb/compare/1867-feature-plugins...plugins
>
> 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:
>
> https://github.com/jhs/combined-log-couchdb/blob/master/src/combined_log.erl
> * Draft writeup:
>
> https://github.com/jhs/combined-log-couchdb/blob/master/doc/ideas.md#current-idea
>
>
> On Thu, Aug 8, 2013 at 9:27 PM, Alexander Shorin <kxepal@gmail.com> 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 <paul.joseph.davis@gmail.com>
> > 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 <kxepal@gmail.com>
> > wrote:
> > >> Hi Jan!
> > >>
> > >> Have you looked at eplugin? Can he be useful?
> > >>
> > >> https://github.com/Licenser/eplugin
> >
> > --
> > ,,,^..^,,,
> >
>



-- 
Noah Slater
https://twitter.com/nslater

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