Reputation: 9
I wish I could use Cassandra for a project where only C language is used.
I tried to find a mature C client library for Cassandra, with no luck.
Shall I try a C++ one instead, like http://github.com/posulliv/libcassandra, or does one exist?
Upvotes: 0
Views: 3250
Reputation: 49
I came across this and hopefully this helps - http://datastax.github.io/cpp-driver/
Upvotes: 0
Reputation: 131
There is already a C++ cassandra API called libQtCassandra http://snapwebsites.org/project/libqtcassandra#Download
Upvotes: -1
Reputation: 899
I've created a very basic proof-of-concept C client for Cassandra and put it up on github. It relies on the barely-documented C language support in Thrift (as mentioned in previous answers). This client is not mature by any means, but demonstrates how to use the C files generated by Thrift, and offers some basic functionality; it might be a useful stepping stone towards a more serious C client.
Upvotes: 1
Reputation: 1
I managed generating C code from the Cassandra trunk Thrift file. I obtained the following files :
No main() function there, I guess these should be linked and used as a library, but I found no API documentation or whatsoever.
The samples in thrift/lib/c_glib/test do not show any client test source... Will look into this more deeply !
Upvotes: 0
Reputation: 6932
At least in Thrift trunk, there is C glib support, which means it's possible to make a C client for Cassandra. It's probably not well tested yet.
posulliv/libcassandra was never completed and only supports Cassandra 0.6. It lacks several features like super column support, for example.
I also started a C++ client that supports Cassandra 0.7, but it's still half-baked at the moment. Most of the Cassandra API is supported. At the very least, it can be a good example of working with the Thrift API. Of course, if you're capable of contributing to the project or starting a C client, I think many people would appreciate that.
Upvotes: 2