December 05, 2013
> Interesting. Care to convert this post (only a little adjustment needed) to a blog and publish with source code? Would make a great article. Ask your friends to contribute with descriptions of their implementations, too.

Ask, and you shall receive:

https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-c-in-real-life-mqtt-broker-implementation-shootout/

December 05, 2013
On Thursday, 5 December 2013 at 14:55:53 UTC, Jeff R. Allen wrote:
> I am the buddy who's always going on and on about Go.
>
> Here's the blog posting I made explaining why/how I made the MQTT server in Go and what I learned:
>
>   http://blog.nella.org/mqtt-code-golf/
>
> I was a bit surprised and interested to see that MQTT with small transactions is not easy to optimize because kernel/user context switching dominates the work that's done under control of the programmer and which can be optimized via data structures and/or reducing GC overhead.
>
> Something that both Atila and I verified in this exercise is that writing a fast network server that scales is so much easier with a very good networking library that takes advantage of lightweight threads, and with a runtime that provides GC. This frees up the programmer to focus on the protocol logic, and leave concurrency and bookkeeping in the capable hands of the machine.
>
> And, as has been mentioned on other Go versus D threads, a lot of this is a matter of taste and team dynamics. I've worked on many teams in my career where there was not a critical mass of people who could reason correctly about C++ memory management, and who could use generic programming techniques reliably. And, in line with discoveries from psychological research, it's common that people who are not competent at something do not recognize that fact. Perhaps I'm above average in this regard: I KNOW I'm not smart enough to write correct code using templating techniques. :)
>
>   -jeff



This is why we already did quite a few consultancy projects that
replaced C++ coded servers by JVM/.NET ones with comparable
performance.

Despite what many anti-GC naysayers say, if you code your data
strucutures and algorithms to be GC friendly, coupled with the
current state of art JIT compilers, one achieves similar
performance coupled with safety.

It doesn't need to extract every ms out of the hardware as C and
C++ developers always try to do, but to be fast enough to be able
to fulfill the task.

--
Paulo
December 05, 2013
On Thursday, 5 December 2013 at 15:24:31 UTC, Atila Neves wrote:
>> Interesting. Care to convert this post (only a little adjustment needed) to a blog and publish with source code? Would make a great article. Ask your friends to contribute with descriptions of their implementations, too.
>
> Ask, and you shall receive:
>
> https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-c-in-real-life-mqtt-broker-implementation-shootout/

_very_ well-written. I can only dream every other benchmarking article out there would have been done with same attention to details :)

http://www.reddit.com/r/programming/comments/1s5ze3/benchmarking_d_vs_go_vs_erlang_vs_c_for_mqtt/
December 05, 2013
On 12/5/13 7:46 AM, Dicebot wrote:
> On Thursday, 5 December 2013 at 15:24:31 UTC, Atila Neves wrote:
>>> Interesting. Care to convert this post (only a little adjustment
>>> needed) to a blog and publish with source code? Would make a great
>>> article. Ask your friends to contribute with descriptions of their
>>> implementations, too.
>>
>> Ask, and you shall receive:
>>
>> https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-c-in-real-life-mqtt-broker-implementation-shootout/
>>
>
> _very_ well-written. I can only dream every other benchmarking article
> out there would have been done with same attention to details :)
>
> http://www.reddit.com/r/programming/comments/1s5ze3/benchmarking_d_vs_go_vs_erlang_vs_c_for_mqtt/

Fasten your seatbelts, it's gonna be a bumpy ride!

Andrei

December 05, 2013
On Thu, 05 Dec 2013 16:24:29 +0100, Atila Neves wrote:

>> Interesting. Care to convert this post (only a little adjustment needed) to a blog and publish with source code? Would make a great article. Ask your friends to contribute with descriptions of their implementations, too.
> 
> Ask, and you shall receive:
> 
> https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-
c-in-real-life-mqtt-broker-implementation-shootout/

Thanks, excellent write-up.
December 05, 2013
On Thursday, 5 December 2013 at 15:24:31 UTC, Atila Neves wrote:
>> Interesting. Care to convert this post (only a little adjustment needed) to a blog and publish with source code? Would make a great article. Ask your friends to contribute with descriptions of their implementations, too.
>
> Ask, and you shall receive:
>
> https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-c-in-real-life-mqtt-broker-implementation-shootout/

Very nice article! I'm pretty happy to see D doing so well on this.

"pingtest (latency - bigger is better)"

Did you mean "lower is better"? Or is this not measuring time-taken?
December 05, 2013
> Very nice article! I'm pretty happy to see D doing so well on this.
>
> "pingtest (latency - bigger is better)"
>
> Did you mean "lower is better"? Or is this not measuring time-taken?

No, it's correct. Instead of measuring the round-trip time I measured how many messages per second were sent. They're equivalent measures, I just preferred this one, which also makes it easy to compare with the other benchmark.

Atila
December 05, 2013
On Thursday, 5 December 2013 at 16:34:11 UTC, Atila Neves wrote:
>> Very nice article! I'm pretty happy to see D doing so well on this.
>>
>> "pingtest (latency - bigger is better)"
>>
>> Did you mean "lower is better"? Or is this not measuring time-taken?
>
> No, it's correct. Instead of measuring the round-trip time I measured how many messages per second were sent. They're equivalent measures, I just preferred this one, which also makes it easy to compare with the other benchmark.
>
> Atila

Oh, okay, I see. Thanks :)
December 05, 2013
On 12/5/13 7:46 AM, Dicebot wrote:
> On Thursday, 5 December 2013 at 15:24:31 UTC, Atila Neves wrote:
>>> Interesting. Care to convert this post (only a little adjustment
>>> needed) to a blog and publish with source code? Would make a great
>>> article. Ask your friends to contribute with descriptions of their
>>> implementations, too.
>>
>> Ask, and you shall receive:
>>
>> https://atilanevesoncode.wordpress.com/2013/12/05/go-vs-d-vs-erlang-vs-c-in-real-life-mqtt-broker-implementation-shootout/
>>
>
> _very_ well-written. I can only dream every other benchmarking article
> out there would have been done with same attention to details :)
>
> http://www.reddit.com/r/programming/comments/1s5ze3/benchmarking_d_vs_go_vs_erlang_vs_c_for_mqtt/

https://news.ycombinator.com/item?id=6855278

https://twitter.com/D_Programming/status/408634007052492800


Andrei


December 05, 2013
> https://news.ycombinator.com/item?id=6855278
>
> https://twitter.com/D_Programming/status/408634007052492800

Yeah, I thought that would happen. :) Thanks!

Anyone care to guess how many comments it will take to get to name calling?

Atila