Question

Recently I noticed the Cassandra and DataStax are pushing CQL3 more. A new java driver even released, this one does not use Thrift at all. And if your are not going to use "compact storage" you will not able to use Thrift with your application. Thus, I believe that Thrift is fading out from Cassandra.

My question is, for a new application should I go head and use CQL3? However, I still prefer thrift because I want to know what's going on underneath and on the other hand I do not want to be using something that is fading out and becoming a legacy. What do you recommend?

Était-ce utile?

La solution

My company recently went through the same thought process and ended up using CQL3 over thrift.

Although there is a slight lack of transparency with the additional layer of abstraction going on with CQL3, the ease and familiarity of writing SQL style statements makes the code much more readable and intuitive in my opinion. Plus we found the cqlsh interface far more user friendly than cassandra-cli for debugging and general db maintenance (the auto-complete is fab in cqlsh!).

Once you understand the underlying data structure and how CQL3 represents that data, the extra layer of abstraction pales into insignificance, really.

Autres conseils

Datastax are encouraging developers to use cql3 for newer applications. From the Thrift to CQL3 Guide:

…we believe that CQL3 is a simpler and overall better API for Cassandra than the thrift API is. Therefore, new projects/applications are encouraged to use CQL3 (though remember that CQL3 is not final yet, and so this statement will only be fully valid with Cassandra 1.2). But the thrift API is not going anywhere.

Thrift won't be getting newer features (unless they are requested a lot) so it's safe to say that CQL3 is the better choice for new apps (of course there are exceptions… if you need low-level you need thrift). My only pain is that datastax's driver does not yet support SSL but that is in the pipeline and will hopefully be a committed feature soon.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top