Use phpcassa for cassandra with yiiframework

845 Views Asked by At

Does anyone know how to use phpcassa for cassandra with Yiiframework?

I've tried Cassandra PDO. It works very well, but I happened to like the way phpcassa works. Especially the support for most cassandra features.

I don't know but I found phpcassa much easier to use.

Any suggestions?

Regards

2

There are 2 best solutions below

2
On

I'm not familiar with Yii in particular, but after glancing at it, I suspect you won't be able to use most of the Yii ORM-like features directly, whether it's though phpcassa or the PDO driver. Certainly it could work for some cases, but in general, your data in Cassandra is not modeled around objects, it's modeled around queries. Your goal is to lay out your data in such a way that you can answer queries that you have planned for very efficiently. Because Yii is object-oriented, there's a fundamental mismatch in how it expects you to interact with the database.

0
On

I've written an Yii extension today for cassandra-cql3, hope this might help others searching for an yii wrapper for cassandra CQL3

https://github.com/masumsoft/yii-cassandra-cql3