Hi,
I'm proud to announce the release of memcached-session-manager 1.1.
With this release memcached-session-manager comes with pluggable session serialization and two serialization strategies in addition to the default java serialization: the first one uses xstream [1] to serialize/deserialize the session (xstream does all the work). The other one is based on javolution [2], which is a fast xml binding library. The main part of this serialization strategy handles the binding of user types via reflection, and tells javolution what to serialize/deserialize to/from xml. As this is my favourite serialization strategy (and used by myself) I'd encourage you to try this out and see how it works for you.
You can read more about advantages/disadvantages of the different strategies in the wiki:
A first simple performance comparison is also done for these strategies, it's showing the number of requests/second for different pages (different session size) for each of the existing strategies:
The setup and configuration page is updated to reflect the new features (there are two new configuration properties transcoderFactoryClass and copyCollectionsForSerialization):
A note regarding the switch to another serialization strategy in a production environment: as the serialized content is different for each of the strategies, a session that was serialized with the former serialization strategy cannot be picked up by another tomcat that's already using the new/other serialization strategy.
Therefore, if you don't want to loose sessions, each tomcat that you upgrade should first run out of sessions so that his sessions (serialized with the old strategy) don't have to be picked up by other tomcats which possibly are already using the new serialization strategy (this only applies to all tomcats except to the first one).
What's next?
- Extend the performance comparison by memory consumption
- Open-source the example project
- I'm already working on a serialization strategy based on aalto xml [3] which is basically very similar to the javolution based one, however I'm trying to create an even faster serialization strategy that beats java serialization in terms of performance.
- Serialized sessions might only be sent to memcached if the session data has changed. I expect this feature to reduce the requests to memcached significantly.
That's it, have fun with the new release and let me know any questions/suggestions/issues you have.
Cheers and a happy new year,
Martin