Skip to content
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

[Testing] Internal Sharding #2329

Closed

Conversation

FireController1847
Copy link
Contributor

@FireController1847 FireController1847 commented Feb 7, 2018

Please describe the changes this PR makes and why it should be merged:
Seeing as #1578 is now closed, I thought I'd take a shot at it. It's not ready yet, but I thought I'd PR if anyone wants to comment throughout my commits. So far I've only been able to get it to work, I haven't cleaned up anything or restructured stuff, and it's currently not working other than logging in. I've based this PR on Gus's previous PR, and plan on continuing it.

Theory
In theory, Internal Sharding should solve the issue with people needing to use the (might I add horrible) broadcastEval function as well as many other limitations on interacting with other shards. When a bot does not need sharding, it will still use the same sharding system (ex. guild.shard), the only difference is there will only be one shard for everything. This makes it extremely easy once you've began to shard to just enable the option and forget about sharding ever again. Of course, if you still like the ShardingManager that will continue to work aswell.

More Info
I understand that this is a massive project to undertake, so I appreciate all Pull Requests on my fork of it if anyone wants to help me out. Cleanup will be done after everything is working, that way we get the concept down and then make it usable by the user.

Example Usage

const client = new Discord.Client({
  internalSharding: true,
});

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@devsnek
Copy link
Member

devsnek commented Feb 7, 2018

the idea with this is that you don't worry about shards, keep guilds where they are

@FireController1847
Copy link
Contributor Author

FireController1847 commented Feb 8, 2018

Alright! So this was actually easier than I thought it would be, and it's in a working prototype now. In fact, most of the stuff in the library works. Now I'm going to run through some tests and fix any bugs I find but this might actually be almost complete already o.o

If anyone is able to can you use my branch and see if you can find any bugs as well? :D

I did NOT include --save when installing node opus. Ya butt.
@FireController1847 FireController1847 changed the title [WIP] Internal Sharding [Testing] Internal Sharding Feb 8, 2018
@FireController1847
Copy link
Contributor Author

Closing this so I can give the proper credits to @devsnek on a seperate PR.

@FireController1847 FireController1847 mentioned this pull request Feb 8, 2018
6 tasks
@FireController1847 FireController1847 deleted the internalsharding branch February 8, 2018 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants