You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Christoph Hack <ch...@tux21b.org> on 2012/08/21 23:52:47 UTC

A few questions about Cassandra's native protocol

Hi,

I am currently developing a client for Cassandra's new native protocol
in Go. Everything is working fine so far and I am quite happy with the
new protocol. Good work! Here a just a couple of questions and notes:

1) The native_protocol.spec should probably mention that it is based
on TCP. I greped the whole document for "UDP" and "TCP" and found
nothing.

2) Streaming

I'm currently allocating and reading one frame after another on the
client side. The thing that worries me - If I have understood the
current specification correctly - is that all rows are returned in a
single frame. If the database is quite large, this frames might not
fit into the memory.

I was thinking about using buffered I/O instead, but that's probably
not a good solution either, because then a single thread that iterates
over the rows slowly will block the whole connection. In my opinion it
would be a good idea to split the response to a couple of frames, so
that other threads (with different stream ids) are still able to use
the connection concurrently and push notifications are still
delivered. A "last" flag might indicate the end of the response.

3) Stability

During the development of the client, I happened to send some invalid
requests to the server. In particular, I have send a startup message
with a body length of 0 (and no body afterwards). In those cases,
Cassandra immediately started to use all of my 8GBs of RAM and spawned
up to 1000 threads. The log files were full of "out of memory" and
"couldn't spawn process" messages and it was quite difficult to kill
Cassandra again.

Regards,
Christoph

Re: A few questions about Cassandra's native protocol

Posted by Christoph Hack <ch...@tux21b.org>.
On Wed, Aug 22, 2012 at 11:00 PM, Rob Coli <rc...@palominodb.com> wrote:
> FWIW, while I suppose a client author is technically a "user" of
> Cassandra, you appear to be making suggestions related to the
> development of Cassandra. As I understand the conceptual seperation
> between lists, you probably want to send such mails to cassandra-dev.

Oh, you might be right. Especially since the native protocol isn't even part
of any release yet. Thanks for your answer and sorry for the noise. I've
re-posted this message on the dev list.

-christoph

Re: A few questions about Cassandra's native protocol

Posted by Rob Coli <rc...@palominodb.com>.
On Wed, Aug 22, 2012 at 2:12 AM, Christoph Hack <ch...@tux21b.org> wrote:
> 4. Prepared Statements

FWIW, while I suppose a client author is technically a "user" of
Cassandra, you appear to be making suggestions related to the
development of Cassandra. As I understand the conceptual seperation
between lists, you probably want to send such mails to cassandra-dev.
:D

=Rob

-- 
=Robert Coli
AIM&GTALK - rcoli@palominodb.com
YAHOO - rcoli.palominob
SKYPE - rcoli_palominodb

Re: A few questions about Cassandra's native protocol

Posted by Christoph Hack <ch...@tux21b.org>.
4. Prepared Statements

It should be possible to prepare statements that do not take any arguments. This
simplifies the client development significantly (otherwise everybody
has to write
his own parser to determine the number of arguments) and might also speed up
common queries. The current implementation returns a "java.lang.AssertionError"
error response in that case.

Regards,
Christoph