4

What do you think of Elixir + Phoenix to build API’s? Is it a better choice than a more established language like Python or something more new like Scala or Clojure?

At my company we're going through a watershed moment where we're starting to discuss and think about re-building our digital foundations and nothing is off limits. I'm leading the discussion about our architecture where everyone can have their say into what the future looks like for our applications. We're currently on a Drupal (CMS)  + PHP7/Symfony (Backend Content Repository) + Symfony Twig templates (Frontend)

Even though I have been developing in PHP most of my career, I personally love Elixir and spend a lot of my time away from work learning it but many of my reasons feels subjective like pattern matching, it's actor concurrency model, immutable data and not having to deal with classes/objects, and I'm not entirely sure how that translates to business value, advocating successfully for a tech stack change requires solid reasoning and good answers to challenges like how do we find Elixir developers when existing devs leave, how easy is it to build a CI/CD pipeline for Elixir/Phoenix, etc.

Comments
  • 2
    There was a dude here who loves elixir (rip alex), but honestly anything is better than php
  • 1
    About hiring: hire devs based on ability, not stack, and provide in house training on Elixir. If you already have in house training for your current stack (at least a week's worth of orientation or whatever) then making the jump to Elixir is fairly simple. I do believe that any decently competent dev can learn enough of it in a week to start contributing to the codebase (at least to start reading it), and they can pick it up as they go along and get fairly comfortable. The hardest thing is the paradigm shift towards the Erlang system model with all its quirks and benefits (and cons tbh), so once you're over that new devs can be brought up to speed fairly quickly.

    I've used Erlang in a professional environment, not Elixir so I don't know how good Phoenix is in production, sorry. I can tell you though that Erlang ecosystem deserves its reputation for being quirky but rock solid if you know what you're doing.

    @AleCx04 can tell you more about Clojure in production
  • 1
    @RememberMe thanks for mentioning me bro! :) And to reach out to the point made by OP I would concur with RememberMe and state that the way to tackle the "what if the devs leave" paradigm would be to do the same and hire by skill instead of by tech stack. A good and properly trained software developer not only would be capable of picking up the stack, but would also be eager.

    As far as selling Elixir and the Phoenix framework to your boss I would not hesitate to mention all of the benefits that a language with the features of Elixir could bring to the table. I do not find the points in favor that you mention subjective, but rather favorable (the actor model is awesome and the capabilities for fault tolerance are bomb), the whole ecosystem has testing baked into in, configuration through it's own simple DSL and battle tested libraries. I have only done very small Elixir since I just started learning it with Phoenix last week and I am really liking what I see.
  • 1
    @AleCx04 (continued) there is a reason for it. My love for functional programming, in particular: my love of Lisp. I use Clojure at work, started building a large application in it last week that process large chunks of data from multiple data endpoinds, updates ldap directories and provides user reports to multiple departments. It is still on its early stages, there are a lot of things to fix and redo, but the fact that I was able to get everything going so far (took me a week) is something that still amazes me. Thinking of code in the same way as data does provide certain benefits, even then, one does not really need to write macros for everything, the base system is good enough on most cases. interop with Java, solid web libraries and ease of deployment(shuts out JARS/WARS) made it an easy choice for us. I am also the only one in the city aware of Clojure.
Add Comment