Live data from Hacker News

Which companies are using Erlang, and why?

erlang-solutions.com

51–60 of 204 posts

Re: Which companies are using Erlang, and why?

#51
Having worked extensively with both Erlang and Elixir in the last 7 years, the main advantage for me has always been the smaller code base that those projects tend to produce when compared to other languages. Especially for projects that have some long-running components to them the Erlang built-in features allow writing really short yet fault resistant systems.

The Supervisor system, the per process garbage collection (no stop the world), 'start_link', "Let it crash", and pattern matching are for me the superpowers of beam. Elixir is contributing a great package ecosystem, 'mix format', and better features for the new live web of websockets

Re: Which companies are using Erlang, and why?

#52
post #29

Earlier quoted context omitted.

Erlang's advantage is being able to build a featureful, secure, scalable and performant enough communication backend in very little time and effort. This is a niche in which it can not be beaten.

> ...in very little time and effort. You have a very naive view of large-scale distributed systems. For companies that truly need them, "time" and "effort" are never a consideration. Furthermore, the challenges facing these companies in battling project delays and cost overruns are the 100% organizational and political, not technical.

Being able to build these systems with significantly less time and effort makes them more approachable for smaller teams and companies, where time and effort can be more important than organizational politics.

Re: Which companies are using Erlang, and why?

#53
post #32
post #7

Earlier quoted context omitted.

This isn't true at all. Major functions of WhatsApp are implemented in Erlang and they're actively worked on. Source: Self. Engineer at FB.

They (you) had to modify beam vm heavily though.

WhatsApp did modify Erlang but it's interesting that Elixir/Phoenix was able to hit the same scale on a single server without any such optimizations. [1]

[1] https://changelog.com/podcast/208

> I wasn’t thinking we could actually get WhatsApp-like scale, because when I read about WhatsApp, they were using FreeBSD and they forked Erlang and made some optimizations, they fine-tuned FreeBSD… So I was thinking that it was gonna be very difficult to try to replicate that kind of scale.

> So we were doing extra work, and it was really fulfilling to actually see that with minor changes in our initial best-effort approach with just a few tweaks was able to go to something that was able to get millions of connections. That was incredibly fulfilling to come full circle, and also it’s a great brag slide now, of showing that two million connections chart.

Re: Which companies are using Erlang, and why?

#54
post #50
post #44

Earlier quoted context omitted.

You can absolutely do anything you can do in Erlang in another language. Some tasks will be easier, or harder, however. In my mind, Erlang excels in a few ways: Less often remarked, binary parsing in Erlang is rather nice. Parsing out an IPv4 packet looks like this: > = Payload, OptsSize = (IHL - 5) * 4, > = IPRest, And then you've got everything. As long as formats are reasonably documented, it's easy to parse them.…

To be fair though many Erlang programmers also avoid hot loading code. For the rest, nice summary.

Why would they avoid that? (hopefully it's not just because of the ease of containerization/docker that is leading to reduced hot loading)

Re: Which companies are using Erlang, and why?

#55

worked with Erlang lately in a side project, I think the actor model is really cool (and the FP style), but the error messages are not helpful at all (at least for a beginner), I wonder how other people manage.

More often than not after I did figure out what the error was, looking back at the initial error message it told me exactly what I should have looked at to begin with. So, if you can read them right, they are pretty good.

I use Elixir in production and Erlang in side projects.

Re: Which companies are using Erlang, and why?

#57
post #32
post #7

Earlier quoted context omitted.

This isn't true at all. Major functions of WhatsApp are implemented in Erlang and they're actively worked on. Source: Self. Engineer at FB.

They (you) had to modify beam vm heavily though.

At that scale you are generally modifying your entire stack or building it from scratch no mater what you are using. Also they were on a pretty old version and a number of their fixes are in Erlang itself now.

WhatsApp engineers have been quite clear that using Erlang was a great choice.

Re: Which companies are using Erlang, and why?

#58

worked with Erlang lately in a side project, I think the actor model is really cool (and the FP style), but the error messages are not helpful at all (at least for a beginner), I wonder how other people manage.

Elixir gives you much more friendly error messages at runtime (I believe part of this feature was contributed to the Erlang VM, so improved it for all languages):

  10:21:21.525 mid=1 [error] GenServer {Registry.WatcherManagerRegistry, 1} terminating
  ** (CaseClauseError) no case clause matching: {:ok, }
      (core) lib/core/http.ex:64: Core.Http.request/7
      (core) lib/core/monitors/built_in_monitor.ex:99: Core.Monitors.BuiltInMonitor.perform_request/1
      (core) lib/core/monitors/built_in_monitor.ex:76: Core.Monitors.BuiltInMonitor.perform/1
      (core) lib/core/watcher.ex:40: Core.Watcher.perform_check/1
      (core) lib/core/watcher_server.ex:91: Core.WatcherServer.handle_info/2

Re: Which companies are using Erlang, and why?

#59

WhatsApp used to use Erlang, not anymore. Facebook rewrote it completely in C++. https://www.quora.com/When-did-Facebook-switch-away-from-usi...

Which is far better, IMHO

why so many negative votes?

Isn't C++ a far more battle-tested language than Erlang? Hasn't C++ a far bigger community than Erlang?

To all whose concern is Memory Management, learn about C++11 (and newer standards): smart pointers and heavy use of RAII pattern work shamefully good

Re: Which companies are using Erlang, and why?

#60
post #54
post #50

Earlier quoted context omitted.

To be fair though many Erlang programmers also avoid hot loading code. For the rest, nice summary.

Why would they avoid that? (hopefully it's not just because of the ease of containerization/docker that is leading to reduced hot loading)

> hopefully it's not just because of the ease of containerization/docker that is leading to reduced hot loading

It's because it's not super easy to properly architect in, it's hard to test, and it requires supporting running multiple versions of the code concurrently (and the ability to migrate data on the fly).

Post reply on HN