new app, and some mozsvc notes

Ryan Kelly rkelly at
Wed Oct 26 19:54:19 PDT 2011

Hi All,

  I have implemented another simple app on top of pyramid, cornice and
mozsvc.  It's called "keyretrieval", it's very simple, and it's the
server-side component of this proposal:

  Code is here:

  The process was pretty painless, but it's highlighted some things to
think about for mozsvc and related stacks.

  1)  configuration loading and parsing

  The mozsvc package has its own config-file parsing machinery, with
some nice handling of nested sections and include files.  But it's
currently separate from the configuration of pyramid itself and other
related services.

  I implemented the following code to flatten the loaded config file
into the pyramid settings dictionary, so that you can specify everything
in the one place and have it picked up automatically by the different

  It would be good to have all this config-file-loading boilerplate
extracted into a utility function in mozsvc.config, but I'm not sure
exactly what the API should look like.

  2)  pluggable components

  The app currently stores all its data in memory, but it should be
writing it out to a pluggable storage backend configured from the .ini
file.  In other words, it should have something like the plugin registry
load_and_configure() from server-core.

  It looks like Ben is doing something similar in queuey with zope
interfaces and a configure_from_settings function:

  It it worth providing some helpers for this in mozsvc?




More information about the Services-dev mailing list