Cassandra PHP接口与CQL可用/计划?

I'm trying to plan a web application that should use a noSQL solution - Cassandra seems to be a good solution. I saw there are libraries for PHP to manipulate the database like phpCassa. Also I saw the new version of Cassandra 0.8 is introducing a query language CQL. Are there php interfaces that use the CQL? What is the benefit using the CQL? Is it just a more sql-like way to make queries?

Thank you!

https://github.com/nicktelford/php-cql

I also believe that phpCassa should support it as well.

It's designed to make NoSQL more logical for people coming from SQL as a database engine.

The link Greg posted above is to date the working repo and state of the php-cql driver efforts. While a driver is not yet available it does not stop you from using CQL, the drivers are all going to be a wrapper of the thrift method "execute_cql_query" (Until a new transport is created anyway).

That means you can simply compile thrift for php or get it from an updated project and then pass your cql query to that method. It does mean manual handling of things that a driver will/should take care of.

"Is it just a more sql-like way to make queries?", basically...yes. One of the things that came up on the Cassandra mailing list was getting CQL to be as SQL-Like as possible.

"What is the benefit using the CQL?" Well, mainly that some new Cassandra users find the thrift API tedious to get to grips with, CQL may be much easier to learn since its is so close to the "normal" sql.

This will really be helpful if you wish to use CQL to communicate with Cassandra via PHP

https://gist.github.com/1024060/983a5607390433b77d5c2e64a4ee148f4df46b69

This is a sample of what zcourts mentioned in his previous post

Regards, Tamil

The official CQL drivers supported by the Apache Cassandra project at large are, I believe, all on Apache Extras, at this link:

http://code.google.com/a/apache-extras.org/hosting/search?q=label:cql

The PHP one is at

http://code.google.com/a/apache-extras.org/p/cassandra-pdo/

Connection via Thrift deprecated.

I am using PHP library for Cassandra database via a binary protocol.