📜 ⬆️ ⬇️

Up the pool

I am a programmer. Therefore, things that “just work” always amaze me. I had this feeling when I became acquainted with the Erlang Pool. The setup requires some attention, but afterwards, the mechanism is “offensively” simple.

To run the Erlang pool, you need the following:

That's all. Once everything is ready, run a shell on the host computer and execute:
pool:start(Name). 

And so! You have your own Ad-hoc, load-balancing, distributed pool of computers. You do not need to run nodes on other computers: Erlang will do it for you. The following command on the main node will start the process with the function and arguments on the least loaded node:
 pool:pspawn(Mod, Func, Args). 

I called it “insultingly simple” because it is an insult to all bloated, commercial, expensive BPEL-for-Web-Services-on-J2EE (or .NET) application servers, etc. We are too accustomed to "graphic editors that generate XML, which generates code that is packaged with a manifest and sent to a special server." When someone comes up and says, “Hey, the shell and plain-text config is all you need,” this is a bit shocking.

Keep It Simple, Stupid.

')

Source: https://habr.com/ru/post/114663/


All Articles