I want to use Cassandra with Symfony. It is my first time using both technologies. I have conducted a lot of research into what has already been done, and it seems like there is no support for Cassandra from within Symfony (which uses Doctrine ORM). How difficult would it be for me to extend Doctrine to include support for Cassandra? What would be the best, cleanest, and most upgradable way to include this functionality?
There is a PDO driver for Cassandra's CQL: http://code.google.com/a/apache-extras.org/p/cassandra-pdo/
And as the Doctrine's DBAL is built ontop of PDO, I think it's possible to get at least partial functionality working.
Of course things like joins, indexes and entity relations are to be created manually and used with Cassandra's internal structure knowledge in mind.
Being a developer from Java world, I can say that there are Java ORM libraries for Cassandra with almost everything you have in your RDBMS working. So I guess it's possible after all.
Doctrine's ORM is for relational databases, that's why it's called an object relational mapper. A fundamentally different concept from a column oriented store such as Cassandra. I would say that the chances to get Cassandra in there are pretty slim.
Add to the work required that storage and access patterns are just not the same.
In Doctrine's ecosystem, there are people writing a ODM (object document mapper) which supports MongoDB and CouchDB - but a document oriented databases is also a different playground. Even those two are very different from each other while both are a document oriented database.
I don't think you can convince anyone to take on Cassandra in either of these projects.
For me personally, the biggest show-stopper for Cassandra is thrift and related which comes with it. Having said that, that's my personal opinion and nothing should hold you back from implementing a nice PHP wrapper for Cassandra.
I also see no reason to not release your Cassandra wrapper as a custom Symfony bundle, etc..
In the wake of Symfony2 lots of people started projects independent from core to provide bundles which cover an additional feature set (for example, Friends of Symfony). So if you want to persue this, just go ahead and start something (e.g. on Github) and see how it is received.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With