Just because you can batch queries or have the server process them out of order doesn't make it fully "parellel". You're still using a single TCP connection which is by definition a serial data stream. Basically, if you send a bunch of queries which each return a large amount of data you've effectively limited your query throughput to a single TCP connection. Using Thrift, each query result is returned in it's own TCP stream in *parallel*.
Not saying the new API isn't great, doesn't have it's place or may have better performance in certain situations, but generally speaking I would refrain from making general claims without actual benchmarks to back them up. I do completely agree that Async interfaces have their place and have certain advantages over multi-threading models, but it's just another tool to be used when appropriate. Just my .02. :) On Mon, May 6, 2013 at 5:08 AM, Hiller, Dean <dean.hil...@nrel.gov> wrote: > I was under the impression that it is multiple requests using a single > connectin PARALLEL not serial as they have request ids and the responses do > as well so you can send a request while a previous request has no response > just yet. > > I think you do get a big speed advantage from the asynchronous nature as > you do not need to hold up so many threads in your webserver while you have > outstanding requests being processed. The thrift async was not exactly > async like I am suspecting the new java driver is, but have not verified(I > hope it is) > > Dean > > From: Aaron Turner <synfina...@gmail.com<mailto:synfina...@gmail.com>> > Reply-To: "user@cassandra.apache.org<mailto:user@cassandra.apache.org>" < > user@cassandra.apache.org<mailto:user@cassandra.apache.org>> > Date: Sunday, May 5, 2013 5:27 PM > To: cassandra users <user@cassandra.apache.org<mailto: > user@cassandra.apache.org>> > Subject: Re: hector or astyanax > > > > On Sun, May 5, 2013 at 1:09 PM, Derek Williams <de...@fyrie.net<mailto: > de...@fyrie.net>> wrote: > The binary protocol is able to multiplex multiple requests using a single > connection, which can lead to much better performance (similar to HTTP vs > SPDY). This is without comparing the performance of thrift vs binary > protocol, which I assume the binary protocol would be faster since it is > specialized for cassandra requests. > > > Curious why you think multiplexing multiple requests over a single > connection (serial) is faster then multiple requests over multiple > connections (parallel)? > > And isn't Thrift a binary protocol? > > > -- > Aaron Turner > http://synfin.net/ Twitter: @synfinatic > http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & > Windows > Those who would give up essential Liberty, to purchase a little temporary > Safety, deserve neither Liberty nor Safety. > -- Benjamin Franklin > "carpe diem quam minimum credula postero" > -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero"