开发者

erlang distributed banking system

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 n开发者_运维问答odes 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.


I never tried it myself, but docs seem to point to: Erlang Release Handling (11.3 Distributed Systems).

It's a really short paragraph showing the sync_nodes command, I suggest you to read the whole chapter because I noticed that often the concepts of concurrency and distribution are so persavive in Erlang that problems like yours have already been solved and included in OTP.

BTW, Erlang user guide also has a whole chapter dedicated to Distributed Applications that seems related to distributed applications config options, I think that the two should do the trick.

Hope this helps, if you need more help just ask!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