Erlang is quietly running a lot of stuff out there. It's almost certainly running some bits of infrastructure that you use daily, or in a supporting role for it. People who are not old Erlang hackers are picking it for new projects.
Erlang hasn't been and probably will never be quite mainstream, but to say it "hasn't stuck" might be missing the point: it's a mature and performant language that has some very nice standard features in OTP that are lacking or less mature in other languages. If your problem domain is smack in the middle of Erlang's strong points then it's worth considering. It's not going away any time soon.
This is all of course compared to the current buzz surrounding Elixir/Phoenix. I didn't intend to dismiss Erlang's amazing track record and applications to the domains where it continues to shine.
This is roughly the time span I was referring to when I said "buzz":
https://hn.algolia.com/?query=erlang&sort=byPopularity&prefi...
All these languages have their advantages and followers, but the thing they all have in common is first-class concurrency, which everyone now realizes they need (and old Erlang devs will tell you "duh").
Honestly, while I write Go almost exclusively anymore, I think Elixr is the most exciting. The more I learn about Beam the more magical it becomes in my eyes, considering just how old and stable it is. Phoenix is a game changer in many ways.
Alright -- I'll bite.
Rarely anyone "needs to scale." Plenty of $1B businesses can succeed on a fistful of c4.large's running Ruby on Rails. The same Ruby on Rails that ran their MVP. Scaling via language change isn't the path to victory, unless you picked a language that was poorly suited to your domain to begin with.
Too many companies end up following this cargo-cult advice, and spend more time grappling with their tools than innovating. Because "concurrency." Someday.
Optimizing your choice of language for anything other than a linear relationship between Real Complexity and Implementation Time is a fool's errand and a fiduciary travesty.
In all fairness, Elixir/Phoenix could become as well-learned as Ruby on Rails. We'll end up in a best-of-both-worlds scenario. And at that point, I'll happily eat my words.
But in the meantime, solve your "scaling" problems by measuring and optimizing, instead of re-writing your app in the flavor-of-the-week.
Then there are plenty of 7 figure companies that have also had scale issues. Game companies come to mind first and foremost but they're hardly the only ones.
You want to run your marketing website on Rails? Yeah of course. But billion dollar companies on Rails?
Most of Github's stack is Ruby on Rails, with specialized components/sub-systems written in C. This is a common theme amongst companies that use Rails or Python at scale.
There's a reason why people keep those languages around. Its the same reason why they tend to be used for MVPs: the tool gets out of your way so you can focus on solving the hard problems of your domain. The longer you can preserve those ergonomics, the better.
Agree, and I say it as an Erlang full-time dev. Chances are you don't need 9 9s reliability and super scalability.
I've heard and seen cases of companies rewriting stuff unnecessarily due to some incompetent people following latest fads. "Oh I read Python has the GIL so we need to switch to Go. Saw on HN everyone is switching" -- cue years wasted in rewriting and destabilizing a solid usable code base.
How so? What makes Erlang more functional? And how is Erlang simpler for you?
A big part of the renaissance in programming languages come from developers leveraging rock solid VMs such as BEAM and JVM. It enables developers to have the expressiveness of dynamic languages and without sacrificing performance or scalability later down the road.
In the case of Elixir, many feel that it adds some innovative language features like the pipe ("|>") operator and metaprogramming facilities that ease many of the pain points with Erlang. I'm not an expert in Erlang but there are quite a few notable Erlang developers that enthusiastically support Elixir (including some nice words from Joe Armstrong).
I'm not arguing with you but curious about your thoughts. Looking forward to the next installments in your series.
Well both points are valid. Elixir does add some great concepts like the pipe, usable macros and others. But with it comes some complexity -- it is a trade-off. I don't think one is a superset of another. Both will appeal to some people and that's fine. I prefer Erlang, but I hear a lot of people put off by Erlang's syntax, so well maybe Elixir will look better for them.
One thing I am impressed about Elixir is the community -- Jose and the team, did a fantastic job building not just the language but making a friendly and welcoming community, that is hard overstate.
To be clear, are you suggesting that's reasonable to do a rewrite (or at least for certain parts) from Python/Ruby when you need to scale? Is that going to be reasonably accomplishable in many cases? Honest question. Just wondering what you have in mind.
In this case, you probably first start by switching your message queuing to Erlang (RabbitMQ), since you had a problem with that anyway; then you can expand outwards from there if it makes sense or makes you happy: job running in Erlang, webservices in Erlang, putting the data in mnesia instead of postgres, etc. You can do the same with any language, of course.
Among the languages you cited, C# has async/await, Clojure has core.async, Elixir has processes and messages, Go has goroutines and channels, but the other languages (Python, Ruby, Java, Rust) have nothing built-in specifically related to concurrency, do they?
Java, Rust & Ruby have built-in support for concurrency, but I haven't used those languages that much.
> Python 3 has async coroutines built-in
Yes, the asyncio library was introduced in Python 3.4.
> there are a number of libraries for Python 2 (e.g. twisted, tornado)
Yes, but they are not part of the language per se.
> Python 2 & 3 also have threading and multiprocessing for concurrency.
Threading and multiprocessing are really not a good fit when the number of concurrent processes increases, because each thread allocates its own stack, which can be quite expensive in terms of memory. This is the reason why Go (and maybe Erlang too but I'm not sure about the implementation) map "green" threads to OS threads, and implement a resizable stack. Libraries like gevent offer something similar for Python, with some low-level trickery.
> Java, Rust & Ruby have built-in support for concurrency
In the language and/or the standard library?
In Java, there is Quasar and Akka, for example, but they are not part of the language/standard library.
> In the language and/or the standard library?
In Rust, we have extremely strong concurrency support in the language/standard library in the form of our type system, which disallows data races at compile time. We only provide 1:1 threading, but libraries can use this type system to extend it: there's N:M threading libraries, as well as more exotic concurrency stuff than we provide directly. Rust also generally takes a "no batteries included" approach, generally speaking.In Ruby, there's Thread and Fiber. MRI's GIL hurts it here, but other implementations don't have this problem.
Same question for Ruby :-)
https://crates.io/crates/coroutine
I don't know much about the details, as I haven't used them myself, I just know they exist.
My experience with Go has been that it is almost as easy to get it up and running just as fast as with Python.
A lot of the problems are more or less solved problems with well known workarounds but it's still a pain and probably why there's so much buzz around finding the "next (insert your favorite language/framework)".
Erlang generated a lot of buzz several years ago but aside from the recent success of WhatsApp it never quite stuck. I'm curious to know how this author thinks differently.