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(network): divide compression algorithm support in three categories #150

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

Conversation

nerodono
Copy link
Contributor

@nerodono nerodono commented Jan 16, 2025

This PR introduces more flexibility in compression algorithm selection by dividing "support" in three categories:

  • supported - the algorithm can be used to communicate with the node
  • preferred - the algorithm should be selected to communicate with the node
  • disabled - the algorithm is not supported

Two nodes decide on the algorithm as follows:

  • If they both have preferred algorithms in common - select in [hard-coded] preference order
  • If first node prefers something that is supported by the second node - the algorithm is selected in the [hard-coded] preference order
  • Otherwise, no compression would be used

First of all, this algorithm implies there's node which "leads" in choice of algorithm ("first node"), in the current implementation, lead node is node that accepts the connection.

BREAKING CHANGES: compression algorithms in config expressed now as follows:

algorithms = { lz4 = "preferred", zstd = "supported" }

@nerodono nerodono force-pushed the feat/compression-preferences-in-network branch 2 times, most recently from 6b4872d to b05947d Compare January 16, 2025 13:29
@nerodono nerodono force-pushed the feat/compression-preferences-in-network branch 2 times, most recently from ec329d1 to f91660f Compare January 16, 2025 13:51
@loyd loyd requested review from laplab and loyd January 16, 2025 13:51
@nerodono nerodono force-pushed the feat/compression-preferences-in-network branch from f91660f to 575b557 Compare January 16, 2025 15:10
…ies: supported, preferred and disabled

BREAKING CHANGES: Compression in algorithm configuration format is changed as follows:
```toml
algorithms = { lz4 = "preferred" }
```
@nerodono nerodono force-pushed the feat/compression-preferences-in-network branch from 575b557 to bd294b5 Compare January 16, 2025 20:43
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.

1 participant