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

feat: Socket Engines 🚀 #1334

Draft
wants to merge 78 commits into
base: dev
Choose a base branch
from
Draft

feat: Socket Engines 🚀 #1334

wants to merge 78 commits into from

Conversation

braindigitalis
Copy link
Contributor

@braindigitalis braindigitalis commented Nov 13, 2024

Socket engines are a high performance abstraction layer for socket events. The end goal of this project is to increase the performance of DPP's internals at scale while using many less threads for the same task. Where currently each shard cluster has its own socket loop, and every request has its own internal socket loop, this will be a thing of the past with one core socket loop per cluster managed by epoll, kqueue or poll.

The correct socket loop type is selected automatically by cmake.

This project will take a long time to finish (it has already been in progress for a while now) and will be a significant internal change. As far as a library user is concerned there will be minimal change to how the library works if any.

TODO

  • fix error handling/exceptions
  • fix auto reconnect
  • fix background startup if bot.start(true)
  • move all events into thread pool
  • voice websockets
  • fix weird issue where voice only works if Discord clients join after bot
  • Fix auto reconnect of voice socket after error code 1000 (and find out why its disconnecting at all)
  • investigate if the threads left in queues.cpp can be refactored
  • investigate spurious https request timeouts (handshake failure?)
  • fix plaintext http requests
  • thoroughly test kqueue (needs a freebsd vm or shell or help from someone with macos)
  • thoroughly test poll (on windows)
  • fix dpp::sync

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@github-actions github-actions bot added documentation Improvements or additions to documentation build Issue or Pull Request related to the build process code Improvements or additions to code. packaging labels Nov 13, 2024
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit feee595
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/674729c609ab8f0008184437
😎 Deploy Preview https://deploy-preview-1334--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

braindigitalis and others added 30 commits November 19, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issue or Pull Request related to the build process code Improvements or additions to code. documentation Improvements or additions to documentation packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants