Go, D, Erlang and C in real life: MQTT broker implementation shootout (2013)
atilanevesoncode.wordpress.com
atilanevesoncode.wordpress.com
The Erlang code looks very nice. If you read this, great work Patrick!
https://bitbucket.org/pvalsecc/
Nice use of gen_fsm + binary matching.
Here is an example of the client code that takes only 200 lines:
https://bitbucket.org/pvalsecc/erlangmqtt/src/f37505188c1f1c...
Umbrella Project can be found on https://github.com/erlio/vernemq as well as our website https://verne.mq
Thanks to the author for including standard deviation numbers and not just the averages like so many other "benchmarks".
Maybe somebody already proficient in Rust, reading this, can contribute?
I've found that for long-running server-side apps, Java is very hard to beat in terms of performance, especially relative to the effort spent. I also think it's a nicer language than Go (I also prefer it over C++ and D).
What are you talking about? Go code generation is getting better all the time.
That said, I took the original statement about Go switching from Co to Go to indicate there's been major changes in the compiler, so it would be interesting to see more recent results, not that the change itself necessarily was responsible for major speed improvements, but they could very well have assumed the compiler change would have had a larger affect on the resulting binary depending on their understanding of the Go toolchain.
> Mosquitto was compiled with gcc 4.8.2, the Go implementation was executed with go run, the D implementation was compiled with dmd 2.0.64.2 and the Erlang version I’m not sure.
The "I'm not sure" speaks for itself, but go run also includes both compilation time and execution time and they're comparing it against just the execution times of the other languages. That's not exactly an apples to apples comparison.
I don't know why you think that start-up time has an effect on the benchmarks. It doesn't matter how long the brokers take to start, once they did the measurements were done. `go run` doesn't change a thing.
This is an odd way to measure latency. Could someone explain further?
Benchmarking the entire spec versus only the minimal set is almost certainly part of the problem here. If you want to benchmark implementations against each other, you should probably make sure they implement the same thing!
As for showing "their"/"my" language: there were implementations from 4 different sources, and I didn't write the benchmarks; the guy who wrote the Go implementation did (and that's why the benchmark app is in Go).
Edit: After a quick search, it looks like Go 1.2 was released only 4 days prior to this article being posted.