Reputation: 795
I would like to test several Cassandra drivers( such as thrift and avro)?
What test should be best to define most performance connection scheme?
(Most performance probably means - the fastest writing/reading).
Upvotes: 3
Views: 1074
Reputation: 732
First off, when it comes to drivers, I wouldn't worry about things like "Thrift" or "Avro" since the underlying RPC mechanism is an implementation detail. That said, it's worth noting that Avro RPC was a short-lived experiment and is no longer present in any modern version of Cassandra.
Your choice of interface for versions of Cassandra >= 0.8.0 boils down to either a third-party wrapper to the RPC interface (Thrift), or CQL.
CQL is an SQL-alike query language that makes writing applications much simpler. If you're just starting out, I would definitely recommend looking into it.
For RPC wrappers, a current(ish) list of options can be found on the ClientOptions page of the Cassandra wiki, and CQL drivers are hosted on Google Code/Apache Extras, (tagged Cassandra).
As to which of these two interfaces is fastest, the short answer is: Thrift RPC is faster. However, the difference is quite small (~10%), and limited to non-indexed insertions (all other operations are comparable in performance). Also, with the release of Cassandra 1.1 (due out in March), CQL will support prepared statements which make CQL faster across the board, up to 16% faster.
For some CQL/Thrift performance results relevant to current versions of cassandra see this post. For results applicable to the forthcoming 1.1 release see the results attached to this Cassandra JIRA issue (scroll down).
That being said, you should always conduct your own tests in an environment that is as close to your production setup as possible, using a mixture of operations that most closely resembles what you expect to see from your application.
Upvotes: 8