tags:

views:

148

answers:

0

hi guys, I want to write a master-slave application in Erlang. I am thinking at the following things I need from the architecture:

  • the slaves shouldn't die when the master dies, but rather try to reconnect to it while the master is down

  • the master should automatically start the remote nodes if they don't connect automatically or they are down (probably the supervisor behaviour in otp)

Is there a OTP oriented behaviour to do this ? I know I can start remote nodes with slave:start_link() and I can monitor nodes with erlang:monitor(), but I don't know how this can be incorporated in a gen_server behaviour.