derekkraan / horde

Horde is a distributed Supervisor and Registry backed by DeltaCrdt
MIT License
1.32k stars 106 forks source link

Replaced "identifier" parameter from `Horde.DistributionStrategy.choose_node` for "child_spec" #239

Closed CimimUxMaio closed 1 year ago

CimimUxMaio commented 3 years ago

As discussed in #230 , having child_spec as a parameter would be much more useful for creating custom distribution strategies.

The identifier parameter seems to be only related to Horde.UniformDistribution strategy's logic, and I think its creation would be better placed inside that module rather than in:

https://github.com/derekkraan/horde/blob/63fd3c0e679cfe4e10de1a174083e991d0b38fd1/lib/horde/dynamic_supervisor_impl.ex#L753-L760

sleipnir commented 1 year ago

ping @derekkraan This is a very good feature to be merged

derekkraan commented 1 year ago

Thanks for drawing my attention to this PR again @sleipnir and thanks for submitting @CimimUxMaio even if it took me 2 years to merge.

derekkraan commented 1 year ago

This change is going to require moving from 0.8 to 0.9 (major pre-1.0 version) when it is released, since backwards compatibility will be broken.