Getting Started with Microsoft Orleans

July 25, 2016 Leave a comment

We .NET developers already know that .NET is rich on the client side development. A lot of library and framework on this space. However .NET community is lack of the highly scalable server side application or distributed computing. However Microsoft Orleans and Akka .NET comes into .NET world to bring hope and make .NET exciting again. We will dive in into how to setup client and server application with Microsoft Orleans in this blog post.

Microsoft Orleans is framework for building distributed system with Actor model. It have a simple programming approach that make it easier for all level of developer to build the software. It also has a great documentation and step by step tutorial. However i have difficulties on setting the orleans silo ( server ) to be accessed from the remote computer. Here’s how we can do that.

I assume that you have already follow the tutorial on Step by step tutorial especially the first three post.

My First Orleans Application

Minimal Orleans Application

Running in a Stand alone silo

Read more…

Zookeeper C# Client with IKVM .NET

September 27, 2014 Leave a comment

Why ?

A lot of big data technology created with JVM. The language are vary from plain old Java, Scala and Clojure. There are a huge number of Apache project for this kind of stuff. The infrastructure for building a serious data product is amazingly mature in Java world.

The server is in Java . Ok. fine. But do we have to code in Java too ? At least as a client using the server ?. I know that JVM is awesome, but the language is not so well compare to C#. Especially the latest one C# 5. But for now we have to admit that .NET world is very lack of Server solution.

I always try to find a client library in C#/.NET but seems that it’s not really mature or has been already dead before birth. I will give you an example for this one.


Zookeeper is for the distributed zoo

Zookeeper has been used as a distributed process control. If you still remember the operating system 101 about process, threads, inter-process communication so this one should be easy for you to learn. If you familiar using lock or any synchronization mechanism like mutex, semaphore etc, just think this as way to do to coordinate multiple server synchronization. And it’s only expose a simple primitive like a file system. This is amazing and flexible. At the same time also make you do a lot of works to get the stuff working.


So we know that Zookeeper is good, it used by a lot of big data technology like Storm, Kafka, etc. So we need to find a client library to use it right ? Good luck finding it for .NET. There are a couple of library for doing that stuff but it’s either old or not up to date.

A couple of sample of that kind of library is :

Read more…

Head First Akka with Scala

August 1, 2014 Leave a comment


Have you enjoy Scala yet ? Have you love this language and its actor model yet ?

Probably you have. I will now explore a really cool framework for building distributed system with actor model. It’s Akka Framework. It’s a reactive framework.




If you haven’t heard about the term reactive you need to check out this one first.



First we will need to install SBT first. If you have already familiar with java. Managing dependency, installing library, setting up structure is really painful if you are not using tools or IDE. SBT is a simple build tools that doesn’t sucks like Ant (with XML hell). You need to download that first from here.


Now we can start by creating SBT project  for this lesson. Create a file build.sbt and insert the following content into the file.



Run sbt compile for the first time for initializing sbt and your project. It will download the required library for Akka. Your output might be different with me. At the first time it will take awhile. Just be patience.



Create directory src/main/scala



Create file HelloActors.scala. Insert the following code


Run the project by executing sbt run from the directory where build.sbt created.




Now you can continue exploring by download the following chapter and write some code !!.



References :

Tools :

Categories: Uncategorized

Head First Scala

August 1, 2014 Leave a comment

It’s been a long time since I learn my last programming language. I’ve been using C# for about 6 years now. I think it’s time to learn something new.

Because of my current job heavily involved with concurrency and network I choose a language that can give me great advantage for that problem. There’s no doubt that JVM is the most reliable and mature runtime in the world. A big internet company like google, amazon and linkedin use it.

The great thing about that is there are a lot of library out there when you want to write a software. Just do your research, google it and you are ready to go with the short amount of time. The problem is the Java language become old and old. It’s not fun using that anymore.

Fortunately a bunch of smart people write another JVM based language like scala, clojure, groovy, erjang etc. This is great stuff, because you can have a taste of modern language while enjoying productivity using existing Java library.

