-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add storage CassandraCQL #642
base: develop
Are you sure you want to change the base?
Conversation
since I have copypasted lots of code from the original cassandra storage, maybe there should be a common base-class for both storages. I did not want to be too intrusive, so I left existing code unchanged and just added the new storage. |
Thanks Tobias! I'm ok with not having a common base class. However we do
|
@tobias74 any word on this? I can provide you with more information on how to add these tests. |
I will add the tests this weekend, I have to get up to speed with Travis-CI. :-) |
Just pull the repo, run It'll skip tests automatically it can't connect to, but if you run |
This is exactly what I was about to start writing! Thanks @tobias74 |
You will also need to add more information about the dependent Cassandra client library, and also type-hinting in your constructor. |
To answer your question about testing, just pull down the library and run |
I have added the tests according to the existing Cassandra-Storage. Three of my tests are still failing when I run phpunit locally:
I am still looking into that, maybe someone could point me in the right direction? |
These tests are passing for the existing The first error ( Good luck! |
So a question to help my own cassandra understanding - what are the advantages / disadvantages to the two cassandra libraries being used? Is one considered deprecated, or are they both viable options? Do the names |
Yes, I had an error in my CQL! Now the tests seem to pass: OK, but incomplete, skipped, or risky tests! Concerning advantages and disadvantages: I don't know :-) One downside of the datastax-library is the somewhat involved setup-process ("pecl install cassandra" throws errors on my machine, so I had to build from source manually). The name "CassandraCQL" is just a working title, I am open to suggestions :-) |
To add, phpcassa is deprecated and the author recommends moving to Datastax. Also @tobias74, I noticed you haven't made us of Cassandra's row TTL to have tokens automatically expire. The $expire variable passed into setValue() is ignored. I wrote an example quickly if you'd like to look -> dylwylie@b583ae8 |
Thanks @Dylan1312 :-) |
Go ahead and copy if you're happy with it 👍 |
the existing Cassandra Storage uses a library that is conflicting with the php-cassandra-driver (datastax) I am using. For exercise and fun I adapted the existing Cassandra-Stroage to work with CQL and the datastax-php-driver.
Maybe someone finds this usefull :-)
Tobias