You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ran Tavory <ra...@gmail.com> on 2009/12/31 15:46:58 UTC

async calls in cassandra

Does cassandra/thrift support asynchronous IO calls?
Is this planned for an upcoming release?

Re: async calls in cassandra

Posted by Mark Robson <ma...@gmail.com>.
2009/12/31 Ran Tavory <ra...@gmail.com>

> Does cassandra/thrift support asynchronous IO calls?
>

asynchronous calls are really a client-side thing. I believe that there is
currently no async version of Thrift, but if one did arrive, it could be
used with Cassandra.

The fact that Cassandra uses one-thread-per-connection isn't relevant to how
synchronous it is.

Of course you could use something like Gearman to schedule Cassandra tasks -
you'd need to implement a worker process though.

Mark

>
>

Re: async calls in cassandra

Posted by Brandon Williams <dr...@gmail.com>.
On Thu, Dec 31, 2009 at 8:46 AM, Ran Tavory <ra...@gmail.com> wrote:

> Does cassandra/thrift support asynchronous IO calls?
> Is this planned for an upcoming release?
>

Cassandra does not, since it uses a thread per connection model.  I spent
some time trying to enable it (because I use twisted python) by switching to
the thrift THsHaServer, but this did not work and dropped performance
significantly.  That said, I don't find using a connection pool to be much
trouble, and actually becomes an advantage when you're interacting with
multiple hosts.

-Brandon