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: Limit the size of aggregated WebXDC update to 100 KiB (#4825) #5490

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Apr 23, 2024

See commit messages.
Close #4825

@iequidoo iequidoo force-pushed the iequidoo/webxdc-update-limit-size branch from d4238cd to 0df1218 Compare April 24, 2024 00:02
@iequidoo iequidoo changed the title feat: Limit the size of aggregated WebXDC update (#4825) feat: Limit the size of aggregated WebXDC update to 100 KiB (#4825) Apr 24, 2024
@iequidoo iequidoo marked this pull request as ready for review April 24, 2024 00:14
@iequidoo iequidoo requested a review from link2xt April 24, 2024 00:15
@link2xt
Copy link
Collaborator

link2xt commented Apr 25, 2024

Also don't send any updates together with the WebXDC instance to not complicate the code, the only downside is sending one message more when resending or forwarding WebXDC instances.

What happens in case of message draft where sender wants to set up everything (e.g. a poll) before sending the message out? I think this should always be a single message so we are sure that second message is not lost.

In case of forwarding we don't send updates anyway.

@iequidoo
Copy link
Collaborator Author

iequidoo commented Apr 26, 2024

What happens in case of message draft where sender wants to set up everything (e.g. a poll) before sending the message out? I think this should always be a single message so we are sure that second message is not lost.

Makes sense, i'll change this back. But in case of resending it's easier not to send any updates together with the instance, but in separate messages of limited size.

In case of forwarding we don't send updates anyway.

True, and this is not changed, will fix the commit message.

EDIT: Done

@iequidoo iequidoo force-pushed the iequidoo/webxdc-update-limit-size branch 2 times, most recently from 8ddb466 to 24baa5c Compare April 26, 2024 07:57
Before, update sending might be delayed due to rate limits and later merged into large
messages. This is undesirable for apps that want to send large files over WebXDC updates because the
message with aggregated update may be too large for actual sending and hit the provider limit or
require multiple attempts on a flaky SMTP connection.

So, don't aggregate updates if the size of an aggregated update will exceed the limit of 100
KiB. This is a soft limit, so it may be exceeded if a single update is larger and it limits only the
update JSON size, so the message with all envelopes still may be larger. Also don't send any updates
together with the WebXDC instance when resending it to not complicate the code, the only downside is
sending one message more.
@iequidoo iequidoo force-pushed the iequidoo/webxdc-update-limit-size branch from 24baa5c to 7136e48 Compare May 21, 2024 03:46
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.

Limit the size of aggregated WebXDC update
2 participants