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....







15 comments:


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

    ReplyDelete
  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.

    ReplyDelete
  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

    ReplyDelete

  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

    ReplyDelete
  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

    ReplyDelete
  6. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. Machine Learning Final Year Projects In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

    ReplyDelete

  7. You write this post very carefully I think, which is easily understand to me. Not only this, other post is also good. As a newbie this info is really helpful for me. Thanks to you.
    Tally Training in Chennai
    Tally ERP 9 Training
    tally classes
    Tally Training institute in Chennai
    Tally course in Chennai

    ReplyDelete