-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add option to use compression #1084
Comments
@vpavic if you think this would be acceptable, I can prepare a PR. |
Thanks @candrews. From the description, it's not clear whether you are suggesting this for a specific Flexibility in choice of serialization mechanism should be provided, since the serialization itself can have a significant impact on performance. Rather than changing our defaults, I think we should look into providing configuration facilities for customizing serialization mechanism in |
There are ways to do this today, but they're far from intuitive/simple and they're different for each repository implementation.
So those two are completely different. Which way should we go? Options include:
Thoughts? I'd like some feedback before I go spending a bunch of time going down this particular rabbit hole. :) Thanks! |
@vpavic thoughts? |
I think the first step would be to ensure custom serialization mechanisms are in place for each repository type. Then providing a serialization mechanism that performs the compression. |
👍
👎 I think serialization and compression as related, but not one in the same (they shouldn't be linked). My choice of compression shouldn't be dependent on my choice of serialization. I should be able to use Java serialization with bzip, for example, without having to write my own JavaSerializationWithBzipCompression class. |
Regarding the support for custom serialization in
This is one of those things that adds complexity for a very specific use case - to my knowledge you're the only one who requested compression. Let's start with #1166 as that will provide you a way to meet your requirement. |
Closing as we're not keen to add this ATM, and |
Spring Session uses Java serialization to convert objects to bytes which are then persisted. Java's serialization format is quite verbose and it compresses very well - it would be nice to offer optional compression for the serialized byte data. Doing so would use less persistent storage and transfer less data over the network, and in at least some situations result in an overall performance improvement.
Using Java's GZIPInputStream/GZIPOutputStream seems like a great option, as it would introduce no new dependencies and work everywhere.
The text was updated successfully, but these errors were encountered: