How to configure processes, (and applications)

Anders Nygren <>
Mon Feb 21 17:11:29 CET 2005


Sorry, 
but it got sent before I was finished.

Hi
I am pondering the question of how to best get configuration data 
to processes and/or applications in an OTP based system.

So far I have as a precondition that
1 - Useful default values are in the application resource file
2 - Installation specific values are in the sys.config file

But my question is, "How do I best get the data into the processes
that need it?"

In my first OTP based system I had the processes do application:env/1
whenever they needed the data, but I am not very happy with this.

Now I am considering having the main supervisor of the application
read the configuration data and pass it in the start_link calls to the 
different processes.

I believe that this will be better, easier to reuse, test before the entire
system is developed and so on.

So is this a good idea?
How does the the big guys do it, (Ulf??)

/Anders Nygren



More information about the erlang-questions mailing list