What if your service goes down by night and remains down until you realize? Your users wouldn’t be happy, they will probably try to find an alternative more reliable and you’ll lose money. Bad experiences taught me that a robust service is much more important than a fast one, performance is relative, useless benchmarks with a plain text response doesn’t imitate the result in a real-world scenario. Of course there are solutions for those kind of problems, but with Elixir you get all of this out of the box. You’ll appreciate fault tolerance when your service has those stability problems.
yep I agree but as @jung-hunsoo said you can get this in different way like putting this on K8s or in AWS lamda …
Let’s say you have large app/site/service and you have this background task queue that’s goes into bad state because of programming error where it can’t recover without restart. How would Kubernetes detect that only that background service is down if most of the app still works? Even if you add a way for Kubernetes to detected it then it would still need to restart whole app and not just that background task queue. That restart might be disruptive for users or other services connected to your app.
Whole Erlang platform was designed with fault tolerance in mind. I don’t think it’s ever possible for Kubernetes offer the same. To even get close you would need to split app to lots and lots of microservices (containers) and that will bring it’s own complexities.
Also nothing stops you from using Kubernetes with Elixir for extra fault tolerance.
First I didn’t say “Fault tolerance is shitty”. The feature is not bad actually, but it’s not unique and awesome. No one will deny that feature. Restarting is definitely the first-aid handy cure in the unstable communicating infra environments; from within an app to the outside interaction.
Of course it sometimes go wrong; I experienced the fault tolerance which was trying DB connection over and over with CPU consuming hike.
As I said above, Elixir has some features that the other languages generally excluded. (I already have an idea which the Elixir would do the best. This is one reason I don’t leave the Elixir away.)
And the performance and benchmark is important as well. Please don’t judge other on your personal opinion.
If the Elixir is best, then why this elixirforum is running on Ruby on Rails, instead of Firestorm?
This is what I expect the Elixir world need to change. It’s so conservative that seem to hesitate or refuse to improve and learn from other languages.
Yep I think this is the point of K8s to have micro services . Nobody puts monolith app into one container…
Back to your problem I would put task to into queue and if worker will crash ,the other worker would pick this task … For example AWS has something like https://aws.amazon.com/swf/
But Yes I agree there is alternative way to program this on Elixir without cloud infrastructure like K8s
But you can get also fault tolerance with cloud infrastructure.
Because Discourse uses Rails and they chose Rails because Sam Saffron and other members of team are Ruby experts (also Elixir was in its infancy back then).
There’s no doubt in my mind we could build a ‘better’ forum in Phoenix, but forums take a lot of time and effort to get right. It took the Xenforo team 3 years before I felt it was ready for a production site and Discourse two years (plus 1 in private dev) before I felt the same with it. Both teams are renowned and were working on their platforms full time - yet it still took this long because forums are hard to get right, and that’s nothing to do with the language really, it’s more about the vision and the time/resources you have to bring that vision to life
Mostly because Jeff Atwood, the creator of the one and only StackExchange network, is rich and has all the time in the world to tackle projects as he sees fit.
People have been known to make fantastic apps in Perl back in the day. Yet nowadays most programmers wouldn’t touch it with a 3 meter stick.
Language has nothing to do with it.
Popularity rarely correlates with quality.
Right. That’s what I’m saying.
Recent PaaS provides full orchestration thanks to the Docker and K8s.
Elixir can handle some part of them in native. This is a big advantage I think.
But it cannot handle DBs, OS level, and HW changes, which limits Elixir’s usage in real world.
Yeah I totally agree. That’s how the field works. Popularity and Success come with productivity not curiosity.
I knew there’s already discussions to migrate to Elixir as a backend of this forum. Firestorm is(was) a nice try.
Reason I questioned is, that’s one of the FAQ that newcomers and decision makers will have. How many and long this responses can persuade them?
I agree having this forum be written in Elixir would be a powerful marketing move!
Truth is though, all of us are too damn busy. That says nothing for the quality of Elixir itself. It only says that busy people are using it.
I’d be glad to work on such a project if I didn’t have to think about money. Hell, I can’t even start a few of my library ideas so far.
I didn’t say “Elixir is best”, in fact any programming language that targets the BEAM can benefit from fault tolerance, it’s not an Elixir’s exclusive feature. By the other hand, software like Discourse, Wordpress, vBulletin, PhpBB… it’s much more robust than any other new solution you can come up with, so, expect Elixir to be a solution for your needs, not a general one. If enterprise demands real-time general solutions, I’m pretty sure Elixir + Phoenix would be a good fit, but right now Node.js is ahead. Forums or blogs are basic in terms of functionality, they wouldn’t take much advantage of Elixir’s main features, so it would be a waste of time reinventing the wheel (from a business point of view).
It’s totally fine if you don’t consider fault tolerance being necessary, but others may have a different opinion. Every tool has its own use cases, I wouldn’t use Elixir because its performance, but for helping me to create robust software with an enjoyable syntax.
I didn’t judge you or others, indeed performance is important, but my point is that benchmarks will never be fair, they are ok as a reference, but you shouldn’t take seriously those number metrics. Like I said, performance is relative and depends on various things, for reference see this well-known benchmark from TechEmpower: https://www.techempower.com/benchmarks/#section=data-r17&hw=ph&test=plaintext&l=zg24fz-1
Node.js is apparently faster than Elixir right? But I do expect a service doing much more than serving a “Hello, World” message to all of my clients, and when concurrency is involved, Elixir outperforms Node.js by far. So this benchmark is misleading for people who doesn’t understand when a tool shines and when is worth to use it, also a fast language isn’t a cure for inefficient implementations.
For any low level task you can use Rustler and take the advantage of Rust’s features.
I’m C# programmer by profession, I’ve been for about 15 years. We have one Chinese worker in our company who is NodeJS enthusiastic. I told him that ASP.NET Core is lot faster than NodeJS. After couple days he told me that he did benchmarks that proves NodeJS is fast as ASP.NET Core. Then we together looked at his code. Both platforms where doing same MSSQL database queries. So both “benchmarks” where actually database bound and where actually testing database performance. This just one example, but at least in our company’s large web app we don’t do almost any highly CPU bound work. Most of the time our app is database bound or bound to some other IO.
I think you want some magic language that can do everything and maybe Elixir is not for you then. There is only one language that I know of that can do almost everything except kernel programming and that’s C#. You can do high performance web apps (soon C# in browser with Blazor and similar to Phoenix LiveView Razor Components), desktop apps, games (lot of released games are done with C#, Unity & Monogame), console apps, machine learning, embedded IoT and probably lot of other stuff. So if you want one language to rule them all I suggest C#.
But I think stable low latency even under heavy load, scalability, fault tolerance, immutability and other awesome things that Elixir/BEAM provides are much more important at least for web apps than language with high raw performance. You can’t example use horizontal scaling to make latency better.
I love Elixir and have been playing around with it for sometime now. I have one decent size project running for a global non-profit organization running in Elixir and another one in beta testing.
With this kind of experience and years of RoR (worked as Solutions Architect, dev for multiple Startups and services companies), I am finding it extremely hard to find remote work or part-time job in UK in Elixir. Most of the Elixir openings in the market come with the label “Sr. Dev” or for people who have already done it. I am willing to start as Junior Developer, prove myself and then progress since I am keen to work with Elixir but still managing projects and teams in RoR for my living.
I have joined a company in UK recently where we are working on running industry relevant intensive coding courses for students in UK universities. I would love to have these courses being run in Elixir but just because I am not confident that these students will be able to find jobs as junior developers, I have decided to stick with RoR for the time being.
I have a similar experience in the Netherlands. I learned elixir during a bit more than one year, but I cannot find freelancejobs. Not many companies use elixir, some require ruby experience, some a love of TDD, some are small startups with a small budget. I love the language, but next time I’m going to learn something new it will probably be react.
I don’t want to respond to all the messages above, since it’s far from subject.
But I really want the people here to be objective. Who said the Elixir is perfect? Did I say so? No. Some just overstated my opinion.
Why r u so offensive? Is the Elixir a religion? Really? Why?
I told that “benchmark not proven.” -> Isn’t this a weakness of Elixir? Proper approach would be like @AstonJ did. Professionals prove it by the number, not the belief.
The real problem I felt so far in Elixir is, conservative and lot of insists, closed, exclusive to other.
I wanted to debate for better Elixir, but you guys make the thread to argue. For what? Is here a place to tackle and battle? I don’t like that style. It’s not fun nor productive.
I’m sorry you felt that way that wasn’t my intention at all. But maybe there is some sort of language barrier here, because I’m not native English speaker either. I’m new to this platform and started learning Elixir just while ago so I’m sure how it could be my “religion” when I just started using it? I just tried telling you the good things I see in this platform compared to others without any bias.
It’s my many years experiences with benchmarks between web platforms (that have nothing to do with Elixir/BEAM) is that most of the time performance bottleneck might be somewhere else than in that web platform. Any platform that has good concurrency (asynchronous) model is very viable for web apps and all those benchmarks are more or less pointless. Lot of things about platform are more important than a good benchmark score. Most important things are, is it productive, is it maintainable (this is a big one), does it have everything that your apps needs and do you like working with it (developer happiness).
If you haven’t read this yet https://blog.discordapp.com/scaling-elixir-f9b8e1e7c29b you should because it’s not a benchmark but a real use case. If something like Discord’s Elixir/BEAM over 5000000 (yes 5 million) concurrent (active, connected to the service simultaneously) users or WhatsApp (Erlang/BEAM) huge amount of users isn’t benchmark enough or “not proven” like you said to make you believe in platform, I’m not sure if any benchmark ever will.
Part of me wonders whether Dave Thomas targetting a stack of 5 Raspberry Pi’s for his experiments was partially motivated by an assumption that similarly constrained environments would not easily tolerate the overhead of k8s/docker (I know it’s possible but that doesn’t mean it’s reasonable).
Then there are IoT environments with constrained power and/or connectivity (e.g. Visualizing Home Automation with GRiSP).
Aside: Just discovered there is a GRiSP 2 Kickstarter.
You made generalized claims, you got called out on them, and now you make other generalized claims.
Don’t get surprised if you generalize people and they react defensively.
Let’s get back on topic.
I’m sorry too. I’m not the English speaker either. I’ve been enjoying Elixir 1.5 years, and Elixir is quite happy to code. Reason we’re investing time and effort here is simple; to make the Elixir better.
Concurrency is of course very important, that’s why I moved from RoR. When deploying on RoR, a GIL(Global interpreter Lock) was just a bottleneck and far from recent environment; as well as other problems too - improper websocket, abandoned gems, so on.
For Python, I think it’s a general purpose easy and fun lang; like a VB or GAS. Fitted to start programming.
Elixir is a language kinda specific purpose. That’s why I think it’s a good fit to Cloud computing OS. One can quickly advantage PaaS like features. Process, GenStage, Stream are underrated. Some other interesting features - Immutability, Pattern matching, Functional - are useful too.
Here is on a tiny example. Yesterday I posted a feature which manages API version simply by using pattern matching - https://groups.google.com/forum/#!topic/elixir-lang-core/IvdU6xhOMoc
Is Kotlin good? Well, I can’t agree. Is Android Studio IDE great? Mmm… It’s great but sooo heavy and crashes sometimes; actually it’s Gradle what shines. (But I think a smarter IDE tool is essential to Elixir, when going to the big world.) Stone age vs. Iron age situation.
Elixir has a great potential for some specific use cases, mainly a connectivity is intense. That’s why I don’t move away the Elixir.
But Elixir language is too unkind to the developer(not about the community.). Tasting an Elixir isn’t easy than other.
For Benchmark example you mentioned, you’re right. Benchmark is useful only when it’s testing properly. DB layer shouldn’t be included, since there’re so many things that affect the result out of language/framework itself.
I’d call you a senior developer; make sure you understand phoenix & OTP, maybe a bit of review, then stop thinking of yourself as a junior…