On Wed, 2010-11-03 at 11:55 +1100, Dan Washusen wrote:
> Thanks for the response Arya.  Maybe I should clarify my questions....
> 
>    1. Does the call to Client.set_keyspace(String) really do a
>    server/network round trip every time it's invoked?

Yes.

>    2. If yes to question 1, does the Client.set_keyspace(String) call
> really need to do a server/network round trip every time it's called
> (e.g. couldn't the validation be deferred until the client attempts to
> do something against the keyspace)?

It's an RPC to associate the keyspace name with the connection, so there
is no avoiding it.

> After a little more digging it appears that the client's keyspace
> state is actaully saved on the cassandra node that it's connected to
> and not on the client itself.  That appears to explain why it's
> necessary to do a network call each time the
> Client.set_keyspace(String) method is called... 

Right.  The keyspace is analogous to the "database" in RDBMS-land, and
is more a less there for multi-tenancy, (i.e. it's the application
namespace).  As a result, it was decided that the keyspace argument to
RPC methods was redundant and confusing, and so they were removed in
favor of a set_keyspace() in 0.7.

-- 
Eric Evans
eev...@rackspace.com

Reply via email to