Decisional

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. :drooling_face:

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

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

https://blog.ispirata.com/clustering-elixir-erlang-applications-in-kubernetes-part-1-the-theory-ca658acbf101

https://medium.com/polyscribe/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-1-setting-up-d88b35b64dcd

https://medium.com/polyscribe/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-2-docker-and-81e934c3fceb

https://medium.com/polyscribe/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-3-deploying-to-bd5b1fcbef87

https://medium.com/polyscribe/a-complete-guide-to-deploying-elixir-phoenix-applications-on-kubernetes-part-4-secret-f851d575bdd1

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

blatyo

Conduit Core Team

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.

Where Next?

Popular in Questions Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
jc00ke
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217 Let’s say I have a map with required and optional k...
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement