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: Add delta compression support #20

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

itismoej
Copy link
Contributor

@itismoej itismoej commented Sep 30, 2024

Introduce a way to set new Subscription delta option:

sub = client.new_subscription(channel, delta="fossil")

Option delta can only have fossil value now (delta compression based on Fossil algorithm).

When set, client will try to negotiate delta compression in channel with a server. If server allows this delta type – messages in channel MAY be delta-compressed. Whether messages are delta compressed or not depends on server publishing logic.

@itismoej
Copy link
Contributor Author

itismoej commented Oct 1, 2024

@FZambia FZambia changed the base branch from master to add_delta_support October 6, 2024 13:26
@FZambia FZambia merged commit 94a318d into centrifugal:add_delta_support Oct 6, 2024
5 checks passed
@FZambia
Copy link
Member

FZambia commented Oct 6, 2024

Hello @itismoej !

Many thanks! I reviewed changes here, the algorithm works as expected. Opened a separate PR based on top of your PR with some tweaks: #21 - please take a look.

In contains a couple of important fixes and changes: take a look at commit 8fb4d82 - basically, the same thing as in Java regarding recovery publication processing, also some tweaks in codec implementation. Tests are passing locally now with the latest code of Centrifugo, but fail in CI since based on the released version (5.4.5). As soon as we release new Centrifugo version (5.4.6, will try early upcoming week) - tests should pass.

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.

2 participants