I choose scala to learn first from a bunch of JVM languages. That’s because it’s have a multi paradim programming like functional, object oriented and concurrent. Ok. Let’s get started.

The first thing you want to do is installing JDK. You can install JDK 7 or latest. Download it from the official website.


After you install the JDK make sure that you set your environment variable. Follow this instruction.


Installing scala for Windows is very easy. Just download the MSI installer from here and run it.



Now open Command Line and type scala. Print hello world to console and celebrate your victory.



Learning a new language can be boring if you have already knew a lot from your previous experience. One approach is to visit the fundamental and unique characteristic from this language first and then going deep. One book I found very interesting for introducing the language with different paradigm is Seven Languages in Seven Weeks.


Be careful this is just an appetizer to bring the appetite. Smile with tongue out. After you buy the book then open Chapter 5 about Scala, read and type the code. You will amaze how fast you can learn this language. This language is very interesting because of it’s actor model. Also it will introduce you to functional concept like pattern matching, high order function.


Enjoy your first journey with Scala


Categories: Uncategorized

Cassandra, C# and async await.. Oh my

June 11, 2014 Leave a comment


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.




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.



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.



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.


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.




Have a great time with the pretty Cassandra.



Categories: Uncategorized

Fix Octave 3.2.4 Plotting Hang Problem in Windows 8.1

November 8, 2013 4 comments


For the last few weeks I’ve been following Machine Learning from Coursera. It’s a very awesome website. It’s also FREE.

I learn Machine Learning because that’s a new area that seems interesting in this Big Data World. Until now I think totally our job as software developer is to create application that save our customer data and rarely analyzing it. Of course we provide report but I don’t think that’s enough nowadays.

Machine Learning course use Octave as a programming tools. You can think that as a free and open source MATLAB like program without User Interface. . You can do a lot a computation and prototyping faster there compare to the common programming language as c# or java. But I think for production you need to turn that into real programming language.

The problem I have with Octave it’s a Console Apps. It’s really sad for developer that have been used to Visual Studio for a long time. But we can do plotting from there. That’s really awesome and awkward. Smile But its fun.

The problem I have with running Octave in Windows 8.1 is the plotting windows hang after showing. I search the solution in the internet and finally find two line that solve that Hang problem. Seems that’s a library conflict in Octave

Just need to run this command on Octave CLI.

pkg rebuild -noauto oct2mat

pkg unload oct2mat



Build on Windows, Deploy on Linux

May 14, 2013 1 comment


I think there’s nothing can beat Visual Studio when it comes to .NET development. MonoDevelop like Miguel de Icaza said in this presentation is nothing close to VS2012. But I do interested on where Xamarin Studio will headed.

Developing and Compiling I think still ok on Windows. Just need to deploy and test an assembly on Linux.

So how we do that ? How we transfer that binary to the Linux server. I assume that the server won’t have a UI for performance sake. I think that’s the best. We can fine tune the server for processing concurrent request and not for the fancy UI.

The tools we need is just a simple binary executable and command on Windows. I know this from this blog post.

How to: Copying Files from Windows to Linux via SSH (vice-versa)

We need to download that binary from this page. Just find pscp.exe. Select the latest version. Download it directly.



As soon as it arrived on your windows machine, just copied it to Windows, so we can execute it from anywhere via command line.

You can use it like this.

pscp C:\Documents\helloWorld.txt username@

Here’s how I test it


And I’m so happy when I see that file is in the server.


When you have a lots of files, it’s best to compress it so we can transfer it as a single file. You can use the default compression in windows.


Or you can use the 7zip if you are prefer the smaller files.

In this step I will use default windows compression. To unzip it in Linux you need to install it first. Just execute this command to install

yum install unzip

Then execute this command to unzip the file

unzip  -d /tmp


Very easy right ?


Develop on Windows. Deploy on Linux


You will got the best from both worlds



Categories: Uncategorized

Get every new post delivered to your Inbox.

Join 1,580 other followers