I have developed a plugin for Tomcat that allows session data to be persisted and distributed across a Cassandra ring. I want Cassandra to handle session expiry using TTL settings on the various columns. The problem I have now is that the various objects within a session all expire at different times, so a session loses unused objects over time - even when the session (and other session objects) is continuously accessed.
Is there a way in which I can set the TTL on a super column, and have all data stored under a key in this super column expire when the key expires?
I don't want to traverse all data stored within the web session each time a HTTP response is returned, as this would incur unnecessary I/O between the tomcat plugin and Cassandra. I also don't want to keep any in memory cache in the Tomcat plugin, as I want Tomcat to be completely stateless and maintain all user session state purely in Cassandra.
This Tomcat plugin is pretty nifty, as it allows previously stageful web applications to become stateless - thus allowing horizontal scaling. It would be fantastic to get over this TTL issue...
https://code.google.com/a/apache-extras.org/p/tomcat-cassandra/