Anyone out there using Cassandra (http://cassandra.apache.org/) with PHP? What PHP module would you guys recommend to communicate between PHP and Cassandra?
7 Answers
Although this is an old question, thobb's version of PHPCassa has become a nice standard for PHP development with Apache Cassandra. The link referenced in the accepted question is to the hoan version of PHPCassa, which is not as current (last update was 2 years ago) or robust as the forked version that thobbs maintains: https://github.com/thobbs/phpcassa
- Compatible with Cassandra 0.7, 0.8 and 1.x
- Optional C extension for improved performance
I'm thoroughly happy with it, and have been for well over a year now. Continual development and you can see contributions being pushed upstream now from other developers.
You'll note that Pandra hasn't had any updates for quite some time too. +1yr
-
`static public function uuid5($node, $namespace=null) {` - sad to see if this code is a "nice standard". – OZ_ Jan 07 '13 at 22:25
http://github.com/mjpearson/Pandra/tree/master
http://github.com/thobbs/phpcassa.git [port of pycassa to PHP]
http://code.google.com/p/simpletools-php/wiki/SimpleCassie (ORM like wrapper)
For more high level API clients see ClientExamples on the Cassandra wiki.

- 28,107
- 9
- 89
- 113

- 20,702
- 12
- 62
- 79
-
Another option - you can use this PHP file which is a pure PHP implementation of the Cassandra protocol. I talked to Uri (the author of the project) and he said he will port to the newer protocol version of Cassandra. https://github.com/uri2x/php-cassandra – elcuco Feb 28 '16 at 15:57
You can use Thrift.
Thrift was an infrastructure built by Facebook. Using a definitions file (ending with ".thrify"), it defines all services available on a given services and methods available from something. You can then generate headers for any supported language (PHP, Python, etc..), start the thrift server, and use the headers to transparently communicate with the Thrift server, which then communicates natively with whatever it is that you want to interact with. It works great and Cassandra supports it: https://wiki.fourkitchens.com/display/PF/Using+Cassandra+with+PHP .
If you want to know the calls that Cassandra has defined, just look in the Thrift definition.

- 9,673
- 13
- 65
- 105
I'm just guessing, but it seems that uses something called thrift, im not very much into it, but i'll look for the page i had read lately about that, aaand there it is => http://wiki.apache.org/cassandra/ClientExamples03

- 9,041
- 4
- 31
- 41
You can also check out PHP Binary CQL, which is a CQL client that uses the new binary protocol.
Blog post:
http://blog.robert.mcfrazier.com/php-binary-cql/
Github: https://github.com/rmcfrazier/phpbinarycql
Disclosure: I'm the author of this library.

- 444
- 4
- 8
-
this was interesting, because it is lightweight. Is this project abandonned? – Nadir Nov 20 '16 at 01:04
I am using Thrift API for accessing cassandra .. Mine is a php project.

- 15,374
- 13
- 103
- 121

- 353
- 1
- 3
- 11