Cassandra client library for PHP, using the native binary protocol.

537 views
Skip to first unread message

Laap Saap

unread,
Dec 4, 2013, 9:10:27 AM12/4/13
to phpc...@googlegroups.com
Found something interesting yesterday. And since phpcassa still uses thrift, this might be interesting for you too.

https://github.com/mauritsl/php-cassandra  uses native binary protocol (no thrift)


Going to run some benchmarks later.

Philip G

unread,
Jan 13, 2014, 1:51:40 PM1/13/14
to phpc...@googlegroups.com
I'm curious. It's been a month now. Have you taken a closer look at this? I'm trying to find the best (most supported, and production capable) PHP driver, too. However, not a huge fan of non-PDO implementation of code. But managed to only find one PDO implementation that's still under development.

Do you mind sharing your tests so that I  may test vs PDO, too? This is the PDO library I found: https://github.com/Orange-OpenSource/YACassandraPDO

It's build for Cassandra 2.x and CQL3, which is a key reason for looking at it. phpcassa isn't CQL3 "ready" (although, it can support it through raw connection).

Nikolay Evseev

unread,
Jul 11, 2014, 6:32:58 AM7/11/14
to phpc...@googlegroups.com
However, it was not suitable for production, this I wrote a library that handles binary data with Cassandra database. 

Now, really want to get feedback about the library and suggestions for improvement. 


Thank you.

Tyler Hobbs

unread,
Jul 23, 2014, 12:27:54 PM7/23/14
to phpc...@googlegroups.com
Hi Nikolay,

I got a chance to take a look at the library.  So far it looks like a good start!  I have some feedback and suggestions for you:
* For UUID data, you may want to consider using the phpcassa.UUID class instead of strings.  Even if you just return strings, having that class available will make it easier for users to do things like extract timestamps from timeuuids and generate new uuids.
* I would not lose millisecond precision on timestamps.  Timestamps are often used for primary key components, so being able to keep the exact timestamp is crucial.
* For batches, you may want to consider using the v2 protocol batch messages instead of concatenating strings: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v2.spec#L345
* I highly recommend adding a separate prepare() method to prepare queries instead of preparing inline whenever parameters are passed with a query.  Re-preparing statements is expensive.

Thanks, and keep up the good work!




--
You received this message because you are subscribed to the Google Groups "phpcassa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpcassa+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tyler Hobbs
DataStax

Nikolay Evseev

unread,
Jul 24, 2014, 11:34:32 AM7/24/14
to phpc...@googlegroups.com
Thanks for the review and recommendations. 
Important to me any feedback. 
I like your suggestions. 
In the next week, I'll post the changes, which will include your suggestions as well as other people. 

I get a lot of reviews. I am glad that so many people want to help and participate in the development of the library. 
Thank you for your trust and support. 

I will try to keep the level of quality at a high level. 
Thank you.

среда, 23 июля 2014 г., 20:27:54 UTC+4 пользователь Tyler Hobbs написал:

Gonzalo Grado

unread,
Jul 26, 2014, 9:39:29 PM7/26/14
to phpc...@googlegroups.com
Just cloned from github and run some queries on cassandra 2.0

No issues so far.

Well done!

Boris

unread,
Oct 28, 2014, 3:34:37 PM10/28/14
to phpc...@googlegroups.com
Hi Nikolay, 

Great work! 
I have some problems/issues and wanted to ask you/other contributors about it. Since I think it's localised problem - I'm new to Cassandra - I wonder is there a google group where I can ask some questions? I didn't want to post "issues" on github, as this is not really a driver issues. 

Cheers, 
Boris

Nikolay Evseev

unread,
Oct 28, 2014, 5:15:36 PM10/28/14
to phpc...@googlegroups.com
Up to this point, the group was not. Now the group has created and url https://groups.google.com/d/forum/php-cassandra-binary

--
You received this message because you are subscribed to a topic in the Google Groups "phpcassa" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phpcassa/3y8knY07GfI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phpcassa+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages