Open kikkia opened 7 months ago
Open to discussion or feedback on the way y'all are open to solving this problem. In theory the simplest way would just be to open the
Link.transferNode
function and then let users create their own custom loadbalancer that does not pay attention to the Node Penalties tracker I am refactoring here, and keep track of all of that themselves.
I think it would be better if LavalinkClient got an optional parameter that would allow for overriding the entire loadbalancer that way. I think that there already is an interface for that (maybe even a setter as well)
Will take a look at that when I get some time in a day or so. Thanks
The Penalties member of the LavaLinkNode provides a health based penalty tracker for the node. By refactoring this into an interface INodeHealthProvider we can better encapsulate its function compared to the IPenaltyProvider.
That penalties member is also not configurable for the user of the library, locking them into the default node health based loadbalancing, or overriding the default loadbalancer and having this class "dangle" still around but not doing anything except waste some cycles listening to events.
I am not married to the naming I chose here so super open to changing that + package structure. Just throwing this out there for the first pass towards unlocking some more control over the loadbalancing and controlling what players are on what nodes.
Right now the concept of nodes being either available or unavailable based soley on connection to the server is hindering the ability to correct for transient errors.
Open to discussion or feedback on the way y'all are open to solving this problem. In theory the simplest way would just be to open the
Link.transferNode
function and then let users create their own custom loadbalancer that does not pay attention to the Node Penalties tracker I am refactoring here, and keep track of all of that themselves.