1

we are going to create a new project on cassandra with php or java.

As we estimated, there will be 20K req/sec to cassandra cluster.

Specially wide column feature is important for this project, but i can not make it clear: should i prefer thrift API or CQL3 library like php-driver etc?

There is an post that says 'Thrift API is not going to be getting new features' in this link. So i am not sure about thrift.

if i decided to use cql3, i have to alter table to be sure column exists before all insert queries like this, which is discussed at here. i think this will be a performance issue for me.

So which of them is best to my case ?

Community
  • 1
  • 1
mst
  • 466
  • 5
  • 17

1 Answers1

0

Thrift is a legacy interface in Cassandra. All new development should use the native CQL interface.

I'm not clear on why you think you'd need to do an alter table frequently. Typically you would define a schema once and rarely if ever use alter table.

Jim Meyer
  • 9,275
  • 1
  • 24
  • 49
  • http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows, at this page datastax shows an example about how to use wide rows. they said if you want to add data with new column name you should add this column to table structure first – mst Aug 16 '15 at 18:33
  • That blog article looks outdated. In CQL you would normally define the columns you want when you create the table and would not rename them. – Jim Meyer Aug 16 '15 at 21:44
  • i think so but when tried to add new row with new column name, cassandra throws an exception "Unknown identifier k1", where "k1" is new column name. – mst Aug 17 '15 at 11:27
  • Cassandra doesn't dynamically add columns that way. You should insert rows using the column names you define in your create table statement. – Jim Meyer Aug 17 '15 at 11:56