I’m new in this technology, ours company planning use Elixir for rewrite .ge domain registrar platform. Also I think we will be active in this forum.
I already have a lot of questions. Help me if you have similar experience.
We are planing use messaging for implement micro-service architecture, but I found very few resources about this experience. What you think? Whether the Elixir will cope in a highly loaded environment. And whether it is profitable to implement the micro-service architecture and messaging (ZeroMQ replacement) for solving these problems.
I try set node name for one module, and i used two ways for solving this problem, but on my opinion this solutions not elegant.
Whether the Elixir will cope in a highly loaded environment.
Whats your definition of highly loaded? The BEAM (the VM elixir runs on) does cope very well with limited ressources, but as with every other language, its easy to write code that doesn’t cope well, while you need to take care of things when you expect strictly limited resources.
I try set node name for one module,
Node names are per node (an instance of the BEAM), not per module. So this doesn’t make much sense…
adding this code, but i not understand what is best practice for this solution, and where add this line :net_kernel:start([foobar, short names]).
That sets the name of the current Node to whatever is stored in the variable foobar, you’ll probably want to do :net_kernel.start([:foobar, :shortnames]). This has to be done anywhere, but starting your node with a name straight away makes often more sense and scales better.
when start application add --sname flag (e.g. iex --sname foo)
Yupp this starts the node with a name straight away.
use Node.start but when i try trowed exception and i can’t use this function
Which exception? Its prefered over :net_kernel.start/1 because it wraps a little bit more stuff.
Also please remember, when you use shortnames, you can’t connect to Nodes over the network!