News for hackers. Stuff that matters.
Re:Why we switched from Python to Go by riku_iki on Tuesday October 17, 2017 @10:49PM (#15496537)
Because your statements are very challengeable.

Erlang is much slower in raw performance than both go and jvm: https://benchmarksgame.alioth.debian.org/u64q/erlang.html

Async approache similar to Erlang was reproduced for Java and Go already: https://akka.io

Re:Why we switched from Python to Go by elcritch on Wednesday October 18, 2017 @03:50AM (#15497568)
You're right that Go/Java have async style similar to Erlang. But the majority of production systems today that these languages run is some sort of web application. In this area, the Erlang VM holds its own pretty well, especially for websockets [1]. In that study Elixir's memory usage is higher, but total connections were almost identical to Go.

It'd be great if there were better benchmarks for common use cases of various languages. Spring on the Java side tends to be heavy on reflection usage, which is orders of magnitude slower than JIT'ed JVM methods. Benchmarks like the benchmark game don't capture this. Still despite that the Erlang VM performs very well on the benchmarks game compared to other dynamic/scripting languages. Often it's easily 5-10 times faster than Python or Ruby. Given the parents comment, I'd argue many programmers who enjoy developing with dynamic languages can do so with Elixir with comparable performance to Go/Java for high concurrency web applications.

1: https://hashrocket.com/blog/posts/websocket-shootout

Re:Why we switched from Python to Go by igouy on Wednesday October 18, 2017 @11:43AM (#15500071)
> It'd be great if there were better benchmarks for common use cases of various languages

Somebody should make those.

(People may have different ideas about which use cases are common).

Re:Why we switched from Python to Go by riku_iki on Wednesday October 18, 2017 @01:43PM (#15501202)
There are some: https://www.techempower.com/benchmarks/

As you can see, erlang is far from the top there.

Re:Why we switched from Python to Go by elcritch on Friday October 20, 2017 @04:46AM (#15514383)
It's not near the bottom either which is the point. Actually Phoenix (the only Erlang base web framework I could find at the link) edges out quite a number of other frameworks, roughly ranking in the middle of the pack. Specifically Phoenix performed 32k req/s, in comparison to say the Go based Gin which does 51k req/s or a arguably more comparable setup of,Python3 Flask with full ORM at 13k. Spring only manages in 23k req/s. Nothing to write home about either way but clearly along the lines of my argument that Erlang/Beam can hold its own. Though some of the ruby frameworks are damn impressive seaming, huh.

However it gets more interesting if you look at the Latency tab. There Phoenix comes in with an average of 7.9 ms. In comparison Gin averages 5.8 ms, Spring at 12.1 ms, Flask Py3 at 23.1 or Py2 at 14.7 ms.

Where it's really interesting is looking at the max latency. Presuming this indicates roughly how 99th and 95th percentiles measurements would compare. In this category Phoenix comes in second with a max of 22.0 ms, behind only lib-mongodb at 20.8 ms. The lib-Mongolia is one of the fastest frameworks by raw req/s.

Appreciate the link to the benchmarks! Much more interesting, especially if you're concerned about max latency (and likely 99/95 th percentiles). In this case BEAM/Phoenix would let you plan capacity to minimize max latency fairly well as it appears very consistent.

Re:Why we switched from Python to Go by riku_iki on Friday October 20, 2017 @06:09PM (#15519444)
> Specifically Phoenix performed 32k req/s,

But raw java servlets delivered 100+k req/s. It may mean that all this event loop/async/actors hype is overrated, and regular blocking approach can also deliver.

Re:Why we switched from Python to Go by igouy on Wednesday October 18, 2017 @04:45PM (#15502851)
I don't see Erlang listed at-all on that "Fortunes" page ?
Re:Why we switched from Python to Go by riku_iki on Wednesday October 18, 2017 @05:42PM (#15503460)
They have elixir there, which is another language for Erlang VM, and they have erlang for other benchmarks.
Re:Why we switched from Python to Go by igouy on Thursday October 19, 2017 @12:37PM (#15509387)
JRuby is another language for JVM -- do you put forward JRuby as the example of JVM performance?
Re:Why we switched from Python to Go by riku_iki on Friday October 20, 2017 @06:10PM (#15519450)
It has very different paradigm (dynamic vs static typing) with very strong performance implication.
Re:Why we switched from Python to Go by igouy on Wednesday October 18, 2017 @11:40AM (#15500042)
> … slower in raw performance…

… and "Most (all?) large systems developed using Erlang make heavy use of C for low-level code, leaving Erlang to manage the parts which tend to be complex in other languages, like controlling systems spread across several machines and implementing complex protocol logic."

FAQ 1.4 What sort of problems is Erlang not particularly suitable for?

http://erlang.org/faq/introduction.html#idp32150096

Re:Why we switched from Python to Go by hack4supper on Wednesday October 18, 2017 @12:54AM (#15496972)
hi riku_iki, I just checked out the link akka.io and it says that it caters to java/scala only ... from your last statement I understood that it was meant for java and go.
Re:Why we switched from Python to Go by riku_iki on Wednesday October 18, 2017 @01:44PM (#15501219)
Go also has tons of actor frameworks: https://github.com/AsynkronIT/protoactor-go

But it also has native coroutines embedded into language, which provide excellent asynchronous performance.

Re:Why we switched from Python to Go by hack4supper on Friday October 20, 2017 @04:42PM (#15518986)
Hey thanks for that link ... I was aware of go having coroutines available as part of the language but not that something similar to what erlang provided was available to the go system as well...