About Me

My photo
I am passionate .NET developer who believes in the power of collaboration and craftsmanship.

Blog Archive

Wednesday, January 21, 2015

Cassandra DB - Event Store (Part I - Research)

Recently I have been doing research on Cassandra DB considering it for an event store. Its reputation as being an extremely performant and horizontally scalable key value data store made it stand out as one that was worth my time investigating. In addition to performance what also makes it an attractive store is that it is an open source project backed by the company Datastax which provides a entire platform around it. Cassandra itself is Apache 2.0 license and Datastax provides a C# driver as well as many other popular platforms.

Interesting enough as I was reading through the Apache Cassandra website I came across an excellent post they linked to detailing why that particular company had chosen Cassandra. It was not until after I read about half way through the post that I realized it was written by one of the Akka.net guys Aaron Stannard. If you are not sure Cassandra is worth the investment in time I urge you to read his post especially the comments it will I am sure change your mind.

Since my goal is to use this with the Dot Net Platform having a C# driver is extremely important. Datastax wrote their own driver which runs on Framework 4.0. They also provide nice documentation and how tos which is extremely helpful.  One other awesome DB that I will also investigate is Foundation DB since it also has a supported driver but it's a little more restrictive in its use.
The free version is the exact same software. The only difference is that you're limited to 6 processes in production. Development and testing processes are unlimited.
The team at Foundation DB have a great product but when I first investigated it's use about a year ago the Dot Net Story was not that strong. Now with all the recent changes I am looking forward to giving it another go. In fact I am planning on testing it against Cassandra once I have built my initial prototype.

One last thing about Event Stores before I continue, on the Dot Net Side there is a great project called NEventStore which has already done all the hard work with whole bunch of different DBs out of the box, like Ravendb and Mongodb, which can be an excellent solution as well as another great product called EventStore which some may consider the gold standard for Event Stores.

Besides the C# driver provided by Datastax there are a few others like Fluent Cassandra but it was recommended to me by one of the contributors to Fluent Cassandra that if I was using the latest build of database that I might be better of using the Datastax driver.

As a part of my setup I decided to download Cassandra directly from the Apache Cassandra website not using the Datastax download. The setup was simple enough, just follow these simple steps.

  1. Download the database .gz file from Apache Cassandra website
  2. Extract the .gz it to a local directory on your windows machine using a tool like Peazip.
  3. Download python  2.x version (skip to step 5 if you already have python installed)
  4. Install python with the msi 
  5. Add the python path under System Properties -> Environmental Variables -> System Variables ->Path 
  6. System Properties -> Environmental Variables -> System Variables ->Path
  7. Ensure you have the Java installed with the latest version if not download and install it.
  8. Ensure that the path has for Java has been added System Properties -> Environmental Variables -> System Variables ->Path
  9. Open a command prompt under administrator
  10. Navigate to the bin directory under the parent directory you extract Cassandra to.
  11. Finally type cassandra -f and you will have a running Cassandra db.
At some point I will get Docker working properly on windows with casandra container but this setup will do nicely for now. Next time I will just do a quick demostration on what its like to interact with the datastax C# driver then from there I will demonstrate a basic event store.

Thanks for reading....


  1. This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...
    DOT NET Training Institutes in Chennai|Best DOT NET Training in Chennai

  2. There are so many useful information in your post, I like it all the time. And I want to share this boost app ranking with you, you can take a look. This is very useful.

  3. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! event directory


  4. Superb post but I was wondering if you could write a litte more on this subject? I'd be very grateful if you could elaborate a little bit more. Many thanks! gmail email login

  5. Informative post indeed, I’ve being in and out reading posts regularly and I see alot of engaging people sharing things and majority of the shared information is very valuable and so, here’s my fine read.
    click here to check the status of your arn
    click here for citizen registration
    click here to continue your registration
    click here to confirm
    click here download