[erlang-questions] Re: Nested Supervisors

Chris Hicks <>
Wed Mar 30 07:23:28 CEST 2011


Take a look at:
http://www.trapexit.org/Building_a_Non-blocking_TCP_server_using_OTP_principles
While it isn't specifically addressing your issue, the article does show how to nest supervisors. They do throw a few bits of functionality that could be put into separate modules into one, but it shouldn't be that hard to figure out at all.
-Chris Hicks

Date: Tue, 29 Mar 2011 23:20:54 -0400
From: 
To: 
Subject: [erlang-questions] Nested Supervisors

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'm trying to build a structure similar to what is below, a simple monitoring application to track events in a typical network environment within a given site. аA site level supervisor handles N number of L3 networks and their workers and spawns N number of supervisors for VLANs in a given MST instance. аThis example is slightly contrived in that I "could" flatten this structure out, but I'm looking to do other things with those vlan workers and may go another level deeper. а

аа а а а а а а а а а а а а а а а а а аvlan_monitor_workerаа а а а а а а а а а а а а а а а а а /аа а а а а а а а а а а vlan801_supаа а а а а а а а а а /аа а а а аnet1_sup
аа а а а / а а а а а \аа а а а/ а а а а а а \аа а а а а а а а а а а net1_mon_workerаSite_supааа а а а а а а а а а а net2_mon_workerаа а а а\ а а а а а аа/
аа а а а \ а а а а а /аа а а а аnet2_supаа а а а а а а а а а \аа а а а а а а а а а аvlan802_supаа а а а а а а а а а а а а а а а а \аа а а а а а а а а а а а а а а а а аvlan_monitor_worker

Thanks in advance for any guidance.
-Chris

_______________________________________________
erlang-questions mailing list

http://erlang.org/mailman/listinfo/erlang-questions 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110329/ac6ef343/attachment.html>


More information about the erlang-questions mailing list