Decisional
Elixir in an environment of polyglot microservices; feasible or not?
My question: considering an application consisting of a set of polyglot [micro ~ substitute your definition]-services, would Elixir, and in extension Erlang, fit into such an environment?
Disclaimer: I am new to Elixir. I’ve started learning and experimenting only a few weeks ago, and do not mean to offend with an unthoughtful question, I just didn’t come across satisfying answers to this problem yet. 
There have been several questions to this avail, and from the discussion around those, as well as from two excellent articles - [Dawn of the Microlith](http://Dawn of the Microlith), http://blog.plataformatec.com.br/2015/06/elixir-in-times-of-microservices/ - I have gathered that the unique features of Erlang and Elixir, namely the BEAM and Elixir Umbrella-Projects, much of the real world benefits of a micro service-oriented architecture can be had in Elixir, without some of the complex drawbacks of such a system - all while not actually writing micro-services.
What is still an open question to me, however, is how BEAM-bound languages, Elixir in particular, can cope in an environment in which they’re not the sole, or even a privileged, resident - namely as part of a set of polyglot micro services, written in different languages and using vastly different tech-stacks.
While I’ve heard that the BEAM has performance related issues when communicating with external processes, I haven’t found much concrete information of Elixir or Erlang in such a context, nor am I even aware of the preferred, if there’s such a thing, way of handling inter-process communication with the BEAM.
While I’ve read up briefly on ports and such, I haven’t gained much clarity yet.
So, I guess to sum it up, there is a core question in my mind:
Is Elixir fit to run, as a service and containerized, besides a myriad of other, distributed, not-necessarily-Elixir services?
Most Liked
peerreynders
Just some examples:
It’s is sometimes suggested that Erlang/Elixir can be used with the BEAM to choreograph activities. However a lot of things can be done quite effectively on the BEAM itself so interactions are typically restricted to scenarios where there is a significant, tangible benefit to doing something in a different environment.
In terms of containerization it becomes a question of what role Erlang/Elixir has to play in terms of controlling distribution as your container management system is largely calling the shots. The BEAM was designed before containers arrived on the scene and doesn’t necessarily benefit from the extra layer of indirection that containers impose. Erlang and the BEAM have a bit of a different view of what constitutes reliability and high availability - while processes come and go if designed properly, the “system” should rarely need to be down (i.e. cycled or re-cycled) even in the face of single node failures (hardware or software).
I would expect that a system designed around OTP/BEAM would consume much fewer resources compared to an on-demand container-based management system that is more targeted toward the elastic consumption of readily available commodity server resources.
https://medium.com/@pentacent/getting-started-with-elixir-docker-982e2a16213c
If I recall correctly Dawn of the Microlith was more about avoidance of the overhead of micro services by sticking to systems designed around the BEAM. In a sense, instead of building a microservice around a bounded context you would build an OTP application (or a set of them) instead.
blatyo
As long as you’re using open standards for communication between services. It generally doesn’t matter what language you choose. Erlang and Elixir speak most of those open protocols like HTTP, AMQP, etc. I’d say, you’d be hard pressed to find a language that couldn’t fit.







