Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24AD610D2F for ; Tue, 17 Dec 2013 15:22:54 +0000 (UTC) Received: (qmail 61542 invoked by uid 500); 17 Dec 2013 15:22:32 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 61353 invoked by uid 500); 17 Dec 2013 15:22:28 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 61337 invoked by uid 99); 17 Dec 2013 15:22:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 15:22:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.176] (HELO mail-vc0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 15:22:22 +0000 Received: by mail-vc0-f176.google.com with SMTP id lf12so4238795vcb.35 for ; Tue, 17 Dec 2013 07:22:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=DNXnRbXX5r8vN7LzzDh5qLg9FnA8hHwD5WAcrnpuk9U=; b=kgZ7DpzQvnV3ODC8yG8N90uYoLs0zOPZjmCqR7ZyxqqcgOIOPhv7fxCSLBG89zeRur 6Arv5HiMLW5vMqrakmfHPQ8HVF34f/IyBYoaabiG+LCPTYDcLJ7bJyDkX/EjjuhCqpGt VIK6ljJkU3ECIFiFEciZKXwiQ6MytWpsq2lddT+ya5/nOkMK2l3nRsjRg04TydtNnuV0 Plz9Tdb0HakSoQRb964l14In6/kP6m9cOC3qDRawbNCmNXruLplN7ggeq+duTGGAFM4h qwT433LBCiNTqnF/uzHVxqcXdHgthiRyJCAGEKA78vSVVNGdueyGggF80u5ewXi27fhA yDKQ== X-Gm-Message-State: ALoCoQlkTW/eytktGr/dtAAYPipOE1uol5M5MprWEp56KAFZ7h1WkfKPwkDcggU0cn9DeUM+DAtH MIME-Version: 1.0 X-Received: by 10.220.200.65 with SMTP id ev1mr11023841vcb.13.1387293720988; Tue, 17 Dec 2013 07:22:00 -0800 (PST) Received: by 10.58.133.68 with HTTP; Tue, 17 Dec 2013 07:22:00 -0800 (PST) In-Reply-To: References: Date: Tue, 17 Dec 2013 15:22:00 +0000 Message-ID: Subject: Re: Why was Thrift defined obsolete? From: Stuart Broad To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=089e0122a45c70637304edbc7de5 X-Virus-Checked: Checked by ClamAV on apache.org --089e0122a45c70637304edbc7de5 Content-Type: text/plain; charset=ISO-8859-1 Peter - I missed your comment regarding optimised for CQL (I was distracted by the statement of thift is binary protocol - As I got 'corrected' for a similar statement to that in one of my previous posts). So comparing thrift to the 'newer' ninary protocols it sounds like the only real benefit is optimised for CQL (which has limitations as you posted in your first email). On Tue, Dec 17, 2013 at 3:15 PM, Stuart Broad wrote: > Based on an question I posted a while back I got the following answer (for > something unrelated to this): > > When we speak of "binary protocol", we talk about the protocol introduced >> in Cassandra 1.2 that is an alternative to thrift for CQL3. It's a custom, >> binary, protocol, that has not link to thrift whatsoever. >> That protocol is defined by the document here: >> >> https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=doc/native_protocol_v1.spec;hb=HEAD > > > So I guess my question still stands (although from this previous answer it > looks like it is only for CQL). > > > > > On Tue, Dec 17, 2013 at 2:15 PM, Peter Lin wrote: > >> >> thrift is binary protocol, it just happens to support multiple platforms. >> DataStax Java and C# drivers are also binary, but they are optimized for >> CQL. For example, the DataStax C# drivers use google protocol buffers, >> which is a different binary protocol. >> >> the documentation on this stuff hasn't been very good, so people keep >> asking the same questions again and again. >> >> I encourage people to take time and learn about thrift. In the long run, >> it will make you a better cassandra user/developer. >> >> >> On Tue, Dec 17, 2013 at 9:08 AM, Stuart Broad wrote: >> >>> Hopefully this is a valid clarification, rather than a hijack of your >>> thread! >>> >>> How does the binary protocol fit into this? I have not used it but was >>> told you can implement CQL calls via thrift or via the binary protocol. Is >>> the binary protocol superior to thrift? >>> >>> If you use the binary protocol do you have to use CQL? >>> >>> Cheers, >>> >>> Stuart >>> On 17 Dec 2013 14:01, "Peter Lin" wrote: >>> >>>> >>>> That's just mis-information by people that don't understand thrift. >>>> >>>> The thrift drivers are still much more mature than the java drivers >>>> right now. DataStax has stated on multiple occasions thrift isn't going any >>>> where. CQL is fine if people only want to use SQL-like language. Search the >>>> cassandra mailing list and you'll see this topic comes up regularly. >>>> >>>> My bias perspective is "use thrift" to use 100% of the features that >>>> Cassandra provides, or use pure CQL and limit yourself to 90%. >>>> >>>> The main downside of using pure CQL (ie no thrift) is that once you've >>>> defined a default type for column values, you can't stick arbitrary data >>>> into dynamic columns. Cassandra will tell you when you try to insert a Date >>>> when the default value type is int. Basically, it will throw an exception. >>>> In contrast, if you use thrift, you can insert what ever type you want and >>>> have total control over what goes into dynamic columns. >>>> >>>> For me, the biggest value of dynamic columns + data types is that I can >>>> insert what ever I want into dynamic columns and still have the safety net >>>> of knowing the type. A lot of people are afraid of thrift and don't want to >>>> dive deep, which is fine. I prefer to understand things at a deep level, >>>> and use a tool to the fullest extent. >>>> >>>> peter >>>> >>>> >>>> On Tue, Dec 17, 2013 at 8:40 AM, Daneel Yaitskov < >>>> rtfm.rtfm.rtfm@gmail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> I've read some articles about Cassandra and I noticed an opinion that >>>>> Thrift protocol >>>>> has some flaws. Thrift should go away in the nearest futures. >>>>> >>>>> But I cannot find any reference answering the question why is it so >>>>> bad? >>>>> >>>>> >>>>> -- >>>>> Daneel S. Yaitskov >>>>> >>>> >>>> >> > --089e0122a45c70637304edbc7de5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Peter - I missed your comment regarding optimised for CQL = (I was distracted by the statement of thift is binary protocol - As I got &= #39;corrected' for a similar statement to that in one of my previous po= sts). =A0So comparing thrift to the 'newer' ninary protocols it sou= nds like the only real benefit is optimised for CQL (which has limitations = as you posted in your first email).


On Tue, Dec 1= 7, 2013 at 3:15 PM, Stuart Broad <stuart@moogsoft.com> wro= te:
Based on an question I post= ed a while back I got the following answer (for something unrelated to this= ):

When we speak of "binary protocol", we talk about the protocol in= troduced
in Cassandra 1.2 that is an alternative to thrift for CQL3. It&= #39;s a custom,
binary, protocol, that has not link to thrift whatsoever= .
That protocol is defined by the document here:
https://git-wip-us.apache.org/= repos/asf?p=3Dcassandra.git;a=3Dblob_plain;f=3Ddoc/native_protocol_v1.spec;= hb=3DHEAD

So I guess my question still stands (although from this= previous answer it looks like it is only for CQL).

=A0


On Tue, Dec 17, 2013 at 2:15 PM, Peter Lin <woo= lfel@gmail.com> wrote:

thrift is binary protocol, it jus= t happens to support multiple platforms. DataStax Java and C# drivers are a= lso binary, but they are optimized for CQL. For example, the DataStax C# dr= ivers use google protocol buffers, which is a different binary protocol.
the documentation on this stuff hasn't been very good, so peo= ple keep asking the same questions again and again.

I encourag= e people to take time and learn about thrift. In the long run, it will make= you a better cassandra user/developer.


On Tue, Dec 17, 2013 at 9:08 AM, Stuart Broad <stuart@moogsoft.com> wrote:

Hopefully this is a valid cla= rification, rather than a hijack of your thread!

How does the binary protocol fit into this?=A0 I have not us= ed it but was told you can implement CQL calls via thrift or via the binary= protocol.=A0 Is the binary protocol superior to thrift?

If you use the binary protocol do you have to use CQL?

Cheers,

Stuart

On 17 Dec 2013 14:01, "Peter Lin" <= woolfel@gmail.com> wrote:

That's just mis-inf= ormation by people that don't understand thrift.

The thrif= t drivers are still much more mature than the java drivers right now. DataS= tax has stated on multiple occasions thrift isn't going any where. CQL = is fine if people only want to use SQL-like language. Search the cassandra = mailing list and you'll see this topic comes up regularly.

My bias perspective is "use thrift" to use 100% of the = features that Cassandra provides, or use pure CQL and limit yourself to 90%= .

The main downside of using pure CQL (ie no thrift) is that o= nce you've defined a default type for column values, you can't stic= k arbitrary data into dynamic columns. Cassandra will tell you when you try= to insert a Date when the default value type is int. Basically, it will th= row an exception. In contrast, if you use thrift, you can insert what ever = type you want and have total control over what goes into dynamic columns.
For me, the biggest value of dynamic columns + data types is that= I can insert what ever I want into dynamic columns and still have the safe= ty net of knowing the type. A lot of people are afraid of thrift and don= 9;t want to dive deep, which is fine. I prefer to understand things at a de= ep level, and use a tool to the fullest extent.

peter


On Tue, Dec 17, 2013 at 8:40 AM, Daneel Yaitskov &l= t;rtfm.rtfm.r= tfm@gmail.com> wrote:
Hi,

= I've read some articles about Cassandra and I noticed an opinion that T= hrift protocol
has some flaws. Thrift should go away in the nearest futures.
But I cannot find any reference answering the question why is it so bad?


--
Daneel S. Yaitskov




--089e0122a45c70637304edbc7de5--