
How Elixir helped Bleacher Report handle 8x more traffic - stanislavb
http://www.techworld.com/apps/how-elixir-helped-bleacher-report-handle-8x-more-traffic-3653957/
======
falcolas
Yet another "Originally wrote in X, rewrote the application (in Y), and it was
so much better!" story.

I think the problem is that all of the focus arrows in on X vs Y, and not
"rewrote the application". My opinion, and my experience, has demonstrated
that once you understand the domain, a re-write in _any_ language (including
the original) is going to result in an improvement of similar magnitude.

They could have re-written it in Cobol and probably seen an improvement of
similar magnitude.

But of course, "Y is n-times better than X" makes for a better headline and
looks great on a Key Result slide...

~~~
xutopia
Except Phoenix and Elixir are just faster out of the gate than Rails and Ruby!

"tl;dr Phoenix showed 10.63x more throughput over Rails when performing the
same task, with a fraction of CPU load"

[https://littlelines.com/blog/2014/07/08/elixir-vs-ruby-
showd...](https://littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-
phoenix-vs-rails)

You can tack on a Phoenix app on top of a Rails app's database and immediately
get big improvements as Rails can be a bottleneck.

~~~
falcolas
> Except Phoenix and Elixir are just faster out of the gate than Rails and
> Ruby!

Sure. So is Java, C#, C, C++, Haskell, Node.js, F#... I could go on. But let's
be honest with each other here. What is the real chances that their speedups
were really due to a computation bottleneck? And frankly, if it was due to a
computation bottleneck, a language on the Beam VM was probably a bad choice.

> get big improvements as Rails can be a bottleneck.

Rails can be a bottleneck. It probably wasn't, though. I can (and have) take
an average web app and short circuited a re-write by adding a few choice
indexes to the DB. Or I could rearchitect it and move some data processing
outside of the critical response sections and do the same. Or I could move a
few choice resources onto CDNs and improve end user performance. Or do better
compression on PNGs... Or change an O(n) function into a O(log(n)) function...

The list of potential improvements that have nothing to do with the speed of
the language in question is almost endless. Ruby and RoR are pretty easy to
scale, and if I were a project manager, I would personally have a hard time
justifying limiting my hiring pool for the sake of a mere 8x speedup (unless I
was honestly operating at a really silly scale).

~~~
segmondy
techempower benchmark even has PHP crushing elixir

------
d3ckard
Funny thing is that I have yet to see the other side of argument - when people
had a bad experience with Elixir. It seems so nicely fit into its problem
domain that basically everybody that starts doing it is happy with results. I
guess that says something.

~~~
holydude
The bad side

1) no support from mega corporations 2) not that many developers to choose
from 3) while based on BEAM it's still too "new" 4) too slow for raw money
crunching

~~~
izelnakri
4th one depends on the implementation, and it isn't a disadvantage since most
scripting languages have the same characteristic.

~~~
gamache
Speaking as someone who came to Elixir from Scala/Akka on the JVM, yes it is
absolutely a disadvantage, and no there is no implementation of the Erlang VM
which rivals the JVM for speed. In Erlang/Elixir you get speed through
horizontal scalability (which is easy) and/or writing parts of your code in
another, faster language (which is harder).

~~~
hderms
Why did you leave Akka for elixir?

~~~
gamache
There were a few reasons. I never loved Scala, and I especially didn't like
the let's-write-Haskell-in-Scala obsession with static typing that affects
half the community. The JVM and Akka both have a lot of knobs to tweak,
whereas the BEAM seems to have saner defaults.

I didn't need rocket fast performance and I didn't need any JVM libraries, but
I did like the actor model of concurrency and process supervision, so when it
came time to look for greener pastures, Elixir was a solid choice. I've been
using it in production just over a year, and it's been excellent.

~~~
hderms
Fair enough. I've dug into the haskell-as-scala stuff and found it
academically interesting but somewhat divorced from reality with respect to
how immediately useful it would be to most projects.

