How to manage gen_server in ChicagoBoss?

54 views
Skip to first unread message

Caiyun Deng

unread,
Jul 31, 2014, 6:00:48 AM7/31/14
to chica...@googlegroups.com
Hi! 
I have some gen_server and i want they be supervised by some supervisor.
In the OTP application, i will supervise them by a top_sup.
Now in ChicagoBoss, I know i should start them in priv/init/xxx.erl, But i don't know how to supervise them. 
Where is my sup in ChicagoBoss? Should i create one? Or should i create an application in ChicagoBoss?

David Welton

unread,
Jul 31, 2014, 6:12:27 AM7/31/14
to chica...@googlegroups.com
One idea would be to create a separate application, if it's not
tightly linked to CB. Then you could create a release with relx, and
have that be responsible for starting everything, including your other
application and its supervisors and workers. Otherwise, you could
start things in a priv/init/ script.
> --
> You received this message because you are subscribed to the Google Groups
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chicagoboss...@googlegroups.com.
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/20bf12f5-8f7e-4f1e-b34a-c6f910741338%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

Jesse Gumm

unread,
Aug 1, 2014, 5:57:01 PM8/1/14
to chica...@googlegroups.com
Yeah, I would just launch them a supervisor made specifically for your
gen_server, and launch the supervisor in priv/init.

Or make a separate application altogether to deploy as a dependency.
> To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CA%2Bb9R_tGTxwGTsJegWf9N4%3D8UwCRwmeny31s4WaGF7LEzuNqFg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
Reply all
Reply to author
Forward
0 new messages