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(breaking): 10.1 - socket engines, refactor, remove dpp::sync #1334

Merged
merged 118 commits into from
Dec 15, 2024

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
  • 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
  • Fix auto reconnect of shard websockets (+ resume)
  • Fix auto reconnect of voice websockets (+ resume)
  • Fix runaway cpu after reconnect
  • Check that https requests are being freed when done, in queues.cpp
  • Track down sometimes segfaults on destruct of cluster
  • Documentation (incl new working webhooks example)

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. This is a breaking new version change.
  • 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 56694b2
🔍 Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/675d7ba8e9778700089e1dc8
😎 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 braindigitalis changed the title feat: Socket Engines 🚀 feat(breaking): Socket Engines 🚀 Dec 13, 2024
@braindigitalis braindigitalis changed the title feat(breaking): Socket Engines 🚀 feat(breaking): Socket Engines 🚀 🔌 Dec 13, 2024
@braindigitalis braindigitalis changed the title feat(breaking): Socket Engines 🚀 🔌 feat(breaking): Socket Engines 🚀🔌 Dec 13, 2024
@braindigitalis braindigitalis changed the title feat(breaking): Socket Engines 🚀🔌 feat(breaking): 10.1 - socket engines, refactor, remove dpp::sync Dec 13, 2024
@braindigitalis braindigitalis marked this pull request as ready for review December 13, 2024 18:04
Copy link
Member

@RealTimeChris RealTimeChris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@braindigitalis braindigitalis merged commit 265ccc0 into dev Dec 15, 2024
87 checks passed
@braindigitalis braindigitalis deleted the socketengine branch December 15, 2024 15:47
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
Development

Successfully merging this pull request may close these issues.

4 participants