On Jan 22, 2014, at 9:13 AM, Benoit Chesneau <[email protected]> wrote:
> On Wed, Jan 22, 2014 at 3:55 AM, Adam Kocoloski <[email protected]> wrote: > >> Agree, great discussion here. I will say that I think the INI >> configuration system is quite nice, and that I'd love to see couch_config / >> config gain wider adoption as an alternative to using OTP application >> environments (of course we should still make the INI file itself optional >> by embedding the defaults in the code). I'd also say that the fabric.erl >> interface has a number of warts that I'd love to clean up sometime. >> > > > What about having something like cuttlefish [1] from Basho. But instead to > compile from a nginx like format to erlang config file we compile from ini > files? In that case couchdb will have only to fetch the config using Erlang > config system. > > - benoit > > [1] https://github.com/basho/cuttlefish I suppose that could work. I found the restriction of keys as atoms in the Erlang application environment constraining, but I guess config sections could always be implemented using dotted notation like application:get_env(couch, 'database_compaction.doc_buffer_size'). I'd probably still prefer a wrapper around the raw interface to do things like supplying a default value if the environment doesn't contain one. Adam
