D on quora ...

Ecstatic Coder ecstatic.coder at gmail.com
Sun Oct 15 16:29:22 UTC 2017


On Sunday, 15 October 2017 at 12:14:02 UTC, Dmitry Olshansky 
wrote:
> On Sunday, 15 October 2017 at 10:09:02 UTC, Ecstatic Coder 
> wrote:
>>> If the GC issue can not be tackled and even with the recent 
>>> communication blogs, it still keeps showing up. Is it maybe 
>>> not better to focus the marketing features that other 
>>> developers ( none C++ ) may see as advantages and slow draw 
>>> then in? High performance web development package for 
>>> instance. Vibe.d does not count because has not been seen 
>>> giving any descent public performance in years ( like 
>>> techempower or other sites ).
>>
>> At the moment, for very demanding high-performance web 
>> applications, the main choices are :
>> - Dart
>> - Go
>> - C/C++
>> - Java/Kotlin
>>
>> This is somewhat confirmed by the following benchmark (despite 
>> its well known flaws) :
>>
>> https://www.techempower.com/benchmarks/#section=data-r14&hw=ph&test=query
>>
>> I think that D, with its fiber system and extreme execution 
>> speeds, should already have everything needed to compete on 
>> the same grounds as Dart and Go.
>>
>> But only if :
>> - the fibers automatically uses all cores if allowed to do so;
>
> Even if a given fiber is pinned to particular core it will be 
> balanced with typical http request/response model where you 
> have LOTs of short-lived requests. So no changes required.
>
>> - the GC problems is designed so that the server never hangs 
>> for more than a few milliseconds IN THE WORST CASE 
>> (progressive GC)
>
> Actually prioritizing low latency will hurt RPS you seem to 
> care about. Java can easily stay in top 20 with pauses of up to 
> ~100ms.
>
>> - dedicated HIGH PERFORMANCE web server (cfr Go/Dart) and
>
> Might work. In this benchmark it’s hardly the bottleneck, the 
> hardware used can crank out millions of HTTP responses per 
> second.
>
>> database access (MySQL, PostgreSQL, Aerospike) libraries are 
>> available,
>
> That is important actually.
>
>> preferably as a standard library (like in Dart and Go).
>
> Can’t do that. And it’s not standard in Go and Dart but 
> packages, dub should work for that.
>
>>
>> And for the third point, I really mean high performance, 
>> something that make D's implementation of the (silly) 
>> benchmarks immediately go to the top of the chart.
>>
>
> Well I kind if doing this for Regex at times.
> Ilia did this with BLAS libraries. If we had a dozen more of 
> performance maniacs with plenty of spare time we’d win every 
> silly benchmark.
>
>> If all that is already available, perfect :)
> [snip]
>> And moreover I'd be delighted to start using D instead of Go 
>> for my next web server developments.
>
> You can start now and get performance later? In fact you may 
> supply important benchmarks from your day to day usage.

Ok. Still not convinced to use D instead of C++ for my personal 
use cases (games and other soft real-time apps), but I get the 
idea.

Can you just confirm that D's fibers use most of the available 
processors/cores by default ?

I think this is quite automatic with Elixir's Phoenix framework.

http://phoenixframework.org/blog/the-road-to-2-million-websocket-connections
(one more silly benchmark btw, they just open the connections 
without doing anything useful with them)

Btw, when I say you can actually develop complete web servers in 
Dart and Go just with the components provided in the standard 
libraries, I really mean it, even if I personally also use higher 
level external libraries/frameworks (from Github), which extend 
the lower level components of Go's standard library.



More information about the Digitalmars-d mailing list