Future(s) for D.
Etienne via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jun 20 16:55:00 PDT 2015
On Saturday, 20 June 2015 at 22:42:23 UTC, Ellery Newcomer wrote:
> On 06/20/2015 07:00 AM, Etienne wrote:
>> On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote:
>>> On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote:
>>>> [...]
>>>
>>> Even if the callbacks are sequentially listed, the "callback
>>> hell" is
>>> still there.
>>>
>>> A better solution is to use fibers. You can take a look at a
>>> fibers[1]
>>> and tasks[2] implementation in asynchronous library[3].
>>>
>>> [1] -
>>> https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/futures.d
>>>
>>> [2] -
>>> https://github.com/dcarp/asynchronous/blob/master/src/asynchronous/tasks.d
>>>
>>> [3] - http://code.dlang.org/packages/asynchronous
>>
>> Yep, looks like we already have better. I don't understand how
>> D hasn't
>> fully picked up in Web Dev at this point. Are they expecting an
>> e-commerce/blogging/cms platform to go with it?
>
> A while back I was bored and curious to see how vibe would fare
> in the web framework benchmarks
> (http://www.techempower.com/benchmarks/) so I started adding
> vibe to it (https://github.com/ariovistus/FrameworkBenchmarks).
>
> Chose to go with ddb. Postgresql+asynchronous, sounds great. It
> didn't compile with the latest dmd at the time. So I fixed it
> up, made a PR, and it worked fine.
>
> It looked like I was getting results close to netty (in json
> serialization) without much effort, but ultimately, I set it
> aside to wait for my PR to be merged.
>
> what is the deal with ddb, anyways? Is it dead?
Hm, ddb doesn't have an asynchronius driver so you're probably
going through std.socket which is thread blocking. I think the
author isn't very active, but you shouldn't make it a habit to
wait for a merge before continuing, or else you'll never be
productive. Worst case your fork will be more up to date and you
can become the maintainer I guess
More information about the Digitalmars-d
mailing list