Deployment tools?

Martin J. Logan <>
Tue Oct 26 22:53:56 CEST 2004


<snip>
> 
> 	2) Dynamic reconfiguration.

This one is not as simple as it seems. First of all your code must be
written in such a manner as to allow a altered config to make its way
into process state. 

cant have

init() -> 
    Blah = application:get_env(blah, blah),
    {ok, #state{blah = blah}}.


but instead you must use get_env everywhere blah is referenced or have a
clean way of HUPing the processes to re-read config and update state.
Whatever way you choose it sill necessitate some stylistic changes.

The solution that a few colleagues and I came up with was to wrap
configuration with another api and include that api as part of a generic
services application included in every release.

<wrapper>:get_env(Application,  Key, DefaultValue)

Then wrapper functions first referenced a central configuration
repository. This repository saved configuration for all apps on the
system and was capable of being updated at anytime. When an application
configuration was updated all or some subset of all apps would receive
the update based on manager discression. 

This was a great system in theory but for whatever reason never quite
made it in production. This is perhaps because "wasting time on that
uhrlang or airplane, whatever, language no one knows" was frowned upon
in that environment )-:
 


> 
> 		This is similar to the above, and I've actually done it, but it was 
> more work than I'd think I'd need to make.  A lot of my monitoring 
> parameters are in my .app config (device aliases, operating range, 
> maximum amount of time I can go without hearing from a device, 
> notification lists, etc...).
> 
> 
> 	Currently, I go to the nodes and just restart the apps.  Doing so is 
> just a little inconvenient, but also causes me to lose a little state.  
> If a sensor is in an alarming state, I want to avoid sending an alarm 
> for a certain period of time, which is state that's kept on the stack.
> 
> --
> SPY                      My girlfriend asked me which one I like better.
> pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <>
> |    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
> L_______________________ I hope the answer won't upset her. ____________




More information about the erlang-questions mailing list