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

Adds pluggable SerializationStreamFactory #169

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

timklge
Copy link
Contributor

@timklge timklge commented Dec 3, 2024

Description

This pull request introduces a SerializationStreamFactory bean to provide output and input stream instances, enabling the injection of custom implementations. In our project, we use a custom stream implementation to achieve the following objectives:

  • Replace the default transient handling logic with custom logic that, by default, does not serialize any referenced spring beans (even if they're not marked as transient, refer to issue Enable serialization output / input stream customization #168 for more details)
  • Directly write the serialized output to a zstd compression stream, which in our case compresses down the sessions by a factor of six in a few milliseconds
  • Add a micrometer timer that measures the time between creating and closing the stream to monitor serialization runtime

Fixes #168

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@CLAassistant
Copy link

CLAassistant commented Dec 3, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tamasmak
❌ Tim Kluge


Tim Kluge seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@timklge timklge force-pushed the feature/serialization-stream-factory branch from cfdce30 to 186df8b Compare December 3, 2024 08:43
@tamasmak tamasmak merged commit 0762ecd into vaadin:main Feb 11, 2025
1 of 2 checks passed
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.

Enable serialization output / input stream customization
3 participants