-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: how to implement sharding while keeping the API functionality #4
Comments
useQueue does work, @mariusbegby did it with cadence bot. Correct shard with correct guild id should work just fine when invoked from discord. However the website may not work with shards using current setup, as any of the shard may receive the request. The overall design of this project does not involve sharding in mind but I will be happy to include this feature in the future. |
@ig4e there should be no special considerations when using It just takes guild id as normal. |
@mariusbegby There are no special considerations on the bot side, but it currently doesn't manage/detect shards on the API side. How will communication between different shards/processes with discord-player bindings be implemented? |
Thanks! I would love to see how it's done, I appreciate it if you could give me a hint ^^ |
@ig4e I am not sure what problem you are running into. I am sharding using discord.js, nothing fancy and it works out of the box. I don't need a different setup of discord-player to get it to work with sharding. It works exactly the same as if no sharding would be used. Hopefully you get something working, but I honestly cannot see what the problem is here. |
as far as I understand, @ig4e is talking about the website part, which I've already responded to saying
The website part may not receive correct shard because there would also be multiple clusters of web servers working simultaneously meaning any of those would receive the request we send. This was not considered while implementing the api, due to which it is not possible to use the website with shards at the moment. We'll need to update the code to include data from all shards in the rest api part. |
how to implement sharding while keeping the API functionality, I tried getting the queue using useQueue from discord-player while sharding and sadly there's no data
The text was updated successfully, but these errors were encountered: