Elixir - you are doing it wrong!

Background

Or so I believe this is the title of the keynote conference given by Dave Thomas, who I am a fan of:

In this talk he mentions several things the Elixir community is doing wrong (including the core team) and he proposes solutions. His talk goes from the horrible boilerpalte that results from using GenServer (which I believe was later on fixed by the introduction of Agents, right?) to OTP applications.

Applications are bad

Dave makes a very good point about OTP applications and the fact the very name is a mess:

In his view (which I agree with) he defines projects in three groups:

  1. Libraries: projects with no state.
  2. Components: projects with state and processes.
  3. Assembly: an assembly of components.

Components and Libraries are easy in Elixir, but Assemblies are another story. An Assembly should be a set of configuration of files and to achieve an automatic assembly/deploy line he created Noddy.

Noody has been forgotten

Noddy never took up. By checking the repo you can see the last commit was something like 9 months ago and it isn’t near production ready.

Naturally this brought me some questions:

  1. Why is that so? I quite like the idea of assembling components and the community is driving towards a state where explicit contracts are used more and more in order to decouple.
  2. What went wrong? Is there are better alternative I am not aware of?
  3. How do you structure your apps? Any good resources?

@Fl4m3Ph03n1x check out existing threads:

1 Like

Thanks for the links @michallepicki, you were faster than me. :slight_smile: To not fragment the discussion, I will go ahead and unlist this thread. @Fl4m3Ph03n1x I recommend checking one of the discussions above, I believe the second link is the most relevant to you. You will notice that others will have already contributed different perspectives to the points brought up.

2 Likes

Thanks for all the help.

If you think my title is offending in any way, do let me know so I can change it. I just thought that using the title of the talk I wanted to discuss was a good starting point, but I can understand if you personally don’t like it or find it click baity.

I have read through the posts and I have noticed that the majority of people seem to agree with the ideas he promotes. He even launched a Components library but I am not sure on how I feel about it (yet).

Even after quickly checking the other posts (I will invest more time on them later) I still believe some of my questions are unanswered:

  1. Wasn’t the addition of Agents an attempt at simplifying all the GenServer boilerplate code as indicated by Dave?
  2. What happened to Noddy and the Assembly idea? What alternatives are there?

I am confused specially on the second question, since no one seems to properly address it. With so many people agreeing with him, one would think Noddy would have become a sensation in Elixir.


Please let me know if you want me to rephrase the title or parts of the post. I still think making this visible could be of value to the community.

Nah, your title is totally fine. I only unlisted because this thread is effectively a duplicate of the other ones so I believe it is best for everyone to continue the discussion there. I think the questions you just posted can be good follow ups there. :+1:

I don’t quite agree with the Dave. While the name application may be a bit confusing it is really a component and a release is how you put things together in “classic” OTP.

2 Likes

My take

PragDave’s new Component library happened.

My decidedly high level, unwashed impression:

  • component → nano-container
  • noddy → nano-kubernetes

but I’m sure that doesn’t give either side of the fence enough credit and that I’m going to have to eat my words later.

1 Like