Sharding Phobos an alternative to sharding druntime

Paolo Invernizzi paolo.invernizzi at gmail.com
Sat Jun 22 08:37:40 UTC 2024


On Friday, 21 June 2024 at 16:39:43 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> We've had a meeting to discuss splitting up druntime a bit, 
> although we got slightly off track during it.
>
> As part of it, it was suggested by Steven that instead of 
> sharding druntime, we should shard phobos, so here is my 
> proposal.
>
> I proposed this many many months ago, right back at the start 
> of PhobosV3 work that we "shard" Phobos, of course back then I 
> didn't call it as such.
>
> The reason we did not adopt this earlier is because of some 
> insistence from Walter for PhobosV3 must be import only, which 
> I unsurprisingly have been against this entire time; although 
> he has now accepted that this will not necessarily be possible.
>
> The idea is simple:
>
> - You have a root package, this has been decided to be 
> ``phobos``.
> - A sub package below that ``phobos.XYZ`` would be a "shard".
> - A shard may be mapped to a binary, or it could be import only.
> - Each shard would be considered independent of the others, 
> however it may declare a dependency on another.
> - No module can exist outside of a shard.
>
> As a proposal it is simple to map a module to its binary.
>
> It scales as PhobosV3 grows, with each independent shard 
> allowed to do its own thing that it requires with clear 
> dependencies.
>
> We do not need to worry about things like event loops design 
> work right now, but it does allow us to go: its a dependency of 
> sockets therefore we can't do it right now.
> This too was a concern of Walter's that Adam Wilson was taking 
> on too much.

Independent ... but with dependency?
The impression is that everything in D-lanD is moving towards an 
over-eng complexity ...



More information about the Digitalmars-d mailing list