I am trying to ilustrate the concept of distributed applications using Erlang. My system currently has one server and one ATM. I try to keep it as simple as possible.
For the moment my application runs locally. I am using gen_server
for a client-server relationship between the banking server and the ATM. I also have a gen_fsm
module to suggest different states my ATM has. In order to store any data i use the dict
module (I don't want to make things more complicated using databases). To keep processes alive (the gen_server
and gen_fsm
) I am using a supervisor
process. I've wrapped all modules as an application but for the moment it's all local. Any ideas would be highly appreciated.
I was thinking to start the same application on two different nodes and to illustrate the distributed concept to use some kind of failover/takeover mechanism but I have no ideas on what modules to use.
- Is it mandatory to use target systems?(at some point i must do a hot upgrade to the application)
- What's the correct order to do these things: first to upgrade and then distribute?
I would be very grateful if someone could give me some ideas on how to accomplish all those things.