zedshaw/mongrel2 — Issue #97: Enhancement of module interface
Author: wysman
Created: 2012-01-06 21:36:50+00:00
State: open

Hi,

I
=

Actually configuration module can only extract data from a "specific source".
So if you write tour own module, you need to write software to import raw config file into your specific storage.

I propose to add a optional write support for each configuration module.
That will allow to use "m2sh load -config foo.conf" to load configuration in every storage supported by module.
Pro, you can easily test or migrate your configuration from a configuration storage to an other.

II
==

Review the way that a module is selected :
Mongrel2 arguments are : _mongrel2 config.sqlite server_uuid [config_module.so]_

Instead of "config.sqlite", an URI will be more usefull.
This URI may be formated like : ://
* sqlite:///path/to/my/conf.sqlite
* mongodb://srv:127.0.0.1:m2
* xml:///tmp/file.xml
* zmq://example.com:1234
* ...

In each case mongrel2 will try to load module "sqlite.so", "mongodb.so", ..., in the module install dir.

William