Live data from Hacker News

Which companies are using Erlang, and why?

erlang-solutions.com

151–160 of 204 posts

Re: Which companies are using Erlang, and why?

#151

Earlier quoted context omitted.

The first maxim of software architecture: You Are Not Google. (And even at Google most systems running C++ code are their core indexing and analytical systems, which are not directly related to their Internet-facing perimeter; there are some exceptions, of course).

Yes yes, but I work at Google :-) That said, looking back at previous jobs there are many places -- particularly in ad-tech stuff -- where I used Java server side that I now think C++ would have been more appropriate (or these days, Rust). I wasted a lot of hours tuning for garbage collection that I'd love to have back. And yes, there is a crapload of stuff that is internet facing that is C++.

Addendum: “Unless you are Google” :)

Well, at some point it is a matter of personal preferences and tradeoffs. One time, I used to work on a high-frequency trading system written in Java... yes, in the environment with zero tolerance to GC latency. The core system was written with “off-heap Java” style, with memory blocks preallocated... and for the periphery everybody could use regular GC-enabled Java.

Could have written everything in C++, but everybody hated C++ so much they preferred heavily modified Java compilers and environments.

Afterwards, some parts of the core were rewritten in Rust... and there were no significant performance or other gains, so it was left as is.

Re: Which companies are using Erlang, and why?

#152

Awesome write-up, Francesco! To add to the success stories, our team's previous startup (Bugsense) was a huge user of Erlang, which allowed to scale to hundreds of thousands of concurrent devices with just a handful of servers [1]. It was a no brainer that we would now use Elixir for our current startup (AgentRisk [2,3]) and we wouldn't have been happier with our choice, especially paired with Phoenix, which is hands…

What would be a good resource to get started with Phoenix / Elixir, coming from Node/EJS/React it seems very daunting

Re: Which companies are using Erlang, and why?

#153
post #96
post #88

Earlier quoted context omitted.

Interesting, do you think Elixir would be better in your case? Also what was the amount of requests per second? Looks like you didn't really need Erlang's scalability.

No; as I understand it Elixir's only advantage is, arguably, better syntax. I don't mind Erlang's syntax that much. We were handling, in peek hours, over 100k requests per second spread over 3 servers. Funny you should mention scalability as something that somehow justifies Erlang's other shortcomings. I don't think scalability is something Erlang/OTP does out of the bag. One thing we learned the hard way is that Erl…

I call that "handling back pressure", because I don't know what to call it.

I don't know of any system, stack that handles it directly, natively. Though my sample size is pretty small.

Re: Which companies are using Erlang, and why?

#154
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…

> the NHS has managed 99.999% availability Really? I am not sure I trust this claim.

My NHS trust doesn't even use Spine 2. That would require reliable Internet.

Re: Which companies are using Erlang, and why?

#155

Fairly blind question: does Erlang|Elixir and BEAM make any sense in a pseudo-embedded, edge compute or IoT environment with constrained resources (CPU and memory), or even ARM architecture? Aside from the developer-side things, if AMQP were to the centralized communications hub (e.g. RabbitMQ) does using Nerves on devices make any performance benefit - meaning BEAM and app(s) there? The intent would be pre-process d…

Maybe not production ready but there's https://github.com/bettio/AtomVM (BEAM on a ESP32)

Re: Which companies are using Erlang, and why?

#156
post #114

What would be a good use case to learn erlang/elixir with that is not just a chat app? Online gaming? Collaborative tools?

A Bittorrent client is a pretty good one. The protocol is fairly well-documented, and the domain is very well-suited to the language.

Re: Which companies are using Erlang, and why?

#157
post #122

Earlier quoted context omitted.

Agreed. Couple of clarifications/observations. (1) there are situations like this: if DeductCreditInRatingGroup -> log("deducting credit..."); end; unfortunately you cannot write it this way. You have to write it as: if DeductCreditInRatingGroup -> log("deducting credit..."); true -> ok end; Not a huge deal but it's annoying. (2) Let it crash attitude is something I never understood. It's just not something you can d…

1. Here I would do something like this: log("deducting credit...", DeductCreditInRatingGroup), ... log(Msg, true) -> do_the_logging(); log(Msg, false) -> ok. Nowadays though, you should really use the new logger introduced in Erlang 21. There you can do run-time filtering on many different parameters, or even write your own handlers. Using if-statements is usually considered an anti-pattern in Erlang, and I think ver…

(1) was not about logging. I was trying to illustrate a valid use case for `if` statement that requires `true` guard expression. We used lager[1] for logging. I understand that new logger was inspired or loosely based on lager.

(2) I would argue that it's a rare case you don't care about errors.

(4) Multicore support in Erlang was not always great and you would run into all kinds of problems after 2-4 cores. Than for a while it was 12-16 cores. Not sure what the limit is these days.

Again, I am not arguing Java over Erlang. There is no lack of great examples of large successful project running on Erlang. For me and my team Erlang was just too much hassle for not much gain. Your milage may vary.

[1]https://github.com/erlang-lager/lager

Re: Which companies are using Erlang, and why?

#158

Earlier quoted context omitted.

My main interest in Erlang is mnesia. A relational/object hybrid data model that is suitable for telecommunications applications. A DBMS query language, Query List Comprehension (QLC) as an add-on library. Persistence. Tables can be coherently kept on disc and in the main memory. Replication. Tables can be replicated at several nodes. Atomic transactions. A series of table manipulation operations can be grouped into…

Yeah mnesia is extremely clever and very fun to learn. Also being able to store basically any term without having to do conversions is very useful. I've found some practical aspects a bit painful though. It took me a while to figure out how to make backups, migrate schemas to different sets of nodes, that sort of thing. Also there are size limits on disk-based tables which are a bit limiting, and while you can use ta…

> Also there are size limits on disk-based tables which are a bit limiting

There's now mnesia on leveldb

https://github.com/klarna/mnesia_eleveldb

https://www.youtube.com/watch?v=KcJw3RYFWUM

Re: Which companies are using Erlang, and why?

#159

Earlier quoted context omitted.

Not OP, but have used Elixir pretty extensively; the major selling points for me are the friendlier syntax and more active community support, plus with rebar3 + Elixir's seamless Erlang interop you really don't give up anything, you can use any existing Erlang/Elixir libraries with a single syntax. It's pretty great.

Haven't touched Erlang but has an entry level knowledge on Elixir. I often heard how easy it is to write macros on Elixir. Can you elaborate on this?

Imho You shouldn't really write macros, they are there for libraries to make it easy to do the right thing with less boilerplate.

Re: Which companies are using Erlang, and why?

#160

Earlier quoted context omitted.

Haven't touched Erlang but has an entry level knowledge on Elixir. I often heard how easy it is to write macros on Elixir. Can you elaborate on this?

One of the big differences between Erlang and Elixir is indeed that Elixir allows you to write macros in the language itself, using quote / unquote constructs just like lisps. This makes it easy to generate code on compile time, which is then executed in runtime without any performance penalty. A large part of Elixir itself is actually implemented as macros. For instance, the "unless" construct: defmacro unless(condi…

And the if-else construct is also a macro. The whole thing ends up being a case I think.
Post reply on HN