-
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
Initial support for cassandra backend #589
Conversation
This is currently somewhat rough. A decent amount of cleanup and documentation is required, and it is light on unit tests. I had issues getting https://github.com/jsevellec/cassandra-unit and embedded Cassandra working, so the integration test currently depends on Cassandra running outside the process on localhost (I added Cassandra to the travis service list). |
@@ -19,6 +19,8 @@ httpClientVersion=4.5.1 | |||
jedisVersion=2.8.1 | |||
h2Version=1.4.191 | |||
springDataMongoVersion=1.9.1.RELEASE | |||
springDataCassandraVersion=1.5.0.M1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Ingalls milestone release really required here? Other Spring Data dependencies are on Hopper release train level ATM, so we should use 1.4.2.RELEASE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowered to the stable version, which also drops the Cassandra version from 3 to 2.
Tests fail on cass3, but pass on cass2 locally.
Pretty sure this means the travis tests will be broken until I can get embedded cass working.
I've added some comments on the code. IMO it would be reeeally nice if you managed to get embedded Cassandra to work with integration tests. |
…ver by copy pasting the class. Temporary measure until spring-projects#557 is resolved.
insert.using(QueryBuilder.ttl(ttl)); | ||
} | ||
catch (IllegalArgumentException e) { | ||
log.info("Session has already expired, skipping save"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performing that check eagerly might help skip conversion (serialization)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, updated
Nice approach. I added my thoughts to the PR. Besides some basic configuration, you also might want to be able to configure the consistency level to tune throughput vs. consistency. |
Finally got Embedded Cassandra working, not sure what I was missing initially |
@jjzazuet We're currently in the RC phase of the |
@vpavic got it. Thanks! |
Documentation updates
Hello everyone. Just wanted to ping to check if this PR is good for the |
At a minimum there are some conflicts that need to be updated. I'm a little short on time at the moment, but I think I just gave you push access to my repo if you want to clean those up @jjzazuet . |
@fitzoh yep, I can give those a shot. Thanks! |
@vpavic got it. Many thanks! |
I'm afraid we are removing this from the @rwinch and I have been discussing the supported data stores over the past few weeks, and the decision was made to limit the first-class supported data stores to Redis, JDBC and Hazelcast from @fitzoh @jjzazuet we'd like to encourage you to make this effort a Spring Session community extension project. We promote such extensions in Community Extensions section of the reference manual so please open a issue/PR to list your project in there once you set it up. Thank you for your efforts. Also thanks to @mp911de for providing his feedback on this PR. |
@vpavic @rwinch ay ay ay... alright... I mean, I still like the idea of keeping each data store implementation separate as per #768. Anyway, it looks like milestone 2.0.0 M1 is nearing completion, so I guess we should target that Spring session version, right? @fitzoh , would you like me to start a Thanks! |
@jjzazuet just realized I never replied... Yeah, feel free to prep a repo/build if you'd like. |
You can also use the newly created spring-session-data-mongodb and spring-session-data-geode repositories as references. |
@vpavic @cah-andrewfitzgerald alright. Yes it looks like both repositories are compiling against |
Good news for anyone who might stumble upon this in the future: |
Provides a Cassandra Spring Session backend per #588, with dependencies provided via Spring Data Cassandra.