Cphalcon: [NFR] Support for Cassandra

Created on 10 Mar 2016  ·  9Comments  ·  Source: phalcon/cphalcon

I'm wondering if there are any plans to support Cassandra. Would be awesome if a high performance framework like Phalcon would support such a scalable and high available DB.

Most helpful comment

I am also interrested, I currently started working on Cassandra DB adapter for Cassandra version 3.x for my project on https://github.com/davihu/phalcon-cassandra

Will have not much time now until half of the year. Feel free to contact me, if you are interrested.

All 9 comments

For example, you can implement it for the Incubator.
If this proves successful, we can port it to the Phalcon core

Not sure if implementing it completely in php would work. I could look at implementing a Database Abstraction Layer based on this extension https://github.com/datastax/php-driver

Hi, there's a pdo adapter for cassandra https://code.google.com/archive/a/apache-extras.org/p/cassandra-pdo (or a fork: https://github.com/Orange-OpenSource/YACassandraPDO). So maybe phalcon cassandra adapter can be implemented like mysql or postgresql ?

@ruudboon what about doing it in Zephir?, I was digging in the implementation of an adapter myself, @ashpumpkin @sergeyklay creating an adapter and a dialect for the Cassandra PDO should do the trick right? Or am I missing something?

I am also interrested, I currently started working on Cassandra DB adapter for Cassandra version 3.x for my project on https://github.com/davihu/phalcon-cassandra

Will have not much time now until half of the year. Feel free to contact me, if you are interrested.

@kenpb Zephir should definitely be the goal. But as @sergeyklay suggested. If we build it in php for the incubator then the Phalcon crew can port it.
@davihu Great to see that you started. I'll see if I can contribute soon.

@kenpb I've tested YACassandraPDO with cassandra 3.0.3 and it doesn't properly handle map type :disappointed:
I get something like ������class���+org.apache.cassandra.locator.SimpleStrategy���replication_factor���3
instead of array:

[
'class' => 'org.apache.cassandra.locator.SimpleStrategy',
'replication_factor' => '3'
]

Github page says :

NEW: The driver is compatible with versions of Cassandra up to 2.0.x

And last commit is Jan 26, 2015
:disappointed_relieved:

@ashpumpkin Indeed, the YACassandraPDO uses a thrift API which is outdated atm with all the changes that Cassandra suffered from version 2.0.x to 3.0.x, I think the https://github.com/datastax/php-driver is a better shot since the PDO driver that uses is "supposed" to be compatible with the 3.0.x and should work just fine.

This is a new feature request for Incubator. I'm closing since this is a not a Phalcon bug report.

Was this page helpful?
0 / 5 - 0 ratings