[erlang-questions] configuration options

Serge Aleynikov serge@REDACTED
Wed Feb 28 21:01:01 CET 2007


Folks,

I wanted to discuss an OTP feature request that I think would be helpful 
for environments involving many nodes.

When there are many nodes deployed each having custom configuration, it 
is desirable to have a solution that would manage that configuration 
centrally, and serve it to nodes upon startup (or at a special 
configuration reload request).

A sys.config file for a release allows for pointing out to other .config 
files:

   [{Application, [{Par, Val}]} | File::string()].

If this implementation was extended to be:

   [{Application, [{Par, Val}]} | ConfigFunCallback | File::string()].

   ConfigFunCallback = {M, F, Args}
   M    = atom()
   F    = (Env, Args) -> [File::string()]
   Args = list()


then this would allow for ConfigFunCallback to return a list of config 
File names that would be processed in an ordinary manner.  This would 
enable the callback function to download configuration from a centrally 
managed resource, and save it locally prior to having the config files 
loaded by the application_controller.

This seems like a simple extension of the 
application_controller:check_conf/0 function, yet the benefit looks very 
compelling, as it would alleviate the need to maintain configuration 
files (other than a very basic and trimmed down sys.config) locally at 
every node [1].

Would this approach be compatible with the release handler?  I'd 
appreciate getting some feedback on this subject.

Regards,

Serge

[1] Apparently, ConfigFunCallback function would need to be smart enough 
to keep last known configuration locally in case there's a connectivity 
issue with the central configuration resource(s) so that the boot 
process could continue.

-- 
Serge Aleynikov
Routing R&D, IDT Telecom
Tel: +1 (973) 438-3436
Fax: +1 (973) 438-1464



More information about the erlang-questions mailing list