mdippery / zanegort

An IRC bot
1 stars 0 forks source link

Make zanegort into a "proper" app #11

Open mdippery opened 9 years ago

mdippery commented 9 years ago

zanegort should have a module, zanegort_app, that implements Erlang/OTP's application behaviour, as well as all the proper supervisors it needs.

mdippery commented 9 years ago

I'm not entire sure zane_bot needs to have a supervisor. The gen_server documentation suggests that gen_servers can be "standalone", and I'm not entirely sure I want zane_bot itself to be restarted in the event of a failure. Something to look into, I suppose.

mdippery commented 9 years ago

Essentially, I believe I want the structure of zanegort to be something like this:

zanegort

To be honest, though, that looks a littleā€¦overkill. For one thing, I'm not entire sure I need supervisors for irc_proto and zane_log (which will eventually be a gen_server, as per #15). It might be possible for zanegort_app_sup (which I may just call zanegort_sup instead) to supervisor irc_proto and zane_log. I'm not sure if that's cool in the OTP world, though; I have to look into that more.