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

Add routing capabilities to support per tenant keyspace [DATACASS-330] #499

Closed
spring-projects-issues opened this issue Aug 8, 2016 · 4 comments
Assignees
Labels
in: core type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link

spring-projects-issues commented Aug 8, 2016

Markus Geiß opened DATACASS-330 and commented

In an environment where a keyspace per tenant setup is wanted it would be good to follow a similar approach like with AbstractRoutingDataSoure.

A possible solution would be an AbstractRoutingCassandraTemplate utilizing a CassandraAdminTemplate to retrieve metadata, and a cached list of CassandraTemplates per session, retrievable by a RoutingCassandraSessionContext.

This would allow the usage of Spring Data Cassandra in a multi-tenancy environment where data shouldn't be shared


Referenced from: pull request #93

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Aug 22, 2016

Mark Paluch commented

Hi Markus Geiß, thanks for this ticket.

Template and DataSource are different abstractions. We plan to tear the templates apart (Decouple CassandraTemplate and CQLTemplate from each other, move the sync and async API parts into CQLTemplate and AsyncCQLTemplate, respective CassandraTemplate and {{AsyncCassandraTemplate}, see DATACASS-292)

How about routing on com.datastax.driver.core.Session level? I'm thinking about something that compares to a DataSource, maybe a SessionFactory that is used by our Cassandra/CQL templates. The default returns just the default Session. The routing version would be a AbstractRoutingSessionFactory following the concepts of AbstractRoutingDataSource.

What do you think?

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Aug 22, 2016

Markus Geiß commented

Hey Mark Paluch,

sounds good, I wasn't sure about your plans regards the template. Adding an AbstractRoutingSessionFactory should be the way to go.

This follows a similar approach that I've taken on a lower level. ; o)

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Jan 20, 2017

Mark Paluch commented

Markus Geiß PR submitted. Care to take a look whether it fits your requirements?

@spring-projects-issues
Copy link
Author

spring-projects-issues commented Jan 20, 2017

Markus Geiß commented

Mark Paluch I've added a comment to the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants