- Notifications
You must be signed in to change notification settings - Fork 310
Buildable project with the CassandraRepository interface #1
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
Conversation
What's the intent of this pull request? It doesn't seem to contain a real repository abstraction implementation, so I am a bit puzzled actually :) |
I wanted to use it to drive a conversation around the status of the Is the project still alive? Does any code exist? All I see in the repository is a README. I'd like to build out this layer if no one is working on it. -brian Brian O'Neill On 6/28/12 12:33 PM, "Oliver Gierke"
|
That's cool to hear! No there's currently no SpringSource developers working on the Cassandra module and we also currently don't have plans to change this in the near future. However there seems to be a community starting to rise to build implementations of the Spring Data repository abstraction (e.g. Solr, RDF). So we definitely would be happy to see community involvement here as well. I'll drop you an email with my Skype account so we can have a 1:1 discussion in case you have questions going forward. |
I am interested in helping out on this project. |
Great to hear. We'll have to dust it off a bit, but if you want to fork from boneill42/spring-data-cassandra that may give you a place to start. |
Brian, Is there a list of requirements to work from? Are requirements tracked in Jira or here? Can you give me an overall status of where you left off? Was the intention to mimic similar functionality like spring-data-mongo (or other NoSQL Data Sources)? Finally, when we get it ready, what is the process to get the code back into this SpringSource repository and available for general release? I can see where you requested to merge your commits into this branch. Any reason why that hasn't happened yet? Thanks, |
Dave, the reason we haven't proceeded here were essentially twofold:
I think it's best to start in a custom repository and have a look at the feature matrix exposed here. As soon as one can check roughly 80% of the boxes we can think of a migration. Does that make sense to you? |
Oliver, Thanks for the response. I agree on not using JPA. I think either a Astayanax or Hector client integration makes the most sense. Do you have an opinion either way? I will use the spring-data-mongodb project as a reference since it appears to be well implemented. Can you give me the ability to add Jiras to the DATACOL project so I can manage sprints and track progress there? I have a couple other guys I am going to try and recruit to help me out once I get everything ready to go. Thanks, |
I actually paused work because I intended to use the CQL java driver. Since the thrift support in C* is going away (eventually), I thought it might be better to bet on CQL. The CQL java driver just went 1.0. So, we may want to start there, unless we can come up with a compelling reason not to use it. |
Seems like Astayanax also supports CQL from the readme If using Cassandra 1.2 and CQL then you will need to tell Astyanax about it. For now, Astyanax has defaults for Cassandra 1.1 AstyanaxContext context = new AstyanaxContext.Builder() Wouldn't we end up redoing a lot of what is in Astyanax (e.g. pagination) if going with just the CQL driver? |
Astyanax supports CQL, but AFAIK it still sends that over the thrift interface. The problem with that is that it doesn't support some of the newer features very well. (e.g. collections) I'm cool going with Astyanax. (We use that internally here) But I agree, we may need to re-write some of the functionality in Astyanax. I'm cool either way, just want to make the selection with eyes wide open. |
Just an FYI -- same topic came up on the Hector thread yesterday: |
From what you are saying I would prefer not to rely on the thrift interface if that is going to be deprecated. Why the shift away from thrift? |
Thrift is a dependency of the DataStax CQL Java Driver. So a change isnt really a move away from thrift, right? I am continuing on with the development of the module using Astyanax. Changing out the underlying driver is not that much work in the grand scheme of things. Also, supporting both Thrift and CQL for a period of time might be the best option and increase adoption of the spring-data-cassandra module. http://www.datastax.com/doc-source/developer/java-driver/#reference/settingUpJavaProgEnv_r.html Fourth one down. Unless I am missing something, we have to get "V1.0" out there with the expectation that it will evolve over time. :) |
Like I said, I'm not that passionate either way. If we can get things out faster using Astyanax, let's do that. Just as background information... the CQL java driver includes the thrift dependency, but it doesn't use the thrift protocol. In Cassandra 1.2, the database actually listens on two separate ports: the legacy thrift port (9160), and the new "native" protocol (port 9042). The CQL java-driver connects over the native protocol, while all the other java apis still use the legacy port/protocol. Here was the rational for CQL: Here is what you see in the Cassandra config (in cassandra.yaml): |
Thanks for the info. Is it worth providing a driver abstraction as we did in redis? It is a fair bit of work and don't want to go down a rabbit-hole unnecessarily. I'm surprised the decision might effect how well spring-data-cassandra would be adopted, is that because many people are hesitant to change to use a new protocol or only want to run the server using the native transport as that is what is in production already....? |
The adoption comment was not well communicated on my part. I was trying to say that Spring Data is not an option today if you need to talk to Cassandra. We need to get the module out there in order for it to be adopted. :) I am willing to put in the time to make that happen. I am not the expert on Spring Data like you guys are, but I am quite familiar with Cassandra. I am open to going with your recommendation. Thanks for having the discussion. |
Astayanax looks overall like a nice starting point - I am a bit concerned about one thing - the mapping that they provide uses JPA annotations. https://github.com/Netflix/astyanax/wiki/Entity-persister That is something we have consciously decided against. Oliver, what are your thoughts here? We can also write our own entity-persister with our own less JPA centric annotations that uses the rest of Astayanax. And thanks for taking up interest in this and spending your time on it! |
I don't think the choice of cassandra java API will matter in people's decision to use spring-data-cassandra. RE: JPA in Astyanax BTW -- great to see this kicking off. |
I will open a new Issue to discuss how to map Cassandra Rows to Beans. Thanks for the helpful info. From: boneill42 [mailto:notifications@github.com] I don't think the choice of cassandra java API will matter in people's decision to use spring-data-cassandra. RE: JPA in Astyanax (i.e. you don't need to use annotated objects at all) BTW -- great to see this kicking off. — |
Ok, so let's use Astyanax as the starting point but not use their JPA based model for mapping. Our mapper might be very similar, using different annotations, or have other features. |
Are there any current spring-data-? projects that use an entity-persiter / mapper similar to what you guys want to replace the Astyanax one with? I am looking for a good starting point that is similar to other spring data modules. Thanks. |
Mark, I have found the Astyanax entity mapper and will modify it to use non JPA annotations, then incorporate it into this project. That should be the most efficient way to get this going. It doesn’t look like a very large effort either. -Dave |
This request is no longer valid with the new source tree. |
Buildable project with the CassandraRepository interface