Return-Path: Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: (qmail 4704 invoked from network); 28 Oct 2010 21:46:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Oct 2010 21:46:52 -0000 Received: (qmail 87940 invoked by uid 500); 28 Oct 2010 21:46:52 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 87916 invoked by uid 500); 28 Oct 2010 21:46:51 -0000 Mailing-List: contact dev-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list dev@cassandra.apache.org Received: (qmail 87908 invoked by uid 99); 28 Oct 2010 21:46:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Oct 2010 21:46:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of chip@pobox.com designates 208.72.237.25 as permitted sender) Received: from [208.72.237.25] (HELO sasl.smtp.pobox.com) (208.72.237.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Oct 2010 21:46:46 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 4C48416DC for ; Thu, 28 Oct 2010 17:46:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=19UcXkNW67jS n2qpYwcwRiqFyv8=; b=v8zwcTeCHseCD8CM0iYxT1Dy/q48i0VPQF24+gbxSHqI yld7HnhNdDysxoaoe94kGlNXTCm31EeQvuoWD1Uyrls4u2xJF7+toc0PDujX+hmO lKj1t4PhX6P7HKaqPCAgjMxSfthwyMlMPQqpJS8puqfMujIQQbhDfNt+gCZJt/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=gEcbyh Pwt3g4CWQFe0/kJ42QXlY6a2t/U2CqV4O5CiClVT8pFvxhds4TcWf4T+SqsfYL/x 0/X3/7WtfHuZ9q89GCqJVxmQh5oshZoAWQLNSmPmr6lQQyEeKAeN4mU38hrBNyef 1mTOTHctxSGL8Ck293i9oIQWAwcX/KgTb7HgY= Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 45F6716DB for ; Thu, 28 Oct 2010 17:46:24 -0400 (EDT) Received: from [68.27.233.137] (unknown [68.27.233.137]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 71F4E16D8 for ; Thu, 28 Oct 2010 17:46:23 -0400 (EDT) Message-ID: <4CC9EF27.5050908@pobox.com> Date: Thu, 28 Oct 2010 14:46:15 -0700 From: Chip Salzenberg User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: dev@cassandra.apache.org Subject: Re: NoSQL, YesCQL? References: <1288298407.5962.25.camel@erebus.lan> In-Reply-To: <1288298407.5962.25.camel@erebus.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: CF44283C-E2DC-11DF-AD93-030CEE7EF46B-06796264!a-pb-sasl-quonix.pobox.com Short answer: "YES Please, but we will still want a side channel for minimum overhead." Long answer: Query languages only work reliably when you have data binding assistance (insert "Bobby Tables" xkcd here). However, they do have the wonderful property of evolving aggressively without requiring upgrades of the driver plumbing. This is, of course, emphatically *not* true of anything like the current Thrift and Avro interfaces. So that's why I say "Yes." On the other hand, a very simple interface for very simple queries has a lot of value, too; see, for example, http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html So that's why I think we will still want to bypass the full language for minimum latency in some circumstances. On 10/28/2010 1:40 PM, Eric Evans wrote: > I don't know about everyone else, but I've been pretty dissatisfied with > our API situation for some time. > > I used to be of the opinion that The Problem was Thrift and The Answer > was Avro. I do still prefer Avro over Thrift as dependencies go, but > I've come to the conclusion that the real problem has more to do with > the object-oriented RPC pattern that both share in common. > > I used to think this was a necessary burden in order to expose the full > power of our query API in a client agnostic manner, and that it was the > job of third-party libraries to wrap this layer to create stable > idiomatic interfaces. > > And, I used to think a vibrant ecosystem of these idiomatic libraries > would emerge, but it hasn't. Truth is we've seen quite a bit of > proliferation, and very little critical mass. > > This shouldn't be construed as criticism levied against library > maintainers, on the contrary, I think they've done an amazing job all > things considered. But in my opinion, our RPC interfaces push way too > many implementation details client-side, making them brittle and > unstable. This results in unnecessarily complex libraries that are > forced to move in lock-step with Cassandra releases, that are never > backward compatible, and which are consistently broken during our > development cycle. I think we can provide client maintainers and users > with a better experience than this. > > One solution to this is to implement a server-side query language, with > simple language drivers that manage all of the common functionality in a > consistent way (statement preparation, connection pooling, etc). > Library maintainers would then build their idiomatic interfaces on top > of these, (and I imagine, remove a metric crap-ton of code in the > process). > > To this end I've been playing with exactly that. I have enough to do > simple reads and writes, and I have stubbed out drivers for Java and > Python. I'm seeking community feedback to gauge interest, and to > satisfy the much needed desire to bike-shed. :) > > http://github.com/eevans/cassandra/tree/CQL > > You need to be sure you're checking out the "CQL" branch. > > This is implemented in the Avro interface so you'll need to pass the -a > flag when launching the daemon. > > It is far from complete, and is surely quite buggy at this stage, take > it as a preview or demonstration; it's meant to be a starting point for > discussion. > > There is a bit of documentation on the syntax, you can see that here: > http://github.com/eevans/cassandra/blob/CQL/doc/cql/CQL.textile > > There are some system tests in test/system/test_cql.py that should give > you the basic idea, but assuming you have the Avro Python module > installed you should be able to just... > > $ cd drivers/py > $ python >>>> import cql >>>> conn = cql.Connection('Keyspace1', 'localhost', 9160) >>>> conn.execute('UPDATE Standard1 WITH ROW("k", COL("c", "hello!"));') >>>> print conn.execute('SELECT FROM Standard1 WHERE KEY = "k"') > [{u'columns': [{u'timestamp': 1288297508761L, u'name': 'c', u'value': > 'hello!', u'ttl': None}], u'key': 'k'}] > > I've been chewing on all of this for a while so I'm brimming with ideas, > but I'll let the dust settle on this email before going any further. :) > > Thoughts? > > > > P.S. Dear Cliff Moon, I apologize. You were right. >