Home > Uncategorized > Cassandra, C# and async await.. Oh my

Cassandra, C# and async await.. Oh my

 

Cassandra is really cool stuff. Especially for time series. Even though  you are new to NOSQL the transition is pretty fast once. But first of all you need to learn to unlearn what you know before about relational database.

You need to download it first from DataStax. You can find the step by step installation from here

A couple of things you need to keep in mind is this principle :

 

  1. Don’t model your data. Model your query.
  2. Don’t afraid of data duplication
  3. Denormalization is Good

You also need to be familiar with Brewer’s CAP theorm and BASE.

Ok. Enough talking. Now let’s get down to code.

Cassandra is cool, so we need to find the programming language that’s totally awesome to access it. Smile 

C# it is !!

 

You can easily find the Cassandra library from Nuget. It’s DataStax library too.

 

image

 

The problem is of course the documentation. You can find the sample code from github project actually. Also from here. But dude… it’s still using TPL and ContinueWith callback model.

image

 

Can you imagine if you would try to execute that from loop ? Sad smile

Anders Helsjberg would cry for that one.

What is so hard about changing that one into this one. Everyone will rejoice about that.

image

 

Also I think DataStax need to support Reactive Extensions for their library. Instead of enumerable row it should return Observable.

I saw the another library that support TPL, Async Await and Rx from Nuget.

image

You can found it’s github here. I will definitely check that out later.

 

Until then please spend your time to understand concept, data modeling and architecture in Cassandra. Please read the following books. It’s the latest book that I think will safe you some time when you have a trouble with Cassandra.

imageimageimage

image

 

Have a great time with the pretty Cassandra.

 

Cheers

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: