How to configure a Cassandra client for .NET

posted in
Cassandra uses Apache Thrift to generate client proxies in various languages.  The downside of this is it is super linux based, and if you are like me and live on Windows, getting this to work is a challenge.  If you want to try this, here's some instructions on how to generate your own C# thrift client for Cassandra.  I tried to do this from Cygwin and failed.  :(

I haven't actually been able to generate a Thrift client for C# directly.  However, there are some pre-built clients for Cassandra out there on the web you can already use.  You will need to regenerate them if you switch versions of Cassandra.

I started with Aquiles which wraps lots of the thrift functions in their own class library.  After looking at what Aquiles was doing, I wasn't happy; it was hiding a lot of stuff in Thrift that is available, and using the underlying thrift client isn't that hard.  It will also teach you about how Cassandra works if you use the Thrift client.   

Fortunately, part of the Aquiles client download contains a compiled Thrift client.  You can just reference that in your project and that should be enough.  

There are two dlls you need to reference:
 Apache.Cassandra.064.dll
 Thrift.dll

The 064 is the version of Cassandra you are working with.

Next I'll reference some articles on how to setup a local instance of Cassandra running on your own machine.
Find a problem or mistake? File a bug or better yet, submit a pull request
Copyright © 2010 - 2022 - Doug Tarr