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

Driver: Gate UDP Receive handling with Cargo feature #131

Closed
FelixMcFelix opened this issue May 23, 2022 · 0 comments
Closed

Driver: Gate UDP Receive handling with Cargo feature #131

FelixMcFelix opened this issue May 23, 2022 · 0 comments
Labels
breaking Will either cause existing code to fail to compile, or cause substantial behaviour changes driver Relates to the driver or one of its sub-tasks. enhancement New feature or request feature-request Request for addition of a new feature or improvement.

Comments

@FelixMcFelix
Copy link
Member

Many bots shouldn't require any UDP/RTP traffic handling: as such, we can remove a fair amount of types and tasks if needed. This could be a default feature, or we could require that this be explicitly specified to reduce packet handling costs for most users painlessly. In the latter case, this needs to be documented for version migration.

@FelixMcFelix FelixMcFelix added enhancement New feature or request driver Relates to the driver or one of its sub-tasks. breaking Will either cause existing code to fail to compile, or cause substantial behaviour changes feature-request Request for addition of a new feature or improvement. labels May 23, 2022
@FelixMcFelix FelixMcFelix added this to the v0.3.0: Nightingale milestone May 23, 2022
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this issue Jul 28, 2022
Adds the "receive" feature, which is disabled by default. When this is disabled, the UDP receive task is not compiled and not run, and as an optimisation the UDP receive buffer size is set to 0. All related events are also removed.

Closes serenity-rs#131.
FelixMcFelix added a commit that referenced this issue Aug 1, 2022
Adds the "receive" feature, which is disabled by default. When this is disabled, the UDP receive task is not compiled and not run, and as an optimisation the UDP receive buffer size is set to 0. All related events are also removed.

This also removes the UDP Tx task, and moves packet and keepalive sends back into the mixer thread. This allows us to entirely remove channels and various allocations between the mixer and an async task created only for sending data (i.e., fewer memcopies).

If "receive" is enabled, UDP sends are now non-blocking due to technical constraints -- failure to send is non-fatal, but *will* drop affected packets. Given that blocking on a UDP send indicates that the OS cannot clear send buffers fast enough, this should alleviate OS load.

Closes #131.
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this issue Nov 20, 2023
Adds the "receive" feature, which is disabled by default. When this is disabled, the UDP receive task is not compiled and not run, and as an optimisation the UDP receive buffer size is set to 0. All related events are also removed.

This also removes the UDP Tx task, and moves packet and keepalive sends back into the mixer thread. This allows us to entirely remove channels and various allocations between the mixer and an async task created only for sending data (i.e., fewer memcopies).

If "receive" is enabled, UDP sends are now non-blocking due to technical constraints -- failure to send is non-fatal, but *will* drop affected packets. Given that blocking on a UDP send indicates that the OS cannot clear send buffers fast enough, this should alleviate OS load.

Closes serenity-rs#131.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Will either cause existing code to fail to compile, or cause substantial behaviour changes driver Relates to the driver or one of its sub-tasks. enhancement New feature or request feature-request Request for addition of a new feature or improvement.
Projects
None yet
Development

No branches or pull requests

1 participant