Re: CQL or Thrift ?
Eric do you have any numbers for this? -Jake On Tue, Aug 6, 2013 at 10:34 AM, Eric Evans eev...@sym-link.com wrote: [ Nulik Nol ] I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Performance is likely to be the least important consideration when comparing the two, but luckily we don't have to have that argument; CQL is actually faster. -- Eric Evans eev...@sym-link.com
CQL or Thrift ?
Hi, I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Thrift API supports CQL , but not the other way around. If commands go through CQL, there will be some Java code executed and I don't know which would be faster, sending the raw mutates through thrift by C application or executing a prepared CQL3 query by Java? I am interested more in performance, rather than in easiness of use. Will appreciate very much your comments. Nulik
Re: CQL or Thrift ?
You want to use CQL. Push notifications of cluster changes alone are worth it. On Mon, Aug 5, 2013 at 2:08 PM, Nulik Nol nulik...@gmail.com wrote: Hi, I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Thrift API supports CQL , but not the other way around. If commands go through CQL, there will be some Java code executed and I don't know which would be faster, sending the raw mutates through thrift by C application or executing a prepared CQL3 query by Java? I am interested more in performance, rather than in easiness of use. Will appreciate very much your comments. Nulik -- Jonathan Ellis Project Chair, Apache Cassandra co-founder, http://www.datastax.com @spyced
RE: CQL or Thrift ?
I'd recommend Thrift. Date: Mon, 5 Aug 2013 14:08:52 -0500 Subject: CQL or Thrift ? From: nulik...@gmail.com To: dev@cassandra.apache.org Hi, I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Thrift API supports CQL , but not the other way around. If commands go through CQL, there will be some Java code executed and I don't know which would be faster, sending the raw mutates through thrift by C application or executing a prepared CQL3 query by Java? I am interested more in performance, rather than in easiness of use. Will appreciate very much your comments. Nulik
Re: CQL or Thrift ?
Why? Please give me 3 reasons why this is good advice to the OP. The frame based binary protocol will be 100% easier to implement in C than the never-been-out-of-alpha libc Thrift implementation. I¹ve worked with that code for a while, it¹s *not* pretty. I can¹t think of one reason, other than ³I already have legacy code written around it² Thrift is better than the Native Protocol. So please backup your claim before spreading false information to the community. On 8/5/13, 10:46 PM, Aswani Kumar Vonteddu as.wins.c...@hotmail.com wrote: I'd recommend Thrift. Date: Mon, 5 Aug 2013 14:08:52 -0500 Subject: CQL or Thrift ? From: nulik...@gmail.com To: dev@cassandra.apache.org Hi, I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Thrift API supports CQL , but not the other way around. If commands go through CQL, there will be some Java code executed and I don't know which would be faster, sending the raw mutates through thrift by C application or executing a prepared CQL3 query by Java? I am interested more in performance, rather than in easiness of use. Will appreciate very much your comments. Nulik
Re: CQL or Thrift ?
Hi Aswani Kumar, Please let me know, any specific reasons that you're recommending thrift? Thanks Murali. On Tue, Aug 6, 2013 at 11:16 AM, Aswani Kumar Vonteddu as.wins.c...@hotmail.com wrote: I'd recommend Thrift. Date: Mon, 5 Aug 2013 14:08:52 -0500 Subject: CQL or Thrift ? From: nulik...@gmail.com To: dev@cassandra.apache.org Hi, I need a client in C (not C++) to work with Cassandra, so since there is no one yet I would do my own. So far I have checked, I can do it through Thrift RPC port, or through CQL port. As I understand, CQL doesn't support direct mutate or get_range_slices calls like Thrift does , so being Thrift API more low level, it should be faster for specific queries my application would execute. The question is, what do you recommend me to use, Thrift or CQL3 native protocol? Thrift API supports CQL , but not the other way around. If commands go through CQL, there will be some Java code executed and I don't know which would be faster, sending the raw mutates through thrift by C application or executing a prepared CQL3 query by Java? I am interested more in performance, rather than in easiness of use. Will appreciate very much your comments. Nulik -- Thanks, Murali 99025-5
Re: CQL vs Thrift
If you understand how cql collections are written you can decode them and work with them from thrift. It's quite a chore and i would not suggest trying yo do it however. (I suspect tyler tried it and jonathan broke his hand jk) There is a perl cassandra driver that did something like this. On Wednesday, July 17, 2013, Jonathan Ellis jbel...@gmail.com wrote: On Wed, Jul 17, 2013 at 4:03 PM, Tyler Hobbs ty...@datastax.com wrote: I'll leave it to somebody else to comment on adding collections, etc to Thrift. Doesn't make sense, since Thrift is all about the raw data cells, and collections are an abstraction layer on top of that. -- Jonathan Ellis Project Chair, Apache Cassandra co-founder, http://www.datastax.com @spyced
Re: CQL vs Thrift
+1. Thrift should be all about raw data cells. -Vivek From: Jonathan Ellis jbel...@gmail.com To: dev@cassandra.apache.org Sent: Thursday, July 18, 2013 2:48 AM Subject: Re: CQL vs Thrift On Wed, Jul 17, 2013 at 4:03 PM, Tyler Hobbs ty...@datastax.com wrote: I'll leave it to somebody else to comment on adding collections, etc to Thrift. Doesn't make sense, since Thrift is all about the raw data cells, and collections are an abstraction layer on top of that. -- Jonathan Ellis Project Chair, Apache Cassandra co-founder, http://www.datastax.com @spyced
CQL vs Thrift
Hi all, This is may be is not the right place to ask, but I though developers can answer to my questions better than users. It looks clear that Cassandra dev team concentrates on CQL rather than Thrift interface. I'm considering using Cassandra as a storage for my current project which will replace MySQL. I still have problem choosing between Thrift (Pycassa) vs CQL (cqlengine, python-driver). Personally after using pycassa in test project I fall in love with it. I'd prefer to use pycassa rather than python-driver, cqlengine or write raw queries. 1) What's going on with Thrift interface and pycassa? I read somewhere that it will be for backward compatibility, but does it mean that new features will not be added to the Thrift interface hence will not be available with pycassa? For example collections http://www.datastax.com/dev/blog/cql3_collections. 2) Currently column families created using CQL is not visible through the Thrift interface and vice versa. If I start with pycassa and in future I decide to use CQL (due to lack of new features) will it be possible to use these CFs? Or convert them so they become visible and accessible using CQL? 3) Also I've done some basic tests (pycassa vs. cqlengine, no prepared statements) and seems like pycassa performs almost 2 times better which makes it more preferable. It was simple inserts of couple thousands rows. Do I have to put up with all this and start using CQL? Thanks, -- Vladimir Prudnikov
Re: CQL vs Thrift
Hi, I'm the maintainer of pycassa and the DataStax python-driver. I just broke some fingers, so I will be brief. Regarding performance, the python driver is brand new and still has some issues to be worked out around performance (C extension, locking and signaling). How you use it has a big impact, though; see the benchmarks/ dir. Some are on par or better than pycassa for single-threaded rates with fewer connections. You can use all Thrift CFs through CQL3. Some cql3 support may be backported to pycassa to ease the transition, but I have done no work there so far. I'll leave it to somebody else to comment on adding collections, etc to Thrift. On Wed, Jul 17, 2013 at 3:18 PM, Vladimir Prudnikov v.prudni...@gmail.comwrote: Hi all, This is may be is not the right place to ask, but I though developers can answer to my questions better than users. It looks clear that Cassandra dev team concentrates on CQL rather than Thrift interface. I'm considering using Cassandra as a storage for my current project which will replace MySQL. I still have problem choosing between Thrift (Pycassa) vs CQL (cqlengine, python-driver). Personally after using pycassa in test project I fall in love with it. I'd prefer to use pycassa rather than python-driver, cqlengine or write raw queries. 1) What's going on with Thrift interface and pycassa? I read somewhere that it will be for backward compatibility, but does it mean that new features will not be added to the Thrift interface hence will not be available with pycassa? For example collections http://www.datastax.com/dev/blog/cql3_collections. 2) Currently column families created using CQL is not visible through the Thrift interface and vice versa. If I start with pycassa and in future I decide to use CQL (due to lack of new features) will it be possible to use these CFs? Or convert them so they become visible and accessible using CQL? 3) Also I've done some basic tests (pycassa vs. cqlengine, no prepared statements) and seems like pycassa performs almost 2 times better which makes it more preferable. It was simple inserts of couple thousands rows. Do I have to put up with all this and start using CQL? Thanks, -- Vladimir Prudnikov -- Tyler Hobbs DataStax http://datastax.com/
Re: CQL vs Thrift
On Wed, Jul 17, 2013 at 3:18 PM, Vladimir Prudnikov v.prudni...@gmail.comwrote: I read somewhere that it will be for backward compatibility, but does it mean that new features will not be added to the Thrift interface Yes, the thrift interface will remain stable and not be changing. -Brandon