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 954CEDD59 for ; Sat, 18 May 2013 09:58:33 +0000 (UTC) Received: (qmail 70310 invoked by uid 500); 18 May 2013 09:58:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 69672 invoked by uid 500); 18 May 2013 09:58:25 -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 69639 invoked by uid 99); 18 May 2013 09:58:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 May 2013 09:58:23 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tivv00@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 May 2013 09:58:17 +0000 Received: by mail-vc0-f171.google.com with SMTP id m17so2771320vca.16 for ; Sat, 18 May 2013 02:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=AhJoYbLv+gX4g8Qsp4r7cC2bVT5V8feza9ZEy6tDsgQ=; b=qAH18RWud8pdxGr/TNXN2y6PVcHx5eZMQr6Na+cl4UE5ZmIjHfW97Y7ewfCH2RWeKc 95QyIOnO3DoYrECz8w1NKFTixcbke7g78z2MFfydHYGfPG60Py5jvFDGTB1bt1wFaB18 jahimcJR9HvOVBpRcEymODeG8OOy1tlS1tS0TAU+c8UkB2ncXjD8HFpqHafnZop3JvU8 7RPLxtL0eH+KZzEYehlVa2hY8+Zcm1jbfuTwEMwj/VjiNMJf9mZVatQBSAJOR6PZwWEa 1yS0DbSdH3cVD+bX/PcFxSBx+ki6dP5/TkzgLKqB5yRkKQ1xguLuQxZ0xGdqZTlOUAcP UMWw== MIME-Version: 1.0 X-Received: by 10.220.186.137 with SMTP id cs9mr31209294vcb.6.1368871076832; Sat, 18 May 2013 02:57:56 -0700 (PDT) Received: by 10.220.74.1 with HTTP; Sat, 18 May 2013 02:57:56 -0700 (PDT) Received: by 10.220.74.1 with HTTP; Sat, 18 May 2013 02:57:56 -0700 (PDT) In-Reply-To: <0FBD206A-9088-4C49-8C6F-7033FFD55E33@thelastpickle.com> References: <0FBD206A-9088-4C49-8C6F-7033FFD55E33@thelastpickle.com> Date: Sat, 18 May 2013 12:57:56 +0300 Message-ID: Subject: Re: Multiple cursors From: Vitalii Tymchyshyn To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=047d7b5d3bd4472b6604dcfb22ca X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d3bd4472b6604dcfb22ca Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: quoted-printable We were successfully using a sync thrift client. With it we could send multiple requests through the single connection and wait for answers. 17 =D4=D2=C1=D7. 2013 02:51, "aaron morton" =CE= =C1=D0=C9=D3. > We don't have cursors in the RDBMS sense of things. > > If you are using thrift the recommendation is to use connection pooling > and re-use connections for different requests. Note that you can not > multiplex queries over the same thrift connection, you must wait for the > response before issuing another request. The native binary transport allo= ws > multiplexing though. > > In general you should use one of the pre build client libraries as they > will take care of connection pooling etc for you > https://wiki.apache.org/cassandra/ClientOptions > > Cheers > > ----------------- > Aaron Morton > Freelance Cassandra Consultant > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 16/05/2013, at 9:03 AM, Sam Mandes wrote: > > Hello All, > > Is using multiple cursors simultaneously on the same C* connection a good > practice? > > I've an internal api for a project running thrift, I then need to query > something from C*. I do not like to create a new connection for every api > request. Thus, when my service initially starts I open a connection to C* > and with every request I create a new cursor. > > Thanks a lot > > > --047d7b5d3bd4472b6604dcfb22ca Content-Type: text/html; charset=KOI8-U Content-Transfer-Encoding: quoted-printable

We were successfully using a sync thrift client. With it we = could send multiple requests through the single connection and wait for ans= wers.

17 =D4=D2=C1=D7. 2013 02:51, "aaron morton&= quot; <aaron@thelastpickle.co= m> =CE=C1=D0=C9=D3.
We don't have cursors in the RDBMS = sense of things.

If you are using thrift the recommendat= ion is to use connection pooling and re-use connections for different reque= sts. Note that you can not multiplex queries over the same thrift connectio= n, you must wait for the response before issuing another request. The nativ= e binary transport allows multiplexing though.=9A

In general you should use one of the pre build client l= ibraries as they will take care of connection pooling etc for you=9Ahttp= s://wiki.apache.org/cassandra/ClientOptions

Cheers
=9A
-----------------
Aaron Morton
Freelance Cassandra= Consultant
New Zealand


On 16/05/2013, at 9:03 AM, Sam Mandes <eng.salamander@gmail.com>= wrote:

Hello All,
=
Is using multiple cursors=9Asimultaneously=9Aon the same C* conn= ection a good practice?

I've an internal api f= or a project running thrift, I then need to query something from C*. I do n= ot like to create a new connection for every api request. Thus, when my ser= vice initially starts I open a connection to C* and with every request I cr= eate a new cursor.

Thanks a lot

--047d7b5d3bd4472b6604dcfb22ca--