-
Notifications
You must be signed in to change notification settings - Fork 8
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
Extensions API doesn't allow for selective compression #2
Comments
By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
I'm parking this for the moment since I have no idea what an API should look like. No API for this exists in the browser (as far as I know), although some browsers (Opera) do skip compression on small messages where compression would actually enlarge the payload. I'm not sure how they do that; you can't compress a message and then compare the size, because that alters the state of the DEFLATE context and you must transmit the compressed payload to the other peer so it can mirror those changes. My main concern is about surfacing extension control parameters via |
I'm also not sure conceptually what should be parameterised per |
(This is the third attempt to enable this. I believe as of permessage-deflate 0.1.3, it works properly.) By default, we attempt to use this for every websocket message on both client and server. On the server, we provide the SERVER_WEBSOCKET_COMPRESSION environment variable to control compression. If $SERVER_WEBSOCKET_COMPRESSION is set, then it must be valid JSON. If it represents a falsey value, then we do not use permessage-deflate at all; otherwise, the JSON value is used as an argument to deflate's configure method; see https://github.com/faye/permessage-deflate-node/blob/master/README.md We do not provide a way to use it only on some messages. The underlying spec allows this but permessage-deflate does not; see faye/permessage-deflate-node#2 We do not provide a mechanism to control compression parameters on the client side. The assumption is that the common reason to care about compression parameters is to control server per-connection memory usage. (The noContextTakeover configuration parameter should save some memory and still allow for some compression, for example.) Addresses #3007 (which will not be fixed until this change is deployed on the package server as well).
The permessage-deflate spec is designed to allow senders to choose not to compress all messages (eg, messages that already contain compressed binary data), but the extensions API doesn't allow senders to make this choice.
(My personal needs don't require this, but it does seems like something that users might care about.)
The text was updated successfully, but these errors were encountered: