josefrichter

josefrichter

Hi guys,

I came across this table from Sasa Juric’s book summarizing which common components of a (ruby) web app can be replaced with Erlang

Chris McCord mentioned in his ElixirConf 2017 Closing Keynote that it’s rather difficult for experienced Elixir devs to see the Elixir world through the eyes of newcomers again, so here we go :slight_smile:

For a newcomer (from Ruby world) like me, it would be quite helpful to get a bit more detail about which specific parts of the Elixir ecosystem replace those components. There’s a lot of new terms like GenServer, Supervisors, ETS, Mnesia, etc. etc. that don’t ring any bell for a newcomer, so such a mental map could fix that.

To be more specific, these are some of the questions I’m trying to find answers for:
– what do I use instead of Redis and why?
– what do I use instead of Sidekiq and why?
– how does Erlang ecosystem render some components, that are common in Ruby world, unneeded?
– how does the whole ‘concurrency’ promise help me deal with the fact that at some point all the concurrent connections might need to write into a database at once?
– what are some BAD use cases for Erlang/Elixir, where I’m better off sticking with Ruby?
– etc.

Thank you very much!

Showing Posts 22 to 13

josefrichter

josefrichter OP

…ideally up to the point where people would look at a problem and think “Rails would be overkill for this” :slight_smile:

^ I like where this thread is going :slight_smile: Elixir Recipes could be some sort of community-driven Wiki maybe.. Or at least a blog post.

Thank you everybody!

orestis

orestis

Well, I’ve already submitted one other talk proposal already for the upcoming ElixirConf.EU… so I did the obvious thing and submitted this one as well. :scream_cat: It’s a long wait until the selection so I just have to forget about it until then :wink:

I’m not that crazy… yet :slight_smile:

(BTW, it might not show in this post but I’m having a “celebrities talked to me” moment here :slight_smile: )

gregvaughn

gregvaughn

Honestly, I could imagine that turning into some sort of “Elixir Recipes” book if you took it to the next level.

sasajuric

sasajuric

Author of Elixir In Action

I think this is a wonderful idea!

Many of us try to promote Elixir by talking about more complex scenarios such as massive scalability, fault-tolerance, and high availability. I believe that this leaves many people with a feeling that Elixir is an overkill for their smaller-scale problems.

Having a talk which showcases how in simple scenarios you can do a bunch of things with Elixir alone, without needing to reach for external products, might help people understand that Elixir is not only made for large-scale systems, but can also do wonders for smaller ones.

This is precisely why I feel that Elixir is a win-win technology. It leads to simple solutions for simple problems, yet at the same time it can take us far, so we don’t have to consider swapping it for something else down the line.

You should totally submit such talk, and I hope I’ll be there to see it live :slight_smile:

orestis

orestis

This 1000 times. I’m working on very small scale projects that run on a single machine. Not having to install a ton of packages for common functionality is a huge boon. In fact I’m thinking of collecting all this philosophy into a talk for some next ElixirConf… my working title is “Scaling down with Elixir”.

sasajuric

sasajuric

Author of Elixir In Action

Yes, my position is that for simpler projects Elixir will help simplifying the tech-stack. So while I see occasional complaints that Elixir is an overkill for smaller projects, I personally think that with Elixir we’ll produce simpler solutions for simple problems, and at the same time we’re certain it can take us very far if things become more complex.

josefrichter

josefrichter OP

This is a crucial piece of info, thanks for that!

Fully understood! 80/20. I was interested in those 80% of use cases here :slight_smile:

josefrichter

josefrichter OP

Thanks everyone! This is really about “practical recipes”. I typically work with early stage startups where for 90% of use cases you’re good to go with out-of-the-box rails + postgres, and sometimes maybe a bit of sidekicq and redis cache, based on “premature optimization is the root of all evil” principle. I’ve been even told that Elixir is ‘premature optimization’ once :slight_smile:

So I’m really looking for best practices for common problems that keep repeating in the usual clones of instagram / snapchat / foursquare / tinder with thousands of users, not millions. It appears to me that Elixir ecosystem could actually let you focus on the core of your business, rather than waste your time on convoluted setups and caching strategies..

Thanks again, this is a great community!

sasajuric

sasajuric

Author of Elixir In Action

I think others have answered your specific questions, but I’d just like to address a more general point, since this table tends to be misinterpreted in a couple of ways.

It’s worth mentioning that this table is a true story, not a contrived example. I was working on these things side-by-side, and Server B was implemented in plain Erlang, as a single project. Moreover, having been involved in server A from the very start, there was no doubt in my mind that we could have moved most (if not all) of it to Erlang. In fact, since we had a lot of problems in production with server A (unlike server B which had almost no problems), I proposed we move it gradually to Erlang, and argued that this move will solve many of our problems. Reflecting back, I still feel the same.

I however caution against a general conclusion that Erlang can always replace 3rd party products. In more complex cases, an external component will likely be a better choice than a built-in Erlang option. That said, Erlang tools (such as processes or ETS tables) can definitely handle many different scenarios, so my feeling is that compared to other languages (especially scripting languages with no proper concurrency story), an Erlang (or Elixir) based project will in general require less 3rd party products and external OS processes.

michalmuskala

michalmuskala

Yes, for larger binaries this can still happen, so the advice on using :binary.copy/1 on data that you plan to store for a long time still applies. But it’s harder to hit this issue than it was before.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews