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

Potential problems with large messages #3

Open
anderspitman opened this issue Aug 17, 2024 · 1 comment
Open

Potential problems with large messages #3

anderspitman opened this issue Aug 17, 2024 · 1 comment

Comments

@anderspitman
Copy link
Member

omnistreams aims to support passing arbitrary messages in a descrete send. However, at one point I ran into problems with Chrome trying to send chunks that were too big, which resulted in this commit: 3d5fff0

What that means is we're currently limited to messages that are 64KiB. Need to do more exploration now that things are more stable and see if we can better understand the limitations. I suspect there may have been confounding variables with the Golang implementation and maybe the window size as well.

Worst case we might need to keep the muxado frame length and permit omnistreams frames to be split across multiple WebSocket frames. It would be nice to avoid that, but it's not too completely awful to implement. Here's the current implementation which is only needed if interfacing with a muxado peer:

class MuxadoTransportWrapper {

@anderspitman
Copy link
Member Author

anderspitman commented Aug 17, 2024

Just did a quick test and when piping a file into a TransformStream, Chrome (127.0.6533.99) is yielding chunks of size 2097152 out the other side, whereas Firefox (129.0) is only yielding size 65536 chunks. 2MiB might be a little big. It's tricky. Whatever value we accept, the default window size needs to be at least that big. Maybe we just punt it to devs: make the window size configurable (with a reasonable default), and make the max chunk size always match the window size.

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

No branches or pull requests

1 participant