restack_oslo
Elixir vs. Java, Ruby, and PHP - Seeking case studies or an interview with a community member
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 those in the know.
I am a new business analyst and delivery manager, researching Elixir - Phoenix. I came accross this language, commissioning the work for my startup out to a developer who suggested this technology. I saw many comparisons between Ruby and Elixir but not so much for the other languages (Java and PHP). I have already reached out to several authors and developers but with no luck.
Specifically, I wanted to build a matrix illustrating when I would choose Elixir over or stay with Java, PHP, and Ruby. I am looking for an answer in the form of situational examples or specific criteria. Case studies would be a real plus. Any help would be appreciated. I will cite you as a source in my prose as well as link to your site.
Thank you,
Alex.
Most Liked
DianaOlympos
Ok so, kinda hard to find a case study, but here are my point of view
Java
++ Easy to find devs
++ Easy to find “known practices”
++ Easy to sell to company
++ JVM is quite good at computational heavy stuff once warmed
– JVM is a really really finicky piece of software to operate
– Needs for overcomplex architecture and code to do anything
– Needs for a lot of “Best practices” to do the work
– Really hard to separate good from average devs.
– OOP, ie flawed by design
PHP
++ Easy to find devs
++ Easy to sell to companies (Facebook use it!)
++ PHP7 is not too bad at speed at all
++ Easy to deploy
– Broken by design
– Not really meant for long lived stuff
– Hard to operate.
– Hard to keep clean and maintainable
– Really hard to separate good from average devs
Ruby
++ Easy to find devs
++ Gem for everything
++ “Easy” to deploy
++ Nice for the devs
++ Can be easy to maintain if nicely done
– Flawed by design (OOP)
– Slow. As hell
– Not really easy to operate
– Really hard to separate good to average devs
– Really not meant for long lived stuff
Elixir
++ Nice for the devs
++ A design that make sense (and do not breaks the laws of physics)
++ Easy to maintain
++ Easy to operate and debug
++ Quite fast
++ Ease of interacting with other languages
++ “Habits of solving the hard problem the right way”
++ Accept the reality of errors and problems.
– Harder to find devs, but tend to be good
– Harder to find “Good Practices”
– A bit harder to deploy
– Meant mainly for longer lived stuff, bad at scripting.
– Hard to sell to other companies (there are case study mind you)
– Not good at computational heavy (but see interactions with others)
There i hope it helps
BTW @OvermindDL1, welcome to the RESF ( Rust Evangelism Strike Force)
alisinabh
I will explain some things i learnt from Elixir. This is what i know i what i know can be wrong.
To answer your question first i need to remind you Elixir will compile to Erlang VM (AKA BEAM) Bytecode, So we can say it’s same as Erlang in runtime.
Upsides
-
First of all Erlang is super robust. I heard there are telecom switches running Erlang non stop for 20+ years. Thats interesting.
-
Elixir/Erlang use immutable data structure, means it’s less likely going to suffer from concurrency issues. these issues can happen a lot on Object Oriented languages like Java.
-
Elixir/Erlang is easily scalable. A client-server architecture in Elixir (like GenServer) is very helpful to convert a monolith application to a micro-service like application without needs for creating an API interface since Erlang can talk between machines easily using Node module.
-
Elixir has a friendly community and maintainers, I really value this.
-
In Elixir/Erlang your process (BEAM process) will not get terminated easily. There is no StackOverflow exception. However memory outage can crash whole VM.
-
Most Elixir libraries are well documented. The code-style encourages programmers to write good docs about every public function by providing nice Tools like ex_docs
-
Deployment of elixir code to server if fun and safe. Specially the Hot Code Upgrade lets you upgrade you application with zero downtime.
-
For web development i’ve never seen something like
plug. plug is awesome. -
Erlang/Elixir can handle high loads of traffic like a boss.
Visit here to learn more: 2 Million Websocket Connections in Phoenix
Whatsapp uses Erlang as their main language. I’ve read in their blog that they handled over 2,300,000 connections to a single box. Whats app 2 million connections
Downsides
-
Elixir is a new language and can change a lot in many aspects. So you need to be more active and up-to-date.
-
Erlang/Elixir is not a good candidate for applications which rely heavily on calculations. (But you can use a combination of C/C++ or Rust with Elixir if you need calculations. more info here: github.com/hansihe/Rustler)
-
There are not lot’s of Erlang/Elixir developers. Currently they are not easy to find. It may cause some expenses to your company.
-
Some Erlang native libraries are hard to understand and Erlang documents are a bit wired in my opinion.
Im sorry about my poor english.
AstonJ
Elixir and Erlang are built with distributed systems and concurrency in mind - for scalability and availability (fault tolerance) few languages come close. Do you need more reasons than this?
Elixir offers us a ‘modern’ language for the Erlang Virtual Machine - many say that Elixir is the language that the Erlang Virtual Machine deserves (thanks to it’s ‘nicer’ syntax, tools, frameworks etc).
Personally I think something that is often overlooked by managers is that developers who use languages like Elixir often fall in love with them. This promotes a culture of learning and something I believe leads to significantly better developers …they learn as much as they can because they want to, not because they have to (JS/browsers) or because they are told to (Java/enterprise).
People usually excel at what they enjoy - do you want a team who is passionate not just about your startup but about the technology it uses? Or a team who are not all that inspired by the work because it’s with a language they don’t really like? I know what I’d choose ![]()