------
zeveb
My God that's a nightmare of an office. Open-plan _and_ a wall of distracting
televisions. How do they get anything done?

Or do employees just WFH when they need to actually produce stuff?

~~~
abritinthebay
That's our content team on the 6th floor. They actually use all those TVs.
It's the prettier floor for photos...

Engineering is on a different floor, still open plan, but has lots of small
meeting rooms for quiet work too. Also a pool table

------
gargarplex
I would like to build an Elixir training video course called "Elixir for Rails
developers".

This is probably sufficient for an intro video series…

1) Installing, including all of the dependencies: 2) Making a new project. 3)
Setting up a data model. 4) Building CRUD routes. 5) Building views. Can you
use haml, sass, etc.? 6) What’s the equivalent of the console? 7) Deploying to
production. How does that work?

If any Elixir enthusiasts are interested in teaming up, let me know.

~~~
sotojuan
This already exists in book, blog post, and video formats.

~~~
gargarplex
With all due respect, people said that about dropbox when it launched. Can you
recommend a good, cohesive video series that clearly explains Elixir and is
targeted specifically to Rails devs?

~~~
d3ckard
Out of curiosity: what does it mean to you "targeted for Rails users"?

BTW, I was a Rails developer before I moved to Phoenix. Given that Phoenix is
modelled after Rails that is the easiest transition there is (though it gets
more and more different with every release and 1.3 will be a big step - and
those are good changes).

~~~
gargarplex
I mean things like: "Is there a REPL? I bet you're wondering how we deal with
the console: what's the equivalent of bundle exec rails c". "What's the
equivalent of an ActiveRecord migration". And so forth.

We want to build the Rails blog tutorial, but in Elixir+Phoenix, and
specifically for Rails users.

Definitely, please send me an email: zack@zackburt.com if you'd like to be
involved in the project.

------
jondot
Anyone else worried about the long-term outlook on Elixir for adopting it now
in bigger companies? (leaving OTP out, of course)

* Bus factor of 1?

* No visibility of improvement process (i.e. PEP)?

* Long term support?

How would you resolve this? do consultancies that build projects for clients
in Elixir are aware of that? or notify the client of that?

~~~
josevalim
> * Bus factor of 1?

The core team is made of six members: @josevalim, @fishcakez, @ericmj,
@lexmag, @whatyouhide and @true_droid. We have more than 500 contributors on
GitHub, it is an accessible codebase. The areas where the bus factor is
actually 1 are very rare (and when I can I delegate work to minimize that).

> * No visibility of improvement process (i.e. PEP)?

All planned improvements are currently in the issues tracker:
[https://github.com/elixir-lang/elixir/issues](https://github.com/elixir-
lang/elixir/issues). It is a short list because it is a stable language and
the focus is on the ecosystem rather than the language.

Proposals are sent before hand to elixir-lang-core mailing list for
discussion.

> * Long term support?

List of consultancies currently involved with Elixir:
[https://github.com/doomspork/elixir-
companies#consulting](https://github.com/doomspork/elixir-
companies#consulting)

Plus Plataformatec has been doing and supporting Elixir for 5 years and Erlang
Solutions has been supporting Erlang for way longer than that and they also
provide Elixir support.

~~~
jondot
Thanks Jose!

I was hoping to catch you here or on IRC :)

~~~
josevalim
Hi! :)

------
karmicthreat
I do quite a bit of event passing and processing from physical sensors and
devices. It is proving quite useful there. I probably won't do all of our
system with elixir though.

~~~
NickBusey
I am curious, could you expand a bit on this? What about elixir in particular
is useful for the physical sensor application? What kind of devices are you
running it on?

------
IanDrake
I would think you could switch your average legacy ROR implementation to a
newly coded system on just about any other platform and also come out way
ahead on resource requirements.

For instance, they could have gone with .net and gotten nearly the same
results AND had a stable of millions of devs to pull from.

~~~
noop123
Hence why reports like above are helpful, so there are examples to draw from.
Otherwise everyone would just be guessing. I bet many would love to hear about
migration cases from RoR to .NET as well.

