[erlang-questions] inets and ssl start/1 stop/1
Thu Jan 15 18:02:48 CET 2009
On Jan 14, 2009, at 11:44 AM, Claes Wikström wrote:
> Edward Stow wrote:
>> Within a yaws application I am start/1 ing inets and ssl to send a
>> post request to an external server.
>> Should I be stopping these services when my request returns.
>> I assume that for each yaws request a new process is started and that
>> the inets ssl services are stopped when the process exits.
> Don't stop anything.
inets and ssl are other erlang applications like yaws. [ ie, when you
start them you are starting other processes in the supervision tree of
the application controller and not likely to be linked to your current
process which is handling the request, and not likely to stop until
told to. ] Since you're using inets and ssl you generally you want
to get them started when you start all your applications [ not on
every web request. ] Yaws can help here. Yaws is also a container for
starting up erlang itself and the relevant erlang applications,
[ assuming you're not using embedded mode. ] to this end it has a
mechanism in it's config file called runmod where you can list inets
and ssl. And then yaws the container will start erlang, and start
your runmods, and start everything that it needs running.
runmod = ModuleName
At startup yaws will invoke ModuleName:start() in a
process. It is possible to have several runmods. This
if we want to reuse the yaws startup shell script for
I hope that clarifies things. [ and I hope I said that all right. :D ]
More information about the erlang-questions