D for microservices
Jacob Carlborg
doob at me.com
Tue Oct 24 06:29:01 UTC 2017
On 2017-10-24 00:02, Adam Wilson wrote:
> I've been looking pretty extensively at these two items recently.
>
> If the database drivers are compatible with Vibe.d AND we wish to
> provide a common abstraction layer for them (presumably via Phobos) then
> order for the abstraction layer to aware of the whether the driver is
> making a blocking or non-blocking call we must include Vibe.D in the
> abstraction layer. Ergo, we must include at least the vibe-core package
> in Phobos, or more preferably, DRT.
It can be an optional dependency. Looking at ddb [1] it's not that much
code that will be different if vibe.d is used or not. It's basically
only reading and writing to the socket that is different [2]. Dub
provides predefined version for different dependencies, i.e.
Have_vibe_d_core.
> I had heard noises about that a few months ago. Anything happening on
> that front?
No, not as far as I know. Sönke seems really busy recently.
> What would the appetite be for working together to come up with a
> reasonably generic event loop for DRT that vibe and other systems could
> then leverage?
I would be really nice to database support directly in the standard
library but it's not critical for me. It takes a lot of work with and
massive overhead to get something into Phobos. It's also going to be
really slow get in updates. I'm not sure if it's worth it.
[1] https://github.com/pszturmaj/ddb
[2]
https://github.com/pszturmaj/ddb/blob/master/source/ddb/postgres.d#L189-L246
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list