[erlang-questions] Re: Nested Supervisors

Vance Shipley <>
Wed Mar 30 23:19:38 CEST 2011


On Tue, Mar 29, 2011 at 11:20:54PM -0400, Chris Wilson wrote:
}  I'm looking for some examples on starting more than one level of supervisors
}  in a supervision tree.  Almost everything I've seen has been one supervisor
}  and many workers and I've not seen any documentation or examples on how I
}  might start multiple supervisors within one supervision tree.
  
I make heavy use of supervision in all my applications.  While it's 
been said that more than a couple levels of supervision becomes 
unwieldy I insist on every process being supervised.  If for no other
reason than that application:stop/1 should cleanly stop every process,
or in a more practical sense `q().` from a shell prompt should exit
silently and without hanging.

My LAPD protocol implementation(*) uses three levels of supervision
and is well documented:

	http://motivity.ca/lapd/

The fun comes in when you are dynamically starting and stopping 
processes in the tree.  

(*) http://code.google.com/p/lapderl/
-- 
	-Vance



More information about the erlang-questions mailing list