[erlang-questions] non-trivial supervisor idioms?

Joseph Wayne Norton norton@REDACTED
Mon Sep 27 16:28:02 CEST 2010


Dan -

It depends on your application and needs, but I'd put this type of setup  
work in your application's start/2 callback before starting your  
application's supervisor(s).

On Mon, 27 Sep 2010 23:15:00 +0900, Daniel Goertzen  
<daniel.goertzen@REDACTED> wrote:

> I've read the documentation on supervision and have seen a few tutorials,
> but they don't seem to move beyond the core concepts.  For example, what
> happens if you want to check and optionally setup an mnesia schema during
> startup...where should this code go?  In the supervisor init() or
> start_link() function?  Should I have my supervisor create a worker  
> process
> whole sole job is to do this kind of setup and then dynamically add other
> workers (or supervisors) to the supervisor with start_child()?
>
> I have this feeling there are already idiomatic ways of doing this, and  
> I'm
> reinventing the wheel poorly and incompletely.
>
> Any advice appreciated.  Thanks,
> Dan.


-- 
norton@REDACTED


More information about the erlang-questions mailing list