Live data from Hacker News

Which companies are using Erlang, and why?

erlang-solutions.com

101–110 of 204 posts

Re: Which companies are using Erlang, and why?

#101
post #2

At least some of those examples are highly misleading: > There is no better example of Erlang’s reliability than the English National Health Service (NHS). [...] Using Riak (written in Erlang), the NHS has managed 99.999% availability for over five years. From what I could find out, NHS's Spine2 is mostly Python, with "a bit" of Erlang and Javascript. They do use Riak, but they also use Redis, RabbitMQ, Python/Tornad…

There are two areas where Erlang really works well if you know what you're doing : - telecoms, as it was specifically designed for telecoms. - "glue" in networked applications: to orchestrate, pass messages around and the like. See GitHub [1] or CoD [2] etc. In a sense, chats are a mix of both. Erlang is rarely a good fit in pretty much anything else. [1] https://www.infoq.com/interviews/erlang-and-github/ [2] https:…

Yes, Erlang was designed for the control plane, not the data plane.

Re: Which companies are using Erlang, and why?

#102
post #27
post #11

Earlier quoted context omitted.

> Almost all of the bespoke code is written in Python, but the message-passing architecture of the system and the approach to managing availability was directly inspired by reading about Erlang (in particular your book). This approach is pretty interesting - I’d love to read about implementing Erlang-style availability in other languages.

In my experience, the message passing architecture of the NHS system almost exclusively uses Paper.

and fax.

Re: Which companies are using Erlang, and why?

#103
post #98
post #69

Earlier quoted context omitted.

> "Although not in Erlang, Discord uses Elixir which runs on the BEAM VM to much success as well for our real time distributed system as well as VOIP signaling components. Looking back years later - it’s safe to say we wouldn’t have chosen anything else." You're a Staff Engineer at Discord. This response is extremely vague and non-informative. What does "running to much success" mean exactly? And why is it "safe to s…

I was challenging jhgg's comment, by requesting actual clarification and proof for the very broad statements they made. But if I'm honest, this entire thread is full of many such comments - propping up and praising {tech name} whilst providing little to no data to show for it. And that's how we got cargo culting. But please downvote away :)

> What does "running to much success" mean exactly?

When you ask questions like this, you sound combative, rather than curious - because the success of Discord is rather well documented.

> Why could you not have achieved the same results using alternative tools?

How can this be answered without trialling every other tool? Again, you sound combative.

Re: Which companies are using Erlang, and why?

#104
post #97

Earlier quoted context omitted.

> The story of freebsd & erlang "needing" to be patched seems to be greatly exaggerated. The story is greatly underreported and all focus is only on "they run Whatsapp on Erlang with just ~50 engineers". Highscalability lists just some of the patches and optimisations they have here [1] and here [2] Here's an incomplete list of patches only. There's also tuning and optimisation: Erlang: Fixed head-of-line blocking in…

>Are you ready to do this for your Whatsapp? I don't need to thanks to the fact that a bunch of those patches are now part of Erlang.

Note how I said it was an incomplete list of patches only.

There's also signinficant tuning and optimisation, both for the Erlang VM and FreeBSD.

There also things like (quotes from Highscalability):

"Mnesia: Using no transactions, but with remote replication ran into a backlog. Parallelized replication for each table to increase throughput."

"When Rick is going through all the changes that he made to get to 2 million connections a server it was mind numbing. Notice the immense amount of work that went into writing tools, running tests, backporting code, adding gobs of instrumentation to nearly every level of the stack, tuning the system, looking at traces, mucking with very low level details and just trying to understand everything. That’s what it takes to remove the bottlenecks in order to increase performance and scalability to extreme levels."

Or even the things like "What has hundreds of nodes, thousands of cores, hundreds of terabytes of RAM? The Erlang/FreeBSD-based server infrastructure at WhatsApp". Oh, wait. Erlang's default distribution mechanism grinds to a halt when there are more than ~60-80 nodes. And Mnesia has a 2GB limit on table sizes. So you have to work around those limitations yourself.

There are no magic bullets. Erlang will only take you so far. The rest (80-90% of the way) you have to take on your own, and you have to know what you're doing, and what needs to be done: patches, tuning, workarounds, limits of the systems you work with etc.

Re: Which companies are using Erlang, and why?

#105
post #2

At least some of those examples are highly misleading: > There is no better example of Erlang’s reliability than the English National Health Service (NHS). [...] Using Riak (written in Erlang), the NHS has managed 99.999% availability for over five years. From what I could find out, NHS's Spine2 is mostly Python, with "a bit" of Erlang and Javascript. They do use Riak, but they also use Redis, RabbitMQ, Python/Tornad…

Note that rabbitmq is also written in Erlang.Furthermore, NHS is also involved in the maintenance of Riak since the collapse of Basho.

Cool. I thought it was only some online gambling shop taking up maintenance. Having NHS on that list as well gives me more confidence.

Some more info on riak.org about the current story regarding who maintains would help me a lot in choosing it.

To me Riak was the only noSQL scale-out-able data store product that really made sense.

Re: Which companies are using Erlang, and why?

#106
post #97

Earlier quoted context omitted.

> The story of freebsd & erlang "needing" to be patched seems to be greatly exaggerated. The story is greatly underreported and all focus is only on "they run Whatsapp on Erlang with just ~50 engineers". Highscalability lists just some of the patches and optimisations they have here [1] and here [2] Here's an incomplete list of patches only. There's also tuning and optimisation: Erlang: Fixed head-of-line blocking in…

>Are you ready to do this for your Whatsapp? I don't need to thanks to the fact that a bunch of those patches are now part of Erlang.

It's like open source works or something.

Re: Which companies are using Erlang, and why?

#107

Earlier quoted context omitted.

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

Because subjective opinions on programming languages (C++ good, Erlang less good) are really boring without some reasoning as to why.

Re: Which companies are using Erlang, and why?

#108
post #44

Earlier quoted context omitted.

> It has similar aura than Lisp had before that with Erlang you can do stuff beyond "normal" languages. Like what ?

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.…

>You can absolutely do anything you can do in Erlang in another language. Some tasks will be easier, or harder, however.

Lots of languages have actor systems. But how many have preemptive multi-tasking on these actor systems? I can't think of any at the moment. I am well versed in Akka for Scala and the lack of preemptive multi-tasking for actors is a big pain in the ass. Erlang's advanced BEAM and support for this is it's main selling point, imo.

Re: Which companies are using Erlang, and why?

#109
post #84

We developed Online Charging System in Erlang that served couple million subscribers for close to three years. I found the whole experience fairly terrible. Erlang is nice enough language and I don't mind the syntax but it's also kinda cumbersome and verbose at times. For example, adding `true -> ok` to every if statement gets old fast. Similarly, Erlang/OPT is a nice platform but some parts are fairly bad. Looking a…

Not to refute your experience, but "adding true -> ok to every if statement" sounds like an anti-pattern. A couple of notes to elaborate:

1. If-statementes should rarely be used in Erlang because case is preferred

2. If you're returning ok everywhere, you could also just let it crash by doing something akin to true = function(). Always go for let it crash first, unless you really know you can handle the error sensibly (and then use a case-statement)

3. httpc is kind of known to not be the most formidable HTTP client. Hackney is a more modern and better choice. The good thing with httpc is that it is included with OTP, otherwise there are better choices (scalability- and feature-wise)

4. When someone says "multicore support" and "performance" support is not great it's usually one of two things: (a) they're developing a use case that is not fit for Erlang (e.g. compute heavy) or (b) they don't know how to use Erlang properly (e.g. too complex process setups)

Now, many of these things are not obvious to people new to Erlang and takes some experience to know about. This I would say is the bigger problem with the Erlang eco-system.

Re: Which companies are using Erlang, and why?

#110
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.

I’d not consider relup and module loading the same feature. It is rare to see relup (though I have used it, it’s tricky to make work) but hot code loading of modules was something we used extensively both during development but also in production to test out patches for problems. It was super easy to use and never a big problem.

Keep in mind that we rolled out the patch incrementally to one or two machines and then to more. If it looked good we’d roll it out to the rest of the cluster. From there we’d make note of the result and get the change ported into a proper release.

Each time I hear stories that both clustering and hot upgrades, module loading, etc are hard or rarely used I wonder if the person is just repeating someone else’s rumor. They’re great features and work fine if you do a little homework (just like learning anything, don’t treat it like magic).

This was from my time at Cloudant/IBM, though its far from the only case I’ve seen. We ran over 1000 machines this way with some clusters growing to more than 200 nodes using distributed Erlang (something I keep hearing is hard or impossible, it’s not).

Post reply on HN