[erlang-questions] Use of application environment

Edwin Fine erlang-questions_efine@REDACTED
Tue Dec 2 05:11:20 CET 2008


On Tue, Nov 25, 2008 at 4:57 AM, Mazen Harake <
mazen.harake@REDACTED> wrote:

> Resending...
>
> /Mazen
>
> Mazen Harake wrote:
> > Personally I think in terms of isolation and how long the worker is
> > going to live.
> >
> > If the worker is short lived and doesn't depend on that the app env is
> > the same in several places... then I tend to use application:get_env.
> > If the worker is a more heavy worker and depends on more rigid values
> > then I tend to copy the configuration to the state so that I can
> > control when a good time to update it is..
> >
> > Magically updating all the workers is not always a good thing... and
> > yes, applicationg:get_env is the same as using global variables.
> >
>

Hi Mazen,

I was holding off from replying and hoping to receive more opinions and
thank everyone at once, but I guess no more are forthcoming. Many thanks to
you and wde for your input.

Regards,
Edwin Fine


> > /Mazen
> >
> > Edwin Fine wrote:
> >> Hi all,
> >>
> >> Is it considered bad practice to use application environment
> >> variables (i.e. application:get_env/2,3) in workers, as opposed to
>
<snip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081201/c607b059/attachment.htm>


More information about the erlang-questions mailing list