Thread overview
D and Async I/O
May 11, 2020
Russel Winder
May 11, 2020
bauss
May 12, 2020
Paolo Invernizzi
May 11, 2020
OK, so I need to create an asynchronous TCP server (not HTTP or HTTPS, this is
a real server ;-) ).

I think the normal response is "Use Vibe.d". However, recently I see Hunt is an alternative. Has anyone any way of choosing between the two?

I notice that Hunt uses it's own library eschewing all of Phobos. Is this an
indicator that Phobos is not suitable for networking activity?

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



May 11, 2020
On Monday, 11 May 2020 at 14:02:54 UTC, Russel Winder wrote:
> OK, so I need to create an asynchronous TCP server (not HTTP or HTTPS, this is
> a real server ;-) ).
>
> I think the normal response is "Use Vibe.d". However, recently I see Hunt is an alternative. Has anyone any way of choosing between the two?
>

vibe.d is much more mature than Hunt, that would be my take on it.

Also Hunt lacks documentation etc.

> I notice that Hunt uses it's own library eschewing all of Phobos. Is this an
> indicator that Phobos is not suitable for networking activity?

std.socket is terrible, so yes that is an indicator.

You can't even wrap something up fast in it either.

Basically it's low-level while not being low-level at the same time. You have to handle __everything__ yourself pretty much.
May 12, 2020
On Monday, 11 May 2020 at 15:02:59 UTC, bauss wrote:
> On Monday, 11 May 2020 at 14:02:54 UTC, Russel Winder wrote:
>> OK, so I need to create an asynchronous TCP server (not HTTP or HTTPS, this is
>> a real server ;-) ).
>>
>> I think the normal response is "Use Vibe.d". However, recently I see Hunt is an alternative. Has anyone any way of choosing between the two?
>>
>
> vibe.d is much more mature than Hunt, that would be my take on it.
>
> Also Hunt lacks documentation etc.
>
>> I notice that Hunt uses it's own library eschewing all of Phobos. Is this an
>> indicator that Phobos is not suitable for networking activity?
>
> std.socket is terrible, so yes that is an indicator.
>
> You can't even wrap something up fast in it either.
>
> Basically it's low-level while not being low-level at the same time. You have to handle __everything__ yourself pretty much.

Have a look also to Martin std.io [1] and Steven iopipes [2], if you need something simple.

[1] https://github.com/MartinNowak/io
[2] https://code.dlang.org/packages/iopipe