WildYorkies

WildYorkies

Where is Elixir and the Actor Model heading?

It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases.

Usually these x, y, and z use cases are not good because “Elixir is not fast enough for raw computation” or something of that sort.

In my mind, Elixir seems like more of an investment. Either:

1. The Actor model is the wave of the future in terms of program design and structure, and investing in Elixir would be a very smart move if even to wrap your head around the actor concepts
2. The Actor model is the wave of the present and is merely the best way to structure distributed apps that we currently have

After all, I’ve heard from people that Actors are not necessarily the best in terms of code clarity OR efficiency. CSP or STM could be better in this area even.

Now, I know that someone will say “Erlang isn’t technically an implementation of actors”. That’s fine, but it’s close enough.

The question I’m getting at is are Elixir users/contributors dedicated to the vision of #1 or do they see Elixir as more of #2. I assume that #2 is more likely based upon the way people in this community generally talk.

For example:

  • “Elixir is not good for GUI programming, use something else”. It seems to me that Elixir and the messaging passing system would be ideal for GUI programming. Why just write this off as something not worth pursuing?
  • “Elixir is not good at number crunching, use something else”. Okay, so why not teach/show people how to use the FFI to call out to number crunching C libraries instead? Why abandon Elixir all together?

You get the picture.

tl;dr - Do you think people are drinking the “Polyglot Programmer” kool-aid a little bit too much rather than being excited about Elixir’s future?

Most Liked

peerreynders

peerreynders

What boggles my mind is that people are still looking for the “perfect programming language” that will do everything well when since (shortly after) the dawn of the world-wide-web you’ve needed a collection of fundamental technologies (HTML, CSS, JavaScript) to even put together a reasonably interactive web page (not to even mention the supporting server-side technologies). So I hardly think that the “Polyglot Programmer” is in the realm of “Jonestown kool-aid”.

Programming languages are technologies typically optimized for a specific purpose - jack-of-all-trades technologies tend to not do anything particularly well, they are just “good enough” for some people. So if you are working with anything that has a reasonably wide scope you are usually committed to working with multiple technologies and that can mean multiple (specialized) programming languages.

Now, I know that someone will say “Erlang isn’t technically an implementation of actors”. That’s fine, but it’s close enough.

That doesn’t change that you yourself may be too fixated on the Actor model (the same way an OO enthusiast may focus on objects, totally overlooking the “messages”).

The BEAM doesn’t care about the Actor model - it’s about lightweight processes and how the BEAM schedulers manage them. For me this talk expresses the spirit of the BEAM most clearly:

Lambda Days 2015 - Torben Hoffmann - Thinking like an Erlanger

The BEAM is more than a virtual machine - it’s actually more like a mini-OS - one that is smarter about how to get the most (concurrency, rather than raw power) out of the host hardware than the actual OS it is operating on.

Complaining about Elixir, Erlang or any other BEAM langauge not being good enough for all applications is almost like complaining that bash, bourne shell, zsh, etc. aren’t good enough for all applications. The concurrency support means that you can choreograph or orchestrate concurrent activities fairly easily while at the same time being able to “outsource” certain work to other tools that may be more suited for a particular task.

Now some developers don’t want to leave the “comfort and familiarity” of their preferred programming language/environment - but that is a separate issue (and an unreasonable expectation in our increasingly “connected” world).

So competing implementations of the Actor model are largely irrelevant because the real gold is with the BEAM’s schedulers (and to a certain degree “distribution” but more from a local fault tolerance perspective rather than “heterogenous” and “world-wide” distribution).

michalmuskala

michalmuskala

Elixir could be awesome for GUI programming - we just lack proper tools.

Elixir could be awesome at number crunching - it’s just our VM is not optimised for this.

This are not inherent limitations of Elixir, but rather the result of the current state of the ecosystem.

16
Post #3
gregvaughn

gregvaughn

I’m going to take this off in a slightly different direction. You should not be focusing on the Actor model at all. What initially drove Erlang’s design was fault tolerance. It was built in industry, not academia. Ericsson needed software that kept running in the face of errors. They only accidentally re-invented the Actor model because of that focus on fault tolerance and supervision.

The way I’d phrase an answer to your question, is that the Actor model is the best way we know how to build fault tolerant systems today, but since fault tolerance is the primary driving design choice among the BEAM community, if a better way is discovered, I would expect them to embrace it.

Where Next?

Popular in Discussions Top

arpan
Hello everyone :wave: Today I am very excited to announce a project that I have been working on for almost 3 months now. The project is...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
New
rower687
Hi all, I’ve been reading a lot about the “let it crash” term and how supervising processes and the whole messaging passing make an elixi...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I fore...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
hariharasudhan94
Lets say i have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => "XX...
New

We're in Beta

About us Mission Statement